From 39a7b6754bcf508f286a2fe916b1c5eb94be7a06 Mon Sep 17 00:00:00 2001 From: John Fulton Date: Sun, 12 Jan 2020 19:05:10 +0000 Subject: [PATCH] Introduce CephExternalMultiConfig Add new parameter which may be used to configure an overcloud to use more than one external Ceph cluster. Change-Id: I23fc883ee243a34e1abd6914377b206160e5d52a Depends-On: I4fd47445f012878e595649be8371ea212548cbd8 Implements: blueprint multiple-external-ceph --- ci/environments/scenario001-standalone.yaml | 26 ++++++++++++++ deployment/ceph-ansible/ceph-base.yaml | 35 +++++++++++++++++-- ...xternal_multi_config-80d707e5bf75e886.yaml | 5 +++ 3 files changed, 63 insertions(+), 3 deletions(-) create mode 100644 releasenotes/notes/ceph_external_multi_config-80d707e5bf75e886.yaml diff --git a/ci/environments/scenario001-standalone.yaml b/ci/environments/scenario001-standalone.yaml index ca601885d6..e5a2780e9f 100644 --- a/ci/environments/scenario001-standalone.yaml +++ b/ci/environments/scenario001-standalone.yaml @@ -93,6 +93,32 @@ parameter_defaults: osd: "profile rbd pool=images" key: "AQBRgQ9eAAAAABAAv84zEilJYZPNuJ0Iwn9Ndg==" mode: "0600" + CephExternalMultiConfig: + # create client conf and key file for two non-existent external ceph clusters + - cluster: 'ceph2' + fsid: 'af25554b-42f6-4d2b-9b9b-d08a1132d3e8' + external_cluster_mon_ips: '172.18.0.5,172.18.0.6,172.18.0.7' + keys: + - name: "client.openstack" + caps: + mgr: "allow *" + mon: "profile rbd" + osd: "osd: profile rbd pool=volumes, profile rbd pool=backups, profile rbd pool=vms, profile rbd pool=images" + key: "AQCwmeRcAAAAABAA6SQU/bGqFjlfLro5KxrB1Q==" + mode: "0600" + dashboard_enabled: false + - cluster: 'ceph3' + fsid: 'e2cba068-5f14-4b0f-b047-acf375c0004a' + external_cluster_mon_ips: '172.18.0.8,172.18.0.9,172.18.0.10' + keys: + - name: "client.openstack" + caps: + mgr: "allow *" + mon: "profile rbd" + osd: "osd: profile rbd pool=volumes, profile rbd pool=backups, profile rbd pool=vms, profile rbd pool=images" + key: "AQCwmeRcAAAAABAA6SQU/bGqFjlfLro5KxrB2Q==" + mode: "0600" + dashboard_enabled: false CephAnsiblePlaybookVerbosity: 1 CephAnsibleEnvironmentVariables: ANSIBLE_SSH_RETRIES: '4' diff --git a/deployment/ceph-ansible/ceph-base.yaml b/deployment/ceph-ansible/ceph-base.yaml index 45be6cf545..399a39eef4 100644 --- a/deployment/ceph-ansible/ceph-base.yaml +++ b/deployment/ceph-ansible/ceph-base.yaml @@ -246,6 +246,34 @@ parameters: package. This value can be used by tripleo-validations to double check the right ceph-ansible version is installed. default: 'centos-ceph-nautilus' + CephExternalMultiConfig: + type: json + hidden: true + description: | + List of maps describing extra overrides which will be applied when configuring + extra external Ceph clusters. If this list is non-empty, ceph-ansible will run + an extra count(list) times using the same parameters as the first run except + each parameter within each map will override the defaults. If the following + were used, the second run would configure the overcloud to also use the ceph2 + cluster with all the previous parameters except /etc/ceph/ceph2.conf would have + a mon_host entry containing the value of external_cluster_mon_ips below, and + not the default CephExternalMonHost. Subsequent ceph-ansible runs are restricted + to just ceph clients. CephExternalMultiConfig may not be used to deploy additional + internal Ceph clusters within one Heat stack. The map for each list should contain + not tripleo-heat-template parameters but ceph-ansible parameters. + - cluster: 'ceph2' + fsid: 'e2cba068-5f14-4b0f-b047-acf375c0004a' + external_cluster_mon_ips: '172.18.0.5,172.18.0.6,172.18.0.7' + keys: + - name: "client.openstack" + caps: + mgr: "allow *" + mon: "profile rbd" + osd: "osd: profile rbd pool=volumes, profile rbd pool=backups, profile rbd pool=vms, profile rbd pool=images" + key: "AQCwmeRcAAAAABAA6SQU/bGqFjlfLro5KxrB1Q==" + mode: "0600" + dashboard_enabled: false + default: [] parameter_groups: - label: deprecated @@ -578,6 +606,7 @@ outputs: yaql: expression: dict($.data.keys().select($.toLower()).zip($.data.values())) data: {get_param: NodeDataLookup} + ceph_external_multi_config: {get_param: CephExternalMultiConfig} - name: create ceph-ansible working direcotry include_role: name: tripleo_ceph_work_dir @@ -598,9 +627,9 @@ outputs: swift_get_url: {get_param: SwiftFetchDirGetTempurl} swift_put_url: {get_param: SwiftFetchDirPutTempurl} ceph_ansible_environment_variables: - - yaql: - data: {get_param: CephAnsibleEnvironmentVariables} - expression: $.data.items().select($[0] + '=' + $[1]).join(' ') + yaql: + data: {get_param: CephAnsibleEnvironmentVariables} + expression: $.data.items().select($[0] + '=' + $[1]) ceph_ansible_skip_tags: {get_param: CephAnsibleSkipTags} - name: get ssh private key include_role: diff --git a/releasenotes/notes/ceph_external_multi_config-80d707e5bf75e886.yaml b/releasenotes/notes/ceph_external_multi_config-80d707e5bf75e886.yaml new file mode 100644 index 0000000000..be0e01a458 --- /dev/null +++ b/releasenotes/notes/ceph_external_multi_config-80d707e5bf75e886.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + The new parameter CephExternalMultiConfig may be used to configure OpenStack + to use multiple external Ceph clusters.