Allows for configuration of the Ceph cluster name

To be able to support multiple Ceph cluster, an initial step is
to allow for configuration of each cluster name.

Depends-On: I8d5293eaaf104b6374dfa13992a67ddc37397f10
Implements: blueprint custom-ceph-cluster-name
Change-Id: I1b4d51ca6a2d08fa7a68eea680eb104eff732057
This commit is contained in:
Giulio Fidente 2018-02-07 11:56:12 +01:00
parent 2218e7baba
commit 0b1afb48e5
21 changed files with 221 additions and 27 deletions

View File

@ -111,6 +111,7 @@ parameter_defaults:
# a production deployment. What is here is suitable for
# developer and CI testing only.
CephClusterFSID: '4b5c8c0a-ff60-454b-a1b4-9747aa737d19'
CephClusterName: mycephcluster
CephMonKey: 'AQC+Ox1VmEr3BxAALZejqeHj50Nj6wJDvs96OQ=='
CephAdminKey: 'AQDLOh1VgEp6FRAAFzT7Zw+Y9V6JJExQAsRnRQ=='
CephClientKey: 'AQC+vYNXgDAgAhAAc8UoYt+OTz5uhV7ItLdwUw=='

View File

@ -69,6 +69,15 @@ parameters:
CephClusterFSID:
type: string
description: The Ceph cluster FSID. Must be a UUID.
CephClusterName:
type: string
default: ceph
description: The Ceph cluster name.
constraints:
- allowed_pattern: "[a-zA-Z0-9]+"
description: >
The Ceph cluster name must be at least 1 character and contain only
letters and numbers.
CephPoolDefaultPgNum:
description: default pg_num to use for the RBD pools
type: number
@ -214,6 +223,7 @@ outputs:
ceph_common_ansible_vars:
ireallymeanit: 'yes'
fsid: { get_param: CephClusterFSID }
cluster: { get_param: CephClusterName }
docker: true
ceph_release: luminous
ceph_docker_registry: {get_attr: [DockerImageUrlParts, value, host]}

View File

@ -40,6 +40,15 @@ parameters:
default: false
description: Remove package if the service is being disabled during upgrade
type: boolean
CephClusterName:
type: string
default: ceph
description: The Ceph cluster name.
constraints:
- allowed_pattern: "[a-zA-Z0-9]+"
description: >
The Ceph cluster name must be at least 1 character and contain only
letters and numbers.
CephClientUserName:
default: openstack
type: string
@ -109,8 +118,9 @@ outputs:
recurse: true
- path:
str_replace:
template: /etc/ceph/ceph.client.USER.keyring
template: /etc/ceph/CLUSTER.client.USER.keyring
params:
CLUSTER: {get_param: CephClusterName}
USER: {get_param: CephClientUserName}
owner: cinder:cinder
perm: '0600'

View File

@ -52,6 +52,15 @@ parameters:
CephClientUserName:
default: openstack
type: string
CephClusterName:
type: string
default: ceph
description: The Ceph cluster name.
constraints:
- allowed_pattern: "[a-zA-Z0-9]+"
description: >
The Ceph cluster name must be at least 1 character and contain only
letters and numbers.
resources:
@ -119,8 +128,9 @@ outputs:
recurse: true
- path:
str_replace:
template: /etc/ceph/ceph.client.USER.keyring
template: /etc/ceph/CLUSTER.client.USER.keyring
params:
CLUSTER: {get_param: CephClusterName}
USER: {get_param: CephClientUserName}
owner: cinder:cinder
perm: '0600'

View File

@ -68,6 +68,15 @@ parameters:
CephClientUserName:
default: openstack
type: string
CephClusterName:
type: string
default: ceph
description: The Ceph cluster name.
constraints:
- allowed_pattern: "[a-zA-Z0-9]+"
description: >
The Ceph cluster name must be at least 1 character and contain only
letters and numbers.
conditions:
@ -139,8 +148,9 @@ outputs:
recurse: true
- path:
str_replace:
template: /etc/ceph/ceph.client.USER.keyring
template: /etc/ceph/CLUSTER.client.USER.keyring
params:
CLUSTER: {get_param: CephClusterName}
USER: {get_param: CephClientUserName}
owner: glance:glance
perm: '0600'

