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
-
Create the
yamlfile:Example
[root@host01 ~]# touch mon.yaml -
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_2Example
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"
-
-
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" -
Mount the YAML file under a directory in the container:
Example
[root@host01 ~]# cephadm shell --mount mon.yaml:/var/lib/ceph/mon/mon.yaml -
Navigate to the directory:
Example
[ceph: root@host01 /]# cd /var/lib/ceph/mon/ -
Deploy the Ceph daemons using service specification:
Syntax
ceph orch apply -i FILE_NAME.yamlExample
[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_NAMEExample
[ceph: root@host01 /]# ceph orch ps --daemon_type=mon