From e11d367d8e31a4875301e2e890fa8ffede270ec2 Mon Sep 17 00:00:00 2001 From: Lee Yarwood Date: Wed, 30 Sep 2020 13:06:39 +0100 Subject: [PATCH] orchestrate-devstack: Copy controller ceph.conf and keyrings to subnode This change introduces a basic role to copy the contents of /etc/ceph between the controller and subnodes during orchestrate-devstack allowing a multinode ceph job to be introduced by I9ffdff44a3ad42ebdf26ab72e24dfe3b12b1ef8b. Note that this role is only used when devstack-plugin-ceph is enabled. Change-Id: I324c0f35db34f8540ca164bf8c6e3dea67c5b1b4 --- roles/orchestrate-devstack/tasks/main.yaml | 5 +++++ .../sync-controller-ceph-conf-and-keys/README.rst | 3 +++ .../tasks/main.yaml | 15 +++++++++++++++ 3 files changed, 23 insertions(+) create mode 100644 roles/sync-controller-ceph-conf-and-keys/README.rst create mode 100644 roles/sync-controller-ceph-conf-and-keys/tasks/main.yaml diff --git a/roles/orchestrate-devstack/tasks/main.yaml b/roles/orchestrate-devstack/tasks/main.yaml index f747943f3c..2b8ae01a62 100644 --- a/roles/orchestrate-devstack/tasks/main.yaml +++ b/roles/orchestrate-devstack/tasks/main.yaml @@ -18,6 +18,11 @@ name: sync-devstack-data when: devstack_services['tls-proxy']|default(false) + - name: Sync controller ceph.conf and key rings to subnode + include_role: + name: sync-controller-ceph-conf-and-keys + when: devstack_plugins is defined and 'devstack-plugin-ceph' in devstack_plugins + - name: Run devstack on the sub-nodes include_role: name: run-devstack diff --git a/roles/sync-controller-ceph-conf-and-keys/README.rst b/roles/sync-controller-ceph-conf-and-keys/README.rst new file mode 100644 index 0000000000..e3d2bb42a4 --- /dev/null +++ b/roles/sync-controller-ceph-conf-and-keys/README.rst @@ -0,0 +1,3 @@ +Sync ceph config and keys between controller and subnodes + +Simply copy the contents of /etc/ceph on the controller to subnodes. diff --git a/roles/sync-controller-ceph-conf-and-keys/tasks/main.yaml b/roles/sync-controller-ceph-conf-and-keys/tasks/main.yaml new file mode 100644 index 0000000000..71ece579e6 --- /dev/null +++ b/roles/sync-controller-ceph-conf-and-keys/tasks/main.yaml @@ -0,0 +1,15 @@ +- name: Ensure /etc/ceph exists on subnode + become: true + file: + path: /etc/ceph + state: directory + +- name: Copy /etc/ceph from controller to subnode + become: true + synchronize: + owner: yes + group: yes + perms: yes + src: /etc/ceph/ + dest: /etc/ceph/ + delegate_to: controller