From 96b8a41312b59860baa3ed78f9f0afd0d24ae27f Mon Sep 17 00:00:00 2001 From: Miguel Alex Cantu Date: Mon, 17 Jul 2017 18:46:21 +0000 Subject: [PATCH] Add ceph_extra_components, move gnocchi component The telemetry roles within OSA are in the process of getting moved out of the OSA integrated repo. As a result, the gnocchi groups will no longer be part of the inventory by default. This commit adds a new variable, called 'ceph_extra_components', that will allow the deployer to specify any extra services and packages that might not ship by default with OSA. Change-Id: I5b1bcf670e6ed6018cd3de25f069b65747fb5532 --- doc/source/configure-ceph.rst | 16 ++++++++++++++++ handlers/main.yml | 2 +- .../ceph-extra-components-71f1c130b9b47ba5.yaml | 6 ++++++ .../move-gnocchi-component-118ae07fce3562e1.yaml | 6 ++++++ tasks/ceph_auth.yml | 2 +- tasks/ceph_install.yml | 2 +- vars/main.yml | 16 ++++++++++------ 7 files changed, 41 insertions(+), 9 deletions(-) create mode 100644 releasenotes/notes/ceph-extra-components-71f1c130b9b47ba5.yaml create mode 100644 releasenotes/notes/move-gnocchi-component-118ae07fce3562e1.yaml diff --git a/doc/source/configure-ceph.rst b/doc/source/configure-ceph.rst index 70f9957..c45716b 100644 --- a/doc/source/configure-ceph.rst +++ b/doc/source/configure-ceph.rst @@ -143,5 +143,21 @@ IP addresses for the Ceph Monitor servers in the deployment: - 172.29.244.152 - 172.29.244.153 +Configure os_gnocchi with ceph_client +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +If the os_gnocchi role is going to utilize the ceph_client role, the following +configurations need to be added to the user variable file: + +.. code-block:: yaml + + ceph_extra_components: + - component: gnocchi_api + package: + - "{{ python_ceph_package }}" + client: + - '{{ gnocchi_ceph_client }}' + service: '{{ ceph_gnocchi_service_names }}' + .. _Ceph Monitor: http://docs.ceph.com/docs/master/rados/configuration/mon-config-ref/ diff --git a/handlers/main.yml b/handlers/main.yml index ea33446..4dc76d6 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -17,7 +17,7 @@ name: "{{ item.1 }}" state: restarted with_subelements: - - "{{ ceph_components }}" + - "{{ ceph_components + ceph_extra_components }}" - service when: inventory_hostname in groups[item.0.component] failed_when: false diff --git a/releasenotes/notes/ceph-extra-components-71f1c130b9b47ba5.yaml b/releasenotes/notes/ceph-extra-components-71f1c130b9b47ba5.yaml new file mode 100644 index 0000000..beef3e2 --- /dev/null +++ b/releasenotes/notes/ceph-extra-components-71f1c130b9b47ba5.yaml @@ -0,0 +1,6 @@ +--- +features: + - | + A new variable called ``ceph_extra_components`` is available for the + ceph_client role. Extra components, packages, and services that are not + shipped by default by OpenStack-Ansible can be defined here. diff --git a/releasenotes/notes/move-gnocchi-component-118ae07fce3562e1.yaml b/releasenotes/notes/move-gnocchi-component-118ae07fce3562e1.yaml new file mode 100644 index 0000000..70dd4df --- /dev/null +++ b/releasenotes/notes/move-gnocchi-component-118ae07fce3562e1.yaml @@ -0,0 +1,6 @@ +--- +deprecations: + - | + The gnocchi ceph component has been moved out as a default component + required by the ceph_client role. It can now be optionally specified + through the use of the ``ceph_extra_components`` variable. diff --git a/tasks/ceph_auth.yml b/tasks/ceph_auth.yml index 7713b6b..f5cc488 100644 --- a/tasks/ceph_auth.yml +++ b/tasks/ceph_auth.yml @@ -22,7 +22,7 @@ # output to put in a keyring; ceph admin should have already created the user shell: ceph auth get client.{{ item.1 }} >/dev/null && ceph auth get-or-create client.{{ item.1 }} with_subelements: - - "{{ ceph_components }}" + - "{{ ceph_components + ceph_extra_components }}" - client when: - inventory_hostname in groups[item.0.component] diff --git a/tasks/ceph_install.yml b/tasks/ceph_install.yml index 9f810c6..68c40cc 100644 --- a/tasks/ceph_install.yml +++ b/tasks/ceph_install.yml @@ -24,7 +24,7 @@ retries: 5 delay: 2 with_subelements: - - "{{ ceph_components }}" + - "{{ ceph_components + ceph_extra_components }}" - package when: - inventory_hostname in groups[item.0.component] diff --git a/vars/main.yml b/vars/main.yml index f84bd1b..02ee160 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -45,10 +45,14 @@ ceph_components: client: - '{{ nova_ceph_client }}' service: '{{ ceph_nova_service_names }}' - - component: gnocchi_api - package: - - "{{ python_ceph_package }}" - client: - - '{{ gnocchi_ceph_client }}' - service: '{{ ceph_gnocchi_service_names }}' +ceph_extra_components: [] +# Gnocchi has been moved out from the integrated OSA repo, but can still +# be optionally enabled by using the configuration in the os_gnocchi role repo +# under the 'extras' directory +# - component: gnocchi_api +# package: +# - "{{ python_ceph_package }}" +# client: +# - '{{ gnocchi_ceph_client }}' +# service: '{{ ceph_gnocchi_service_names }}'