From 89501ff3c0e48cdc759fa7fbc371c747dc23e97d Mon Sep 17 00:00:00 2001 From: Will Szumski Date: Mon, 9 Jan 2023 14:57:14 +0000 Subject: [PATCH 1/3] Add cephadm_commands placeholder variable Support for this feature was added in #290. This adds a variable and some documentation to raise awareness of its existence. --- doc/source/configuration/cephadm.rst | 15 +++++++++++++++ etc/kayobe/cephadm.yml | 4 ++++ 2 files changed, 19 insertions(+) diff --git a/doc/source/configuration/cephadm.rst b/doc/source/configuration/cephadm.rst index e207dd5b7..39ea14882 100644 --- a/doc/source/configuration/cephadm.rst +++ b/doc/source/configuration/cephadm.rst @@ -239,6 +239,21 @@ for Cinder, Cinder backup, Glance, and Nova in Kolla Ansible. mgr: "profile rbd pool=images" state: present +Ceph Commands +~~~~~~~~~~~~~ + +It is possible to run an arbitrary list of commands against the cluster after deployment +by setting the ``ceph_commands`` variable. ``ceph_commands`` should be a list of commands +to pass to ``cephadm shell -- ceph``. For example: + +.. code:: yaml + + # A list of commands to pass to cephadm shell -- ceph. See stackhpc.cephadm.commands + # for format. + cephadm_commands: + - "fs new cephfs cephfs_metadata cephfs_data" + - "orch apply mds cephfs --placement 3" + Deployment ========== diff --git a/etc/kayobe/cephadm.yml b/etc/kayobe/cephadm.yml index f326b0ae1..4f5f0ed7c 100644 --- a/etc/kayobe/cephadm.yml +++ b/etc/kayobe/cephadm.yml @@ -60,6 +60,10 @@ cephadm_cluster_network: "{{ storage_mgmt_net_name | net_cidr }}" # List of Cephx keys. See stackhpc.cephadm.keys role for format. #cephadm_keys: +# A list of commands to pass to cephadm shell -- ceph. See stackhpc.cephadm.commands +# for format. +#cephadm_commands: + ############################################################################### # Kolla Ceph auto-configuration. From 280b2152c46a3ba981f87bf7fa653d919b92302a Mon Sep 17 00:00:00 2001 From: Will Szumski Date: Wed, 11 Jan 2023 14:33:38 +0000 Subject: [PATCH 2/3] Update doc/source/configuration/cephadm.rst Co-authored-by: Mark Goddard --- doc/source/configuration/cephadm.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/configuration/cephadm.rst b/doc/source/configuration/cephadm.rst index 39ea14882..f20674a8e 100644 --- a/doc/source/configuration/cephadm.rst +++ b/doc/source/configuration/cephadm.rst @@ -243,7 +243,7 @@ Ceph Commands ~~~~~~~~~~~~~ It is possible to run an arbitrary list of commands against the cluster after deployment -by setting the ``ceph_commands`` variable. ``ceph_commands`` should be a list of commands +by setting the ``cephadm_commands`` variable. ``cephadm_commands`` should be a list of commands to pass to ``cephadm shell -- ceph``. For example: .. code:: yaml From 4ce07df3c99b9a08d0861119fc4356d5aeecf8e2 Mon Sep 17 00:00:00 2001 From: Will Szumski Date: Wed, 11 Jan 2023 16:16:31 +0000 Subject: [PATCH 3/3] Update example Updating the example based on feedback from the code review. The previous example applied configuration that would have been better applied using the cephadm role. We don't want to encourage such usage. --- doc/source/configuration/cephadm.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/source/configuration/cephadm.rst b/doc/source/configuration/cephadm.rst index f20674a8e..0322482c0 100644 --- a/doc/source/configuration/cephadm.rst +++ b/doc/source/configuration/cephadm.rst @@ -251,8 +251,9 @@ to pass to ``cephadm shell -- ceph``. For example: # A list of commands to pass to cephadm shell -- ceph. See stackhpc.cephadm.commands # for format. cephadm_commands: - - "fs new cephfs cephfs_metadata cephfs_data" - - "orch apply mds cephfs --placement 3" + # Configure Prometheus exporter to listen on a specific interface. The default + # is to listen on all interfaces. + - "config set mgr mgr/prometheus/server_addr 10.0.0.1" Deployment ==========