View File

@ -46,6 +46,15 @@ parameters:
CephClientUserName:
default: openstack
type: string
CephClusterName:
type: string
default: ceph
description: The Ceph cluster name.
constraints:
- allowed_pattern: "[a-zA-Z0-9]+"
description: >
The Ceph cluster name must be at least 1 character and contain only
letters and numbers.
conditions:
@ -102,8 +111,9 @@ outputs:
recurse: true
- path:
str_replace:
template: /etc/ceph/ceph.client.USER.keyring
template: /etc/ceph/CLUSTER.client.USER.keyring
params:
CLUSTER: {get_param: CephClusterName}
USER: {get_param: CephClientUserName}
owner: gnocchi:gnocchi
perm: '0600'

View File

@ -39,6 +39,15 @@ parameters:
CephClientUserName:
default: openstack
type: string
CephClusterName:
type: string
default: ceph
description: The Ceph cluster name.
constraints:
- allowed_pattern: "[a-zA-Z0-9]+"
description: >
The Ceph cluster name must be at least 1 character and contain only
letters and numbers.
resources:
@ -95,8 +104,9 @@ outputs:
recurse: true
- path:
str_replace:
template: /etc/ceph/ceph.client.USER.keyring
template: /etc/ceph/CLUSTER.client.USER.keyring
params:
CLUSTER: {get_param: CephClusterName}
USER: {get_param: CephClientUserName}
owner: gnocchi:gnocchi
perm: '0600'

View File

@ -39,6 +39,15 @@ parameters:
CephClientUserName:
default: openstack
type: string
CephClusterName:
type: string
default: ceph
description: The Ceph cluster name.
constraints:
- allowed_pattern: "[a-zA-Z0-9]+"
description: >
The Ceph cluster name must be at least 1 character and contain only
letters and numbers.
resources:
@ -95,8 +104,9 @@ outputs:
recurse: true
- path:
str_replace:
template: /etc/ceph/ceph.client.USER.keyring
template: /etc/ceph/CLUSTER.client.USER.keyring
params:
CLUSTER: {get_param: CephClusterName}
USER: {get_param: CephClientUserName}
owner: gnocchi:gnocchi
perm: '0600'

View File

@ -39,6 +39,15 @@ parameters:
ManilaCephClientUserName:
default: manila
type: string
CephClusterName:
type: string
default: ceph
description: The Ceph cluster name.
constraints:
- allowed_pattern: "[a-zA-Z0-9]+"
description: >
The Ceph cluster name must be at least 1 character and contain only
letters and numbers.
resources:
@ -95,8 +104,9 @@ outputs:
recurse: true
- path:
str_replace:
template: /etc/ceph/ceph.client.USER.keyring
template: /etc/ceph/CLUSTER.client.USER.keyring
params:
CLUSTER: {get_param: CephClusterName}
USER: {get_param: ManilaCephClientUserName}
owner: manila:manila
perm: '0600'

View File

@ -52,6 +52,15 @@ parameters:
CephClientUserName:
default: openstack
type: string
CephClusterName:
type: string
default: ceph
description: The Ceph cluster name.
constraints:
- allowed_pattern: "[a-zA-Z0-9]+"
description: >
The Ceph cluster name must be at least 1 character and contain only
letters and numbers.
NovaComputeOptVolumes:
default: []
description: list of optional vo
@ -135,8 +144,9 @@ outputs:
recurse: true
- path:
str_replace:
template: /etc/ceph/ceph.client.USER.keyring
template: /etc/ceph/CLUSTER.client.USER.keyring
params:
CLUSTER: {get_param: CephClusterName}
USER: {get_param: CephClientUserName}
owner: nova:nova
perm: '0600'

