diff --git a/ci/environments/scenario004-multinode-containers.yaml b/ci/environments/scenario004-multinode-containers.yaml index 862936bcd8..b94956e700 100644 --- a/ci/environments/scenario004-multinode-containers.yaml +++ b/ci/environments/scenario004-multinode-containers.yaml @@ -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==' diff --git a/docker/services/ceph-ansible/ceph-base.yaml b/docker/services/ceph-ansible/ceph-base.yaml index 6bf1a31c66..0ac2618d32 100644 --- a/docker/services/ceph-ansible/ceph-base.yaml +++ b/docker/services/ceph-ansible/ceph-base.yaml @@ -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]} diff --git a/docker/services/cinder-backup.yaml b/docker/services/cinder-backup.yaml index a397e09ee9..153fe90f29 100644 --- a/docker/services/cinder-backup.yaml +++ b/docker/services/cinder-backup.yaml @@ -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' diff --git a/docker/services/cinder-volume.yaml b/docker/services/cinder-volume.yaml index 3768fdfc3e..cd620c2d57 100644 --- a/docker/services/cinder-volume.yaml +++ b/docker/services/cinder-volume.yaml @@ -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' diff --git a/docker/services/glance-api.yaml b/docker/services/glance-api.yaml index bbae7f9e5e..6610b90620 100644 --- a/docker/services/glance-api.yaml +++ b/docker/services/glance-api.yaml @@ -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' diff --git a/docker/services/gnocchi-api.yaml b/docker/services/gnocchi-api.yaml index 0ef6be9828..d3979e692f 100644 --- a/docker/services/gnocchi-api.yaml +++ b/docker/services/gnocchi-api.yaml @@ -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' diff --git a/docker/services/gnocchi-metricd.yaml b/docker/services/gnocchi-metricd.yaml index 6d5be4677a..39920e05bd 100644 --- a/docker/services/gnocchi-metricd.yaml +++ b/docker/services/gnocchi-metricd.yaml @@ -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' diff --git a/docker/services/gnocchi-statsd.yaml b/docker/services/gnocchi-statsd.yaml index 1216f92f58..3c9fcb6b6f 100644 --- a/docker/services/gnocchi-statsd.yaml +++ b/docker/services/gnocchi-statsd.yaml @@ -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' diff --git a/docker/services/manila-share.yaml b/docker/services/manila-share.yaml index 7991bd1c16..ed1d902fe3 100644 --- a/docker/services/manila-share.yaml +++ b/docker/services/manila-share.yaml @@ -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' diff --git a/docker/services/nova-compute.yaml b/docker/services/nova-compute.yaml index e5f8e951ca..5cb44757bf 100644 --- a/docker/services/nova-compute.yaml +++ b/docker/services/nova-compute.yaml @@ -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' diff --git a/docker/services/nova-libvirt.yaml b/docker/services/nova-libvirt.yaml index 014523033b..a4e424361e 100644 --- a/docker/services/nova-libvirt.yaml +++ b/docker/services/nova-libvirt.yaml @@ -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' diff --git a/environments/manila-cephfsganesha-config-docker.yaml b/environments/manila-cephfsganesha-config-docker.yaml index f5cdd3cb46..9a58fe3ba3 100644 --- a/environments/manila-cephfsganesha-config-docker.yaml +++ b/environments/manila-cephfsganesha-config-docker.yaml @@ -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 - diff --git a/environments/manila-cephfsnative-config-docker.yaml b/environments/manila-cephfsnative-config-docker.yaml index c0b756a474..6c266c925f 100644 --- a/environments/manila-cephfsnative-config-docker.yaml +++ b/environments/manila-cephfsnative-config-docker.yaml @@ -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 - diff --git a/environments/manila-cephfsnative-config.yaml b/environments/manila-cephfsnative-config.yaml index 0cc8fb78f0..7ceb1159b5 100644 --- a/environments/manila-cephfsnative-config.yaml +++ b/environments/manila-cephfsnative-config.yaml @@ -11,7 +11,5 @@ resource_registry: parameter_defaults: ManilaCephFSNativeBackendName: cephfsnative ManilaCephFSNativeDriverHandlesShareServers: false - ManilaCephFSNativeCephFSConfPath: '/etc/ceph/ceph.conf' ManilaCephFSNativeCephFSAuthId: 'manila' - ManilaCephFSNativeCephFSClusterName: 'ceph' ManilaCephFSNativeCephFSEnableSnapshots: false diff --git a/puppet/services/cinder-backup.yaml b/puppet/services/cinder-backup.yaml index eb05deceee..1b571e95e8 100644 --- a/puppet/services/cinder-backup.yaml +++ b/puppet/services/cinder-backup.yaml @@ -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: diff --git a/puppet/services/cinder-volume.yaml b/puppet/services/cinder-volume.yaml index 573762d6d4..99fa78bab8 100644 --- a/puppet/services/cinder-volume.yaml +++ b/puppet/services/cinder-volume.yaml @@ -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} diff --git a/puppet/services/glance-api.yaml b/puppet/services/glance-api.yaml index 26f8d86863..1b23a1b692 100644 --- a/puppet/services/glance-api.yaml +++ b/puppet/services/glance-api.yaml @@ -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} diff --git a/puppet/services/gnocchi-base.yaml b/puppet/services/gnocchi-base.yaml index 25f21cef7e..ddd48c7dfa 100644 --- a/puppet/services/gnocchi-base.yaml +++ b/puppet/services/gnocchi-base.yaml @@ -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} diff --git a/puppet/services/manila-backend-cephfs.yaml b/puppet/services/manila-backend-cephfs.yaml index d85ae7fa81..1cb724dcf1 100644 --- a/puppet/services/manila-backend-cephfs.yaml +++ b/puppet/services/manila-backend-cephfs.yaml @@ -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} diff --git a/puppet/services/nova-compute.yaml b/puppet/services/nova-compute.yaml index 607401495e..c184aa3336 100644 --- a/puppet/services/nova-compute.yaml +++ b/puppet/services/nova-compute.yaml @@ -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: diff --git a/puppet/services/nova-libvirt.yaml b/puppet/services/nova-libvirt.yaml index 99327d93de..821d5b1aa2 100644 --- a/puppet/services/nova-libvirt.yaml +++ b/puppet/services/nova-libvirt.yaml @@ -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: