From aa47f369ab9cf4a77d49f25b6703fe213d371d54 Mon Sep 17 00:00:00 2001 From: Michael Gugino Date: Wed, 14 Sep 2016 15:57:16 -0400 Subject: [PATCH] Support deployment of extra ceph.conf files Currently, ceph_client role only deploys one ceph.conf file to a hard-coded location of /etc/ceph/ceph.conf Cinder is able to utilize multiple configs for Ceph when using multiple Ceph clusters by defining the variable rbd_ceph_conf in each rbd backend defined in cinder_backends. This patch allows a deployer to define the dictionary variable ceph_extra_confs to deploy more ceph.conf files. Change-Id: I1e8d1c6bb10915789ab4d08b5596844f01d2b8d7 --- doc/source/configure-ceph.rst | 15 +++++++++++++++ .../notes/extra-ceph-conf-337b9371b49219ff.yaml | 5 +++++ tasks/ceph_config.yml | 13 +++++++++++++ 3 files changed, 33 insertions(+) create mode 100644 releasenotes/notes/extra-ceph-conf-337b9371b49219ff.yaml diff --git a/doc/source/configure-ceph.rst b/doc/source/configure-ceph.rst index 4c9e070..15eb7b0 100644 --- a/doc/source/configure-ceph.rst +++ b/doc/source/configure-ceph.rst @@ -74,6 +74,21 @@ The example uses ``cephx`` authentication, and requires existing ``glance`` and .. _Deploying SSH Keys: targethosts-prepare.html#deploying-ssh-keys +Extra client configuration files +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Deployers can specify extra Ceph configuration files to support +multiple Ceph cluster backends via the ``ceph_extra_confs`` variable. + +.. code-block:: console + + ceph_extra_confs: + - src: "/opt/rdb-1.conf" + dest: "/etc/ceph/rdb-1.conf" + - src: "/opt/rdb-2.conf" + dest: "/etc/ceph/rdb-2.conf" + +These config file sources must be present on the deployment host. + Monitors ~~~~~~~~ diff --git a/releasenotes/notes/extra-ceph-conf-337b9371b49219ff.yaml b/releasenotes/notes/extra-ceph-conf-337b9371b49219ff.yaml new file mode 100644 index 0000000..e60c3bf --- /dev/null +++ b/releasenotes/notes/extra-ceph-conf-337b9371b49219ff.yaml @@ -0,0 +1,5 @@ +--- +features: + - New variable ``ceph_extra_confs`` may be defined to support + deployment of extra Ceph config files. This is useful for cinder + deployments that utilize multiple Ceph clusters as cinder backends. diff --git a/tasks/ceph_config.yml b/tasks/ceph_config.yml index 0aee5a3..482950c 100644 --- a/tasks/ceph_config.yml +++ b/tasks/ceph_config.yml @@ -59,3 +59,16 @@ tags: - ceph-config-create-config +- name: Create extra ceph.conf files + copy: + src: "{{ item.src }}" + dest: "{{ item.dest }}" + owner: root + group: root + mode: 0644 + notify: + - Restart os services + with_items: "{{ ceph_extra_confs }}" + when: ceph_extra_confs is defined + tags: + - ceph-config-create-config