Deploying the Ceph daemons using the service specification

Using the Ceph Orchestrator, you can deploy daemons such as Ceph Manager, Ceph Monitors, Ceph OSDs, monitoring stack, and others using the service specification in a YAML file.

Prerequisites

  • A running IBM Storage Ceph cluster.

  • Root-level access to all the nodes.

Procedure

  1. Create the yaml file:

    Example

    [root@host01 ~]# touch mon.yaml
  2. This file can be configured in two different ways:

    • Edit the file to include the host details in placement specification:

      Syntax

      service_type: SERVICE_NAME
      placement:
        hosts:
          - HOST_NAME_1
          - HOST_NAME_2

      Example

      service_type: mon
      placement:
        hosts:
          - host01
          - host02
          - host03
    • Edit the file to include the label details in placement specification:

      Syntax

      service_type: SERVICE_NAME
      placement:
        label: "LABEL_1"

      Example

      service_type: mon
      placement:
        label: "mon"
  3. Optional: Use extra container arguments in the service specification files such as CPUs, CA certificates, and other files while deploying services. Use extra arguments to enable additional metrics in node-exporter deployed by cephadm.

    Example

    extra_container_args:
         - "-v"
         - "/etc/pki/ca-trust/extracted:/etc/pki/ca-trust/extracted:ro"
         - "--security-opt"
         - "label=disable"
         - "cpus=2"
         - "--collector.textfile.directory=/var/lib/node_exporter/textfile_collector2"
  4. Mount the YAML file under a directory in the container:

    Example

    [root@host01 ~]# cephadm shell --mount mon.yaml:/var/lib/ceph/mon/mon.yaml
  5. Navigate to the directory:

    Example

    [ceph: root@host01 /]# cd /var/lib/ceph/mon/
  6. Deploy the Ceph daemons using service specification:

    Syntax

    ceph orch apply -i FILE_NAME.yaml

    Example

    [ceph: root@host01 mon]# ceph orch apply -i mon.yaml

Verification

  • List the service:

    Example

    [ceph: root@host01 /]# ceph orch ls
  • List the hosts, daemons, and processes:

    Syntax

    ceph orch ps --daemon_type=DAEMON_NAME

    Example

    [ceph: root@host01 /]# ceph orch ps --daemon_type=mon