Remove /etc/ceph dependency and add tripleo_ceph_client role

This change introduces a new CephConfigPath parameter that can be used
by all the OpenStack clients when looking for Ceph client related info
(ceph.conf and keyrings).
By overriding this parameter we can make the containers able to pull
data from different path than /etc/ceph wich was hardcoded.
On top of this change, a new bool is added to prevent the ceph-ansible
client role being executed.
When this boolean is true, the 'ceph_client' tag is added to the list
of tags that should be skipped in ceph-ansible.
By doing this, ceph-ansible won't run the client role [1] and the new,
tripleo_ceph_client role is imported and executed.

[1] https://github.com/ceph/ceph-ansible/blob/master/site-container.yml.sample#L269

Depends-On: Iaabb66cd26f0246defe391a4e34f4eab3c3c5fee
Depends-On: Ia60bc6d5d1a04bd560f2fcb05a4b64078015ae9d

Change-Id: I36673367411cc8d68ffb9ec4a2fbff64ebf12f29
This commit is contained in:
Francesco Pantano
2020-11-20 14:54:13 +01:00
parent d04421d48a
commit 3663790bc0
15 changed files with 171 additions and 26 deletions

View File

@@ -39,6 +39,11 @@ parameters:
description: >
The Ceph cluster name must be at least 1 character and contain only
letters and numbers.
CephConfigPath:
type: string
default: "/etc/ceph"
description: |
The path where the Ceph Cluster config files are stored on the host.
# CephFS backend params:
ManilaCephFSDataPoolName:
default: manila_data
@@ -89,6 +94,7 @@ outputs:
manila::backend::cephfs::driver_handles_share_servers: {get_param: ManilaCephFSDriverHandlesShareServers}
manila::backend::cephfs::pool_name: {get_param: ManilaCephFSDataPoolName}
manila::backend::cephfs::share_backend_name: {get_param: ManilaCephFSShareBackendName}
manila_cephfs_ceph_conf_path: {get_param: CephConfigPath}
manila::backend::cephfs::cephfs_conf_path:
list_join:
- ''

View File

@@ -38,6 +38,11 @@ parameters:
type: string
constraints:
- allowed_values: ['CEPHFS', 'NFS']
CephConfigPath:
type: string
default: "/etc/ceph"
description: |
The path where the Ceph Cluster config files are stored on the host.
conditions:
@@ -57,7 +62,11 @@ outputs:
-
- /var/lib/kolla/config_files/manila_share.json:/var/lib/kolla/config_files/config.json:ro
- /var/lib/config-data/puppet-generated/manila:/var/lib/kolla/config_files/src:ro
- /etc/ceph:/var/lib/kolla/config_files/src-ceph:ro
- list_join:
- ':'
- - {get_param: CephConfigPath}
- - '/var/lib/kolla/config_files/src-ceph'
- - 'ro'
- /dev/:/dev/
- /run/:/run/
- /sys:/sys

View File

@@ -48,6 +48,11 @@ parameters:
description: >
The Ceph cluster name must be at least 1 character and contain only
letters and numbers.
CephConfigPath:
type: string
default: "/etc/ceph"
description: |
The path where the Ceph Cluster config files are stored on the host.
MonitoringSubscriptionManilaShare:
default: 'overcloud-manila-share'
type: string
@@ -188,6 +193,6 @@ outputs:
- { 'path': /var/lib/manila, 'setype': container_file_t }
- name: ensure ceph configurations exist
file:
path: /etc/ceph
path: {get_param:CephConfigPath}
state: directory
upgrade_tasks: []

View File

@@ -66,6 +66,11 @@ parameters:
description: >
Setting this to a unique value will re-run any deployment tasks which
perform configuration on a Heat stack-update.
CephConfigPath:
type: string
default: "/etc/ceph"
description: |
The path where the Ceph Cluster config files are stored on the host.
conditions:
docker_enabled: {equals: [{get_param: ContainerCli}, 'docker']}
@@ -117,6 +122,7 @@ outputs:
tripleo::profile::pacemaker::manila::share_bundle::docker_volumes: {get_attr: [ManilaCommon, manila_share_volumes]}
tripleo::profile::pacemaker::manila::share_bundle::docker_environment: {get_attr: [ManilaCommon, manila_share_environment]}
tripleo::profile::pacemaker::manila::share_bundle::container_backend: {get_param: ContainerCli}
tripleo::profile::pacemaker::manila::share_bundle::ceph_conf_path: { get_param: CephConfigPath}
manila::share::manage_service: false
manila::share::enabled: false
manila::host: hostgroup
@@ -171,7 +177,7 @@ outputs:
- { 'path': /var/lib/manila, 'setype': container_file_t }
- name: ensure ceph configurations exist
file:
path: /etc/ceph
path: {get_param: CephConfigPath}
state: directory
deploy_steps_tasks:
- name: Manila Share tag container image for pacemaker