Bootstrapping the storage cluster as a non-root user

You can bootstrap the storage cluster as a non-root user if you have passwordless sudo privileges.

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 initial Monitor node in the storage cluster.
  • Login access to cp.icr.io.
  • A minimum of 10 GB of free space for /var/lib/containers/.
  • Optional: SSH public and private keys.
  • Passwordless sudo access to the bootstrap node.
  • Non-root users have passwordless sudo access on all nodes intended to be part of the cluster.
  • cephadm installed on the node that you want to be the initial Monitor node in the storage cluster.

About this task

To bootstrap the IBM Storage Ceph cluster as a non-root user on the bootstrap node, use the --ssh-user option with the cephadm bootstrap command. --ssh-user specifies a user for SSH connections to cluster nodes.

Non-root users must have passwordless sudo access.

Procedure

  1. Change to sudo on the bootstrap node.
    su - SSH_USER_NAME
    For example,
    [root@host01 ~]$ su - ceph
    Last login: Tue Sep 14 12:00:29 EST 2021 on pts/0
  2. Check the SSH connection to the bootstrap node.
    For example,
    [ceph@host01 ~]$ ssh host01
    Last login: Tue Sep 14 12:03:29 EST 2021 on pts/0
  3. Run the cephadm bootstrap command.
    Note: Using private and public keys is optional.

    If SSH keys have not previously been created, these can be created during this step.

    Run the command with the --ssh-private-key and --ssh-public-key options.
    sudo cephadm bootstrap --ssh-user USER_NAME --mon-ip IP_ADDRESS --ssh-private-key PRIVATE_KEY --ssh-public-key PUBLIC_KEY --registry-url cp.icr.io/cp --registry-username cp --registry-password PASSWORD
    For example,
    sudo cephadm bootstrap --ssh-user ceph --mon-ip 10.10.128.68 --ssh-private-key /home/ceph/.ssh/id_rsa --ssh-public-key /home/ceph/.ssh/id_rsa.pub --registry-url cp.icr.io/cp --registry-username cp --registry-password mypassword1