View File

@ -71,6 +71,15 @@ parameters:
CephClientUserName:
default: openstack
type: string
CephClusterName:
type: string
default: ceph
description: The Ceph cluster name.
constraints:
- allowed_pattern: "[a-zA-Z0-9]+"
description: >
The Ceph cluster name must be at least 1 character and contain only
letters and numbers.
conditions:
@ -154,8 +163,9 @@ outputs:
permissions:
- path:
str_replace:
template: /etc/ceph/ceph.client.USER.keyring
template: /etc/ceph/CLUSTER.client.USER.keyring
params:
CLUSTER: {get_param: CephClusterName}
USER: {get_param: CephClientUserName}
owner: nova:nova
perm: '0600'

View File

@ -14,9 +14,7 @@ resource_registry:
parameter_defaults:
ManilaCephFSBackendName: cephfs
ManilaCephFSDriverHandlesShareServers: false
ManilaCephFSCephFSConfPath: '/etc/ceph/ceph.conf'
ManilaCephFSCephFSAuthId: 'manila'
ManilaCephFSCephFSClusterName: 'ceph'
ManilaCephFSCephFSEnableSnapshots: false
# manila cephfs driver supports either native cephfs backend - 'CEPHFS'
# (users mount shares directly from ceph cluster), or nfs-ganesha backend -

View File

@ -14,9 +14,7 @@ resource_registry:
parameter_defaults:
ManilaCephFSBackendName: cephfs
ManilaCephFSDriverHandlesShareServers: false
ManilaCephFSCephFSConfPath: '/etc/ceph/ceph.conf'
ManilaCephFSCephFSAuthId: 'manila'
ManilaCephFSCephFSClusterName: 'ceph'
ManilaCephFSCephFSEnableSnapshots: false
# manila cephfs driver supports either native cephfs backend - 'CEPHFS'
# (users mount shares directly from ceph cluster), or nfs-ganesha backend -

View File

@ -11,7 +11,5 @@ resource_registry:
parameter_defaults:
ManilaCephFSNativeBackendName: cephfsnative
ManilaCephFSNativeDriverHandlesShareServers: false
ManilaCephFSNativeCephFSConfPath: '/etc/ceph/ceph.conf'
ManilaCephFSNativeCephFSAuthId: 'manila'
ManilaCephFSNativeCephFSClusterName: 'ceph'
ManilaCephFSNativeCephFSEnableSnapshots: false

View File

@ -13,6 +13,15 @@ parameters:
CinderBackupRbdPoolName:
default: backups
type: string
CephClusterName:
type: string
default: ceph
description: The Ceph cluster name.
constraints:
- allowed_pattern: "[a-zA-Z0-9]+"
description: >
The Ceph cluster name must be at least 1 character and contain only
letters and numbers.
CephClientUserName:
default: openstack
type: string
@ -69,6 +78,12 @@ outputs:
- get_attr: [CinderBase, role_data, config_settings]
- cinder::backup::ceph::backup_ceph_user: {get_param: CephClientUserName}
cinder::backup::ceph::backup_ceph_pool: {get_param: CinderBackupRbdPoolName}
cinder::backup::ceph::backup_ceph_conf:
list_join:
- ''
- - '/etc/ceph/'
- {get_param: CephClusterName}
- '.conf'
cinder::backup::swift::backup_swift_container: volumebackups
step_config:
str_replace:

View File

