Using a JSON file to protect login information

As a storage administrator, you might choose to add login and password information to a JSON file and then refer to the JSON file for bootstrapping. Using a JSON file protects the login credentials from exposure.

Before you begin

Before you begin, make sure that you have the following prerequisites in place:
  • An IP address for the first Ceph Monitor container, which is also the IP address for the first node in the storage cluster.
  • Login access to cp.icr.io/cp.
  • A minimum of 10 GB of available space for /var/lib/containers/.
  • Root-level access to all nodes.

About this task

Note: A JSON file can also be used with the cephadm --registry-login command.

Procedure

In these steps, the JSON file name is mylogin.json.
  1. Create the JSON file.
    {
     "url":"cp.icr.io/cp",
     "username":"cp",
     "password":"mypassword1"
    }
  2. Bootstrap a storage cluster.
    cephadm bootstrap --mon-ip IP_ADDRESS --registry-json /etc/mylogin.json
    For example,
    [root@host01 ~]# cephadm bootstrap --mon-ip 10.10.128.68 --registry-json /etc/mylogin.json