Deploying client nodes

As a storage administrator, you can deploy client nodes by running the cephadm-preflight.yml and cephadm-clients.yml playbooks.

Before you begin

Before you begin, make sure that you have the following prerequisites in place:
  • Root-level access to the Ansible administration node.
  • Ansible user with sudo and passwordless ssh access to all nodes in the storage cluster.
  • The cephadm-ansible package is installed.
  • The prefight playbook has been run on the initial host in the storage cluster.

    For more information, see Running the preflight playbook.

  • The [clients] group variable must be specified in the Ansible inventory file.
  • The [admin] group is defined in the inventory file with a node where the admin keyring is present at /etc/ceph/ceph.client.admin.keyring.

    For more information about admin keys, see Ceph user management.

IBM Storage Ceph is supported on Intel and AMD x86-64 microprocessors.
  • IBM Storage Ceph 9.9.0 introduces full support for clusters built with ARM (aarch64).

About this task

The cephadm-preflight.yml playbook configures the Ceph repository and prepares the storage cluster for bootstrapping. It also installs some prerequisites, such as podman, lvm2, chrony, and cephadm.

The cephadm-clients.yml playbook handles the distribution of configuration and keyring files to a group of Ceph clients.
Note: If you are not using the cephadm-ansible playbooks, after upgrading your Ceph cluster, you must upgrade the ceph-common package and client libraries on your client nodes. For more information, see Upgrading the IBM Storage Ceph cluster.

Procedure

  1. As an Ansible user, navigate to the /usr/share/cephadm-ansible directory on the Ansible administration node.
    For example,
    [ceph-admin@admin ~]$ cd /usr/share/cephadm-ansible
  2. Open and edit the hosts inventory file and add the [clients] group and clients to your inventory.
     host02
     host03
     host04
    
     [clients]
     client01
     client02
     client03
    
     [admin]
     host01
  3. Run the cephadm-preflight.yml playbook to install the prerequisites on the clients.
    ansible-playbook -i INVENTORY_FILE cephadm-preflight.yml --limit CLIENT_GROUP_NAME|CLIENT_NODE_NAME
    For example,
    [ceph-admin@admin cephadm-ansible]$ ansible-playbook -i hosts cephadm-preflight.yml --limit clients
  4. Run the cephadm-clients.yml playbook to distribute the keyring and Ceph configuration files to a set of clients.
    1. Copy the keyring with a custom destination keyring name.
      ansible-playbook -i INVENTORY_FILE cephadm-clients.yml --extra-vars '{"fsid":"FSID","keyring":"KEYRING_PATH","client_group":"CLIENT_GROUP_NAME","conf":"CEPH_CONFIGURATION_PATH","keyring_dest":"KEYRING_DESTINATION_PATH"}'
      Replace the following values:
      INVENTORY_FILE
      Repalce with the Ansible inventory file name.
      FSID
      Replace with the FSID of the cluster.

      To get the FSID, use the ceph fsid command.

      proc_osd_adding-osdsKEYRING_PATH
      Replace with the full path name to the keyring on the admin host that you want to copy to the client.
      CLIENT_GROUP_NAME
      Optional. Replace with the Ansible group name for the clients to set up.
      CEPH_CONFIGURATION_PATH
      Optional. Replace with the full path to the Ceph configuration file on the admin node.
      KEYRING_DESTINATION_PATH
      Optional. Replace with the full path name of the destination where the keyring will be copied.
      Note: If you do not specify a configuration file with the conf option when you run the playbook, the playbook generates and distributes a minimal configuration file. By default, the generated file is located at /etc/ceph/ceph.conf.
      For example,
      [ceph-admin@host01 cephadm-ansible]$ ansible-playbook -i hosts cephadm-clients.yml --extra-vars '{"fsid":"266ee7a8-2a05-11eb-b846-5254002d4916","keyring":"/etc/ceph/ceph.client.admin.keyring","client_group":"clients","conf":"/etc/ceph/ceph.conf","keyring_dest":"/etc/ceph/custom.name.ceph.keyring"}'
    2. Copy a keyring with the default destination keyring name of ceph.keyring and using the default group of clients.
      ansible-playbook -i INVENTORY_FILE cephadm-clients.yml --extra-vars '{"fsid":"FSID","keyring":"KEYRING_PATH","conf":"CONF_PATH"}'
      For example,
      [ceph-admin@host01 cephadm-ansible]$ ansible-playbook -i hosts cephadm-clients.yml --extra-vars '{"fsid":"266ee7a8-2a05-11eb-b846-5254002d4916","keyring":"/etc/ceph/ceph.client.admin.keyring","conf":"/etc/ceph/ceph.conf"}'

What to do next

Log into the client nodes and verify that the keyring and configuration files exist.
For example,
[user@client01 ~]# ls -l /etc/ceph/

  -rw-------. 1 ceph ceph 151 Jul 11 12:23 custom.name.ceph.keyring
  -rw-------. 1 ceph ceph 151 Jul 11 12:23 ceph.keyring
  -rw-------. 1 ceph ceph 269 Jul 11 12:23 ceph.conf