@ -65,6 +65,15 @@ parameters:
list. This is in addition to the standard RBD backend driver
associated with the CinderRbdPoolName.
type: comma_delimited_list
CephClusterName:
type: string
default: ceph
description: The Ceph cluster name.
constraints:
- allowed_pattern: "[a-zA-Z0-9]+"
description: >
The Ceph cluster name must be at least 1 character and contain only
letters and numbers.
CephClientUserName:
default: openstack
type: string
@ -134,6 +143,12 @@ outputs:
tripleo::profile::base::cinder::volume::iscsi::cinder_lvm_loop_device_size: {get_param: CinderLVMLoopDeviceSize}
tripleo::profile::base::cinder::volume::iscsi::cinder_iscsi_helper: {get_param: CinderISCSIHelper}
tripleo::profile::base::cinder::volume::iscsi::cinder_iscsi_protocol: {get_param: CinderISCSIProtocol}
tripleo::profile::base::cinder::volume::rbd::cinder_rbd_ceph_conf:
list_join:
- ''
- - '/etc/ceph/'
- {get_param: CephClusterName}
- '.conf'
tripleo::profile::base::cinder::volume::rbd::cinder_rbd_pool_name: {get_param: CinderRbdPoolName}
tripleo::profile::base::cinder::volume::rbd::cinder_rbd_extra_pools: {get_param: CinderRbdExtraPools}
tripleo::profile::base::cinder::volume::rbd::cinder_rbd_user_name: {get_param: CephClientUserName}

View File

@ -75,6 +75,15 @@ parameters:
CephClientUserName:
default: openstack
type: string
CephClusterName:
type: string
default: ceph
description: The Ceph cluster name.
constraints:
- allowed_pattern: "[a-zA-Z0-9]+"
description: >
The Ceph cluster name must be at least 1 character and contain only
letters and numbers.
GlanceNotifierStrategy:
description: Strategy to use for Glance notification queue
type: string
@ -248,6 +257,12 @@ outputs:
glance::backend::swift::swift_store_key: {get_param: GlancePassword}
glance::backend::swift::swift_store_create_container_on_put: true
glance::backend::swift::swift_store_auth_version: 3
glance::backend::rbd::rbd_store_ceph_conf:
list_join:
- ''
- - '/etc/ceph/'
- {get_param: CephClusterName}
- '.conf'
glance::backend::rbd::rbd_store_pool: {get_param: GlanceRbdPoolName}
glance::backend::rbd::rbd_store_user: {get_param: CephClientUserName}
glance_backend: {get_param: GlanceBackend}

View File

@ -45,6 +45,15 @@ parameters:
GnocchiRbdPoolName:
default: metrics
type: string
CephClusterName:
type: string
default: ceph
description: The Ceph cluster name.
constraints:
- allowed_pattern: "[a-zA-Z0-9]+"
description: >
The Ceph cluster name must be at least 1 character and contain only
letters and numbers.
CephClientUserName:
default: openstack
type: string
@ -126,13 +135,20 @@ outputs:
gnocchi::storage::swift::swift_endpoint_type: {get_param: GnocchiStorageSwiftEndpointType}
gnocchi::storage::ceph::ceph_pool: {get_param: GnocchiRbdPoolName}
gnocchi::storage::ceph::ceph_username: {get_param: CephClientUserName}
gnocchi::storage::ceph::ceph_conffile:
list_join:
- ''
- - '/etc/ceph/'
- {get_param: CephClusterName}
- '.conf'
gnocchi::storage::ceph::ceph_keyring:
list_join:
- '.'
- - '/etc/ceph/ceph'
- 'client'
- ''
- - '/etc/ceph/'
- {get_param: CephClusterName}
- '.client.'
- {get_param: CephClientUserName}
- 'keyring'
- '.keyring'
gnocchi::storage::s3::s3_endpoint_url: {get_param: GnocchiStorageS3Endpoint}
gnocchi::storage::s3::s3_region_name: {get_param: GnocchiStorageS3RegionName}
gnocchi::storage::s3::s3_access_key_id: {get_param: GnocchiStorageS3AccessKeyId}

View File

@ -30,6 +30,15 @@ parameters:
description: Mapping of service endpoint -> protocol. Typically set
via parameter_defaults in the resource registry.
type: json
CephClusterName:
type: string
default: ceph
description: The Ceph cluster name.
constraints:
- allowed_pattern: "[a-zA-Z0-9]+"
description: >
The Ceph cluster name must be at least 1 character and contain only
letters and numbers.
# CephFS backend params:
ManilaCephFSBackendName:
type: string
@ -40,15 +49,9 @@ parameters:
ManilaCephFSShareBackendName:
type: string
default: 'cephfs'
ManilaCephFSCephFSConfPath:
type: string
default: '/etc/ceph/ceph.conf'
ManilaCephFSCephFSAuthId:
type: string
default: 'manila'
ManilaCephFSCephFSClusterName:
type: string
default: 'ceph'
ManilaCephFSCephFSEnableSnapshots:
type: boolean
default: false
@ -73,9 +76,14 @@ outputs:
manila::backend::cephfs::title: {get_param: ManilaCephFSBackendName}
manila::backend::cephfs::driver_handles_share_servers: {get_param: ManilaCephFSDriverHandlesShareServers}
manila::backend::cephfs::share_backend_name: {get_param: ManilaCephFSShareBackendName}
manila::backend::cephfs::cephfs_conf_path: {get_param: ManilaCephFSCephFSConfPath}
manila::backend::cephfs::cephfs_conf_path:
list_join:
- ''
- - /etc/ceph/
- {get_param: CephClusterName}
- .conf
manila::backend::cephfs::cephfs_auth_id: {get_param: ManilaCephFSCephFSAuthId}
manila::backend::cephfs::cephfs_cluster_name: {get_param: ManilaCephFSCephFSClusterName}
manila::backend::cephfs::cephfs_cluster_name: {get_param: CephClusterName}
manila::backend::cephfs::cephfs_enable_snapshots: {get_param: ManilaCephFSCephFSEnableSnapshots}
manila::backend::cephfs::ceph_client_key: {get_param: CephManilaClientKey}
manila::backend::cephfs::cephfs_protocol_helper_type: {get_param: ManilaCephFSCephFSProtocolHelperType}

View File

@ -33,6 +33,15 @@ parameters:
NovaRbdPoolName:
default: vms
type: string
CephClusterName:
type: string
default: ceph
description: The Ceph cluster name.
constraints:
- allowed_pattern: "[a-zA-Z0-9]+"
description: >
The Ceph cluster name must be at least 1 character and contain only
letters and numbers.
CephClientUserName:
default: openstack
type: string
@ -173,6 +182,12 @@ outputs:
tripleo::profile::base::nova::migration::client::nova_compute_enabled: true
tripleo::profile::base::nova::migration::client::ssh_private_key: {get_param: [ MigrationSshKey, private_key ]}
tripleo::profile::base::nova::migration::client::ssh_port: {get_param: MigrationSshPort}
nova::compute::rbd::libvirt_images_rbd_ceph_conf:
list_join:
- ''
- - '/etc/ceph/'
- {get_param: CephClusterName}
- '.conf'
nova::compute::rbd::libvirt_images_rbd_pool: {get_param: NovaRbdPoolName}
nova::compute::rbd::libvirt_rbd_user: {get_param: CephClientUserName}
nova::compute::rbd::rbd_keyring:

View File

@ -30,6 +30,15 @@ parameters:
description: Mapping of service endpoint -> protocol. Typically set
via parameter_defaults in the resource registry.
type: json
CephClusterName:
type: string
default: ceph
description: The Ceph cluster name.
constraints:
- allowed_pattern: "[a-zA-Z0-9]+"
description: >
The Ceph cluster name must be at least 1 character and contain only
letters and numbers.
CephClientUserName:
default: openstack
type: string
@ -143,6 +152,12 @@ outputs:
- nova::compute::libvirt::manage_libvirt_services: false
# we manage migration in nova common puppet profile
nova::compute::libvirt::migration_support: false
nova::compute::rbd::libvirt_images_rbd_ceph_conf:
list_join:
- ''
- - '/etc/ceph/'
- {get_param: CephClusterName}
- '.conf'
nova::compute::rbd::libvirt_rbd_user: {get_param: CephClientUserName}
nova::compute::rbd::rbd_keyring:
list_join: