aboutsummaryrefslogtreecommitdiffstats
path: root/puppet
diff options
context:
space:
mode:
authorGiulio Fidente <gfidente@redhat.com>2016-04-28 11:37:32 -0500
committerEmilien Macchi <emilien@redhat.com>2016-06-02 12:21:49 -0400
commit27e457e0dd21f767efedbc4d0430b4cbd974db0d (patch)
tree1c67d5e5ee047d2b2eb7b0431a3abbd5a9b8caf1 /puppet
parentbcd726f1242d78169e6a5687e998473c1043c622 (diff)
Switch Cinder Api/Scheduler/Volume to composable roles
Uses a shared cinder-base resource to do the database and messaging configuration for all three services. Depends-On: I3c6d5226eed5f0f852b0ad9476c7cd9a959fda69 Change-Id: I47c5fd190efca5f02e73fd22aba6cda573daf5cc
Diffstat (limited to 'puppet')
-rw-r--r--puppet/ceph-cluster-config.yaml4
-rw-r--r--puppet/controller.yaml96
-rw-r--r--puppet/extraconfig/ceph/ceph-external-config.yaml4
-rw-r--r--puppet/extraconfig/pre_deploy/controller/cinder-dellsc.yaml2
-rw-r--r--puppet/extraconfig/pre_deploy/controller/cinder-eqlx.yaml2
-rw-r--r--puppet/extraconfig/pre_deploy/controller/cinder-netapp.yaml2
-rw-r--r--puppet/hieradata/controller.yaml1
-rw-r--r--puppet/manifests/overcloud_compute.pp2
-rw-r--r--puppet/manifests/overcloud_controller.pp132
-rw-r--r--puppet/manifests/overcloud_controller_pacemaker.pp197
-rw-r--r--puppet/services/cinder-api.yaml42
-rw-r--r--puppet/services/cinder-base.yaml58
-rw-r--r--puppet/services/cinder-scheduler.yaml27
-rw-r--r--puppet/services/cinder-volume.yaml71
-rw-r--r--puppet/services/pacemaker/cinder-api.yaml30
-rw-r--r--puppet/services/pacemaker/cinder-scheduler.yaml30
-rw-r--r--puppet/services/pacemaker/cinder-volume.yaml30
17 files changed, 297 insertions, 433 deletions
diff --git a/puppet/ceph-cluster-config.yaml b/puppet/ceph-cluster-config.yaml
index f5873ddb..245710f2 100644
--- a/puppet/ceph-cluster-config.yaml
+++ b/puppet/ceph-cluster-config.yaml
@@ -109,7 +109,7 @@ resources:
GLANCE_POOL: {get_param: GlanceRbdPoolName}
GNOCCHI_POOL: {get_param: GnocchiRbdPoolName}
nova::compute::rbd::libvirt_images_rbd_pool: {get_param: NovaRbdPoolName}
- cinder_rbd_pool_name: {get_param: CinderRbdPoolName}
+ tripleo::profile::base::cinder::volume::rbd::cinder_rbd_pool_name: {get_param: CinderRbdPoolName}
glance::backend::rbd::rbd_store_pool: {get_param: GlanceRbdPoolName}
gnocchi::storage::ceph::ceph_pool: {get_param: GnocchiRbdPoolName}
gnocchi::storage::ceph::ceph_username: {get_param: CephClientUserName}
@@ -127,7 +127,7 @@ resources:
- 'client'
- {get_param: CephClientUserName}
- 'keyring'
- ceph_client_user_name: {get_param: CephClientUserName}
+ tripleo::profile::base::cinder::volume::rbd::cinder_rbd_user_name: {get_param: CephClientUserName}
ceph_pools:
- {get_param: CinderRbdPoolName}
- {get_param: NovaRbdPoolName}
diff --git a/puppet/controller.yaml b/puppet/controller.yaml
index 62bb3013..98a7e4c0 100644
--- a/puppet/controller.yaml
+++ b/puppet/controller.yaml
@@ -47,56 +47,6 @@ parameters:
default: 0
description: Number of workers for Ceilometer service.
type: number
- CinderEnableDBPurge:
- default: true
- description: |
- Whether to create cron job for purging soft deleted rows in Cinder database.
- type: boolean
- CinderEnableNfsBackend:
- default: false
- description: Whether to enable or not the NFS backend for Cinder
- type: boolean
- CinderEnableIscsiBackend:
- default: true
- description: Whether to enable or not the Iscsi backend for Cinder
- type: boolean
- CinderEnableRbdBackend:
- default: false
- description: Whether to enable or not the Rbd backend for Cinder
- type: boolean
- CinderISCSIHelper:
- default: lioadm
- description: The iSCSI helper to use with cinder.
- type: string
- CinderLVMLoopDeviceSize:
- default: 10280
- description: The size of the loopback file used by the cinder LVM driver.
- type: number
- CinderNfsMountOptions:
- default: ''
- description: >
- Mount options for NFS mounts used by Cinder NFS backend. Effective
- when CinderEnableNfsBackend is true.
- type: string
- CinderNfsServers:
- default: ''
- description: >
- NFS servers used by Cinder NFS backend. Effective when
- CinderEnableNfsBackend is true.
- type: comma_delimited_list
- CinderPassword:
- description: The password for the cinder service and db account, used by cinder-api.
- type: string
- hidden: true
- CinderBackendConfig:
- default: {}
- description: Contains parameters to configure Cinder backends. Typically
- set via parameter_defaults in the resource registry.
- type: json
- CinderWorkers:
- default: 0
- description: Number of workers for Cinder service.
- type: number
controllerExtraConfig:
default: {}
description: |
@@ -807,7 +757,6 @@ resources:
input_values:
bootstack_nodeid: {get_attr: [Controller, name]}
ceilometer_workers: {get_param: CeilometerWorkers}
- cinder_workers: {get_param: CinderWorkers}
nova_workers: {get_param: NovaWorkers}
neutron_workers: {get_param: NeutronWorkers}
neutron_enable_tunneling: {get_param: NeutronEnableTunnelling}
@@ -821,29 +770,6 @@ resources:
admin_password: {get_param: AdminPassword}
neutron_public_interface_ip: {get_param: NeutronPublicInterfaceIP}
debug: {get_param: Debug}
- cinder_enable_db_purge: {get_param: CinderEnableDBPurge}
- cinder_enable_nfs_backend: {get_param: CinderEnableNfsBackend}
- cinder_enable_rbd_backend: {get_param: CinderEnableRbdBackend}
- cinder_nfs_mount_options: {get_param: CinderNfsMountOptions}
- cinder_nfs_servers:
- str_replace:
- template: SERVERS
- params:
- SERVERS: {get_param: CinderNfsServers}
- cinder_lvm_loop_device_size: {get_param: CinderLVMLoopDeviceSize}
- cinder_password: {get_param: CinderPassword}
- cinder_enable_iscsi_backend: {get_param: CinderEnableIscsiBackend}
- cinder_iscsi_helper: {get_param: CinderISCSIHelper}
- cinder_backend_config: {get_param: CinderBackendConfig}
- cinder_dsn:
- list_join:
- - ''
- - - {get_param: [EndpointMap, MysqlInternal, protocol]}
- - '://cinder:'
- - {get_param: CinderPassword}
- - '@'
- - {get_param: [EndpointMap, MysqlInternal, host]}
- - '/cinder'
cinder_public_url: {get_param: [EndpointMap, CinderPublic, uri]}
cinder_internal_url: {get_param: [EndpointMap, CinderInternal, uri]}
cinder_admin_url: {get_param: [EndpointMap, CinderAdmin, uri]}
@@ -1179,28 +1105,8 @@ resources:
swift_mount_check: {get_input: swift_mount_check}
# Cinder
- cinder_enable_db_purge: {get_input: cinder_enable_db_purge}
- cinder_enable_nfs_backend: {get_input: cinder_enable_nfs_backend}
- cinder_enable_rbd_backend: {get_input: cinder_enable_rbd_backend}
- cinder_nfs_mount_options: {get_input: cinder_nfs_mount_options}
- cinder_nfs_servers: {get_input: cinder_nfs_servers}
- cinder_lvm_loop_device_size: {get_input: cinder_lvm_loop_device_size}
- cinder_iscsi_helper: {get_input: cinder_iscsi_helper}
- cinder_iscsi_ip_address: {get_input: cinder_iscsi_network}
- cinder::database_connection: {get_input: cinder_dsn}
- cinder::api::keystone_password: {get_input: cinder_password}
- cinder::api::auth_uri: {get_input: keystone_auth_uri}
- cinder::api::identity_uri: {get_input: keystone_identity_uri}
+ tripleo::profile::base::cinder::volume::iscsi::cinder_iscsi_address: {get_input: cinder_iscsi_network}
cinder::api::bind_host: {get_input: cinder_api_network}
- cinder::rabbit_userid: {get_input: rabbit_username}
- cinder::rabbit_password: {get_input: rabbit_password}
- cinder::rabbit_use_ssl: {get_input: rabbit_client_use_ssl}
- cinder::rabbit_port: {get_input: rabbit_client_port}
- cinder::debug: {get_input: debug}
- cinder_enable_iscsi_backend: {get_input: cinder_enable_iscsi_backend}
- cinder::glance::glance_api_servers: {get_input: glance_api_servers}
- cinder_backend_config: {get_input: CinderBackendConfig}
- cinder::db::mysql::password: {get_input: cinder_password}
cinder::keystone::auth::public_url: {get_input: cinder_public_url }
cinder::keystone::auth::internal_url: {get_input: cinder_internal_url }
cinder::keystone::auth::admin_url: {get_input: cinder_admin_url }
diff --git a/puppet/extraconfig/ceph/ceph-external-config.yaml b/puppet/extraconfig/ceph/ceph-external-config.yaml
index 308c609a..7d4dc15b 100644
--- a/puppet/extraconfig/ceph/ceph-external-config.yaml
+++ b/puppet/extraconfig/ceph/ceph-external-config.yaml
@@ -83,7 +83,7 @@ resources:
GNOCCHI_POOL: {get_param: GnocchiRbdPoolName}
ceph::profile::params::ms_bind_ipv6: {get_param: CephIPv6}
nova::compute::rbd::libvirt_images_rbd_pool: {get_param: NovaRbdPoolName}
- cinder_rbd_pool_name: {get_param: CinderRbdPoolName}
+ tripleo::profile::base::cinder::volume::rbd::cinder_rbd_pool_name: {get_param: CinderRbdPoolName}
glance::backend::rbd::rbd_store_pool: {get_param: GlanceRbdPoolName}
gnocchi::storage::ceph::ceph_pool: {get_param: GnocchiRbdPoolName}
gnocchi::storage::ceph::ceph_username: {get_param: CephClientUserName}
@@ -101,7 +101,7 @@ resources:
- 'client'
- {get_param: CephClientUserName}
- 'keyring'
- ceph_client_user_name: {get_param: CephClientUserName}
+ tripleo::profile::base::cinder::volume::rbd::cinder_rbd_user_name: {get_param: CephClientUserName}
ceph_pools:
- {get_param: CinderRbdPoolName}
- {get_param: NovaRbdPoolName}
diff --git a/puppet/extraconfig/pre_deploy/controller/cinder-dellsc.yaml b/puppet/extraconfig/pre_deploy/controller/cinder-dellsc.yaml
index 9b6981bb..9423208e 100644
--- a/puppet/extraconfig/pre_deploy/controller/cinder-dellsc.yaml
+++ b/puppet/extraconfig/pre_deploy/controller/cinder-dellsc.yaml
@@ -51,7 +51,7 @@ resources:
datafiles:
cinder_dellsc_data:
mapped_data:
- cinder_enable_dellsc_backend: {get_input: EnableDellScBackend}
+ tripleo::profile::base::cinder::volume::cinder_enable_dellsc_backend: {get_input: EnableDellScBackend}
cinder::backend::dellsc_iscsi::volume_backend_name: {get_input: DellScBackendName}
cinder::backend::dellsc_iscsi::san_ip: {get_input: DellScSanIp}
cinder::backend::dellsc_iscsi::san_login: {get_input: DellScSanLogin}
diff --git a/puppet/extraconfig/pre_deploy/controller/cinder-eqlx.yaml b/puppet/extraconfig/pre_deploy/controller/cinder-eqlx.yaml
index 36db334e..c7af6f22 100644
--- a/puppet/extraconfig/pre_deploy/controller/cinder-eqlx.yaml
+++ b/puppet/extraconfig/pre_deploy/controller/cinder-eqlx.yaml
@@ -50,7 +50,7 @@ resources:
datafiles:
cinder_eqlx_data:
mapped_data:
- cinder_enable_eqlx_backend: {get_input: EnableEqlxBackend}
+ tripleo::profile::base::cinder::volume::cinder_enable_eqlx_backend: {get_input: EnableEqlxBackend}
cinder::backend::eqlx::volume_backend_name: {get_input: EqlxBackendName}
cinder::backend::eqlx::san_ip: {get_input: EqlxSanIp}
cinder::backend::eqlx::san_login: {get_input: EqlxSanLogin}
diff --git a/puppet/extraconfig/pre_deploy/controller/cinder-netapp.yaml b/puppet/extraconfig/pre_deploy/controller/cinder-netapp.yaml
index ab442f2b..6ff90881 100644
--- a/puppet/extraconfig/pre_deploy/controller/cinder-netapp.yaml
+++ b/puppet/extraconfig/pre_deploy/controller/cinder-netapp.yaml
@@ -87,7 +87,7 @@ resources:
datafiles:
cinder_netapp_data:
mapped_data:
- cinder_enable_netapp_backend: {get_input: EnableNetappBackend}
+ tripleo::profile::base::cinder::volume::cinder_enable_netapp_backend: {get_input: EnableNetappBackend}
cinder::backend::netapp::title: {get_input: NetappBackendName}
cinder::backend::netapp::netapp_login: {get_input: NetappLogin}
cinder::backend::netapp::netapp_password: {get_input: NetappPassword}
diff --git a/puppet/hieradata/controller.yaml b/puppet/hieradata/controller.yaml
index de6e3db1..d57f9166 100644
--- a/puppet/hieradata/controller.yaml
+++ b/puppet/hieradata/controller.yaml
@@ -128,7 +128,6 @@ ceilometer::agent::auth::auth_endpoint_type: 'internalURL'
cinder::scheduler::scheduler_driver: cinder.scheduler.filter_scheduler.FilterScheduler
cinder::cron::db_purge::destination: '/dev/null'
cinder::host: hostgroup
-cinder_user_enabled_backends: []
# TODO(jaosorior): Move to cinder profile once cinder is moved as a composable
# service.
diff --git a/puppet/manifests/overcloud_compute.pp b/puppet/manifests/overcloud_compute.pp
index 2f45c787..6a6f54e0 100644
--- a/puppet/manifests/overcloud_compute.pp
+++ b/puppet/manifests/overcloud_compute.pp
@@ -70,7 +70,7 @@ if hiera('step') >= 4 {
include ::ceph::profile::client
$client_keys = hiera('ceph::profile::params::client_keys')
- $client_user = join(['client.', hiera('ceph_client_user_name')])
+ $client_user = join(['client.', hiera('tripleo::profile::base::cinder::volume::rbd::cinder_rbd_user_name')])
class { '::nova::compute::rbd':
libvirt_rbd_secret_key => $client_keys[$client_user]['secret'],
}
diff --git a/puppet/manifests/overcloud_controller.pp b/puppet/manifests/overcloud_controller.pp
index 439036a2..d2859dd2 100644
--- a/puppet/manifests/overcloud_controller.pp
+++ b/puppet/manifests/overcloud_controller.pp
@@ -107,7 +107,6 @@ if hiera('step') >= 2 {
include ::nova::db::mysql
include ::nova::db::mysql_api
include ::neutron::db::mysql
- include ::cinder::db::mysql
if downcase(hiera('gnocchi_indexer_backend')) == 'mysql' {
include ::gnocchi::db::mysql
}
@@ -309,140 +308,13 @@ if hiera('step') >= 4 {
Service['neutron-server'] -> Service['neutron-metadata']
}
- include ::cinder
- include ::cinder::config
- include ::cinder::api
- include ::cinder::glance
- include ::cinder::scheduler
- include ::cinder::volume
- include ::cinder::ceilometer
- class { '::cinder::setup_test_volume':
- size => join([hiera('cinder_lvm_loop_device_size'), 'M']),
- }
-
- $cinder_enable_iscsi = hiera('cinder_enable_iscsi_backend', true)
- if $cinder_enable_iscsi {
- $cinder_iscsi_backend = 'tripleo_iscsi'
-
- cinder::backend::iscsi { $cinder_iscsi_backend :
- iscsi_ip_address => hiera('cinder_iscsi_ip_address'),
- iscsi_helper => hiera('cinder_iscsi_helper'),
- }
- }
-
if $enable_ceph {
-
$ceph_pools = hiera('ceph_pools')
ceph::pool { $ceph_pools :
pg_num => hiera('ceph::profile::params::osd_pool_default_pg_num'),
pgp_num => hiera('ceph::profile::params::osd_pool_default_pgp_num'),
size => hiera('ceph::profile::params::osd_pool_default_size'),
}
-
- $cinder_pool_requires = [Ceph::Pool[hiera('cinder_rbd_pool_name')]]
-
- } else {
- $cinder_pool_requires = []
- }
-
- if hiera('cinder_enable_rbd_backend', false) {
- $cinder_rbd_backend = 'tripleo_ceph'
-
- cinder::backend::rbd { $cinder_rbd_backend :
- backend_host => hiera('cinder::host'),
- rbd_pool => hiera('cinder_rbd_pool_name'),
- rbd_user => hiera('ceph_client_user_name'),
- rbd_secret_uuid => hiera('ceph::profile::params::fsid'),
- require => $cinder_pool_requires,
- }
- }
-
- if hiera('cinder_enable_eqlx_backend', false) {
- $cinder_eqlx_backend = hiera('cinder::backend::eqlx::volume_backend_name')
-
- cinder::backend::eqlx { $cinder_eqlx_backend :
- volume_backend_name => hiera('cinder::backend::eqlx::volume_backend_name', undef),
- san_ip => hiera('cinder::backend::eqlx::san_ip', undef),
- san_login => hiera('cinder::backend::eqlx::san_login', undef),
- san_password => hiera('cinder::backend::eqlx::san_password', undef),
- san_thin_provision => hiera('cinder::backend::eqlx::san_thin_provision', undef),
- eqlx_group_name => hiera('cinder::backend::eqlx::eqlx_group_name', undef),
- eqlx_pool => hiera('cinder::backend::eqlx::eqlx_pool', undef),
- eqlx_use_chap => hiera('cinder::backend::eqlx::eqlx_use_chap', undef),
- eqlx_chap_login => hiera('cinder::backend::eqlx::eqlx_chap_login', undef),
- eqlx_chap_password => hiera('cinder::backend::eqlx::eqlx_san_password', undef),
- }
- }
-
- if hiera('cinder_enable_dellsc_backend', false) {
- $cinder_dellsc_backend = hiera('cinder::backend::dellsc_iscsi::volume_backend_name')
-
- cinder::backend::dellsc_iscsi{ $cinder_dellsc_backend :
- volume_backend_name => hiera('cinder::backend::dellsc_iscsi::volume_backend_name', undef),
- san_ip => hiera('cinder::backend::dellsc_iscsi::san_ip', undef),
- san_login => hiera('cinder::backend::dellsc_iscsi::san_login', undef),
- san_password => hiera('cinder::backend::dellsc_iscsi::san_password', undef),
- dell_sc_ssn => hiera('cinder::backend::dellsc_iscsi::dell_sc_ssn', undef),
- iscsi_ip_address => hiera('cinder::backend::dellsc_iscsi::iscsi_ip_address', undef),
- iscsi_port => hiera('cinder::backend::dellsc_iscsi::iscsi_port', undef),
- dell_sc_api_port => hiera('cinder::backend::dellsc_iscsi::dell_sc_api_port', undef),
- dell_sc_server_folder => hiera('cinder::backend::dellsc_iscsi::dell_sc_server_folder', undef),
- dell_sc_volume_folder => hiera('cinder::backend::dellsc_iscsi::dell_sc_volume_folder', undef),
- }
- }
-
- if hiera('cinder_enable_netapp_backend', false) {
- $cinder_netapp_backend = hiera('cinder::backend::netapp::title')
-
- if hiera('cinder::backend::netapp::nfs_shares', undef) {
- $cinder_netapp_nfs_shares = split(hiera('cinder::backend::netapp::nfs_shares', undef), ',')
- }
-
- cinder::backend::netapp { $cinder_netapp_backend :
- netapp_login => hiera('cinder::backend::netapp::netapp_login', undef),
- netapp_password => hiera('cinder::backend::netapp::netapp_password', undef),
- netapp_server_hostname => hiera('cinder::backend::netapp::netapp_server_hostname', undef),
- netapp_server_port => hiera('cinder::backend::netapp::netapp_server_port', undef),
- netapp_size_multiplier => hiera('cinder::backend::netapp::netapp_size_multiplier', undef),
- netapp_storage_family => hiera('cinder::backend::netapp::netapp_storage_family', undef),
- netapp_storage_protocol => hiera('cinder::backend::netapp::netapp_storage_protocol', undef),
- netapp_transport_type => hiera('cinder::backend::netapp::netapp_transport_type', undef),
- netapp_vfiler => hiera('cinder::backend::netapp::netapp_vfiler', undef),
- netapp_volume_list => hiera('cinder::backend::netapp::netapp_volume_list', undef),
- netapp_vserver => hiera('cinder::backend::netapp::netapp_vserver', undef),
- netapp_partner_backend_name => hiera('cinder::backend::netapp::netapp_partner_backend_name', undef),
- nfs_shares => $cinder_netapp_nfs_shares,
- nfs_shares_config => hiera('cinder::backend::netapp::nfs_shares_config', undef),
- netapp_copyoffload_tool_path => hiera('cinder::backend::netapp::netapp_copyoffload_tool_path', undef),
- netapp_controller_ips => hiera('cinder::backend::netapp::netapp_controller_ips', undef),
- netapp_sa_password => hiera('cinder::backend::netapp::netapp_sa_password', undef),
- netapp_storage_pools => hiera('cinder::backend::netapp::netapp_storage_pools', undef),
- netapp_eseries_host_type => hiera('cinder::backend::netapp::netapp_eseries_host_type', undef),
- netapp_webservice_path => hiera('cinder::backend::netapp::netapp_webservice_path', undef),
- }
- }
-
- if hiera('cinder_enable_nfs_backend', false) {
- $cinder_nfs_backend = 'tripleo_nfs'
-
- if str2bool($::selinux) {
- selboolean { 'virt_use_nfs':
- value => on,
- persistent => true,
- } -> Package['nfs-utils']
- }
-
- package {'nfs-utils': } ->
- cinder::backend::nfs { $cinder_nfs_backend :
- nfs_servers => hiera('cinder_nfs_servers'),
- nfs_mount_options => hiera('cinder_nfs_mount_options',''),
- nfs_shares_config => '/etc/cinder/shares-nfs.conf',
- }
- }
-
- $cinder_enabled_backends = delete_undef_values([$cinder_iscsi_backend, $cinder_rbd_backend, $cinder_eqlx_backend, $cinder_dellsc_backend, $cinder_netapp_backend, $cinder_nfs_backend])
- class { '::cinder::backends' :
- enabled_backends => union($cinder_enabled_backends, hiera('cinder_user_enabled_backends')),
}
# swift storage
@@ -560,14 +432,10 @@ if hiera('step') >= 4 {
if hiera('step') >= 5 {
$nova_enable_db_purge = hiera('nova_enable_db_purge', true)
- $cinder_enable_db_purge = hiera('cinder_enable_db_purge', true)
if $nova_enable_db_purge {
include ::nova::cron::archive_deleted_rows
}
- if $cinder_enable_db_purge {
- include ::cinder::cron::db_purge
- }
} #END STEP 5
$package_manifest_name = join(['/var/lib/tripleo/installed-packages/overcloud_controller', hiera('step')])
diff --git a/puppet/manifests/overcloud_controller_pacemaker.pp b/puppet/manifests/overcloud_controller_pacemaker.pp
index abe586f4..5070f32b 100644
--- a/puppet/manifests/overcloud_controller_pacemaker.pp
+++ b/puppet/manifests/overcloud_controller_pacemaker.pp
@@ -21,7 +21,6 @@ Pcmk_resource <| |> {
# TODO(jistr): use pcs resource provider instead of just no-ops
Service <|
tag == 'aodh-service' or
- tag == 'cinder-service' or
tag == 'ceilometer-service' or
tag == 'gnocchi-service' or
tag == 'neutron-service' or
@@ -297,9 +296,6 @@ if hiera('step') >= 2 {
class { '::neutron::db::mysql':
require => Exec['galera-ready'],
}
- class { '::cinder::db::mysql':
- require => Exec['galera-ready'],
- }
if downcase(hiera('ceilometer_backend')) == 'mysql' {
class { '::ceilometer::db::mysql':
@@ -533,150 +529,13 @@ MYSQL_HOST=localhost\n",
include ::neutron::agents::bigswitch
}
- include ::cinder
- include ::cinder::config
- class { '::cinder::api':
- sync_db => $sync_db,
- manage_service => false,
- enabled => false,
- }
- class { '::cinder::scheduler' :
- manage_service => false,
- enabled => false,
- }
- class { '::cinder::volume' :
- manage_service => false,
- enabled => false,
- }
- include ::cinder::glance
- include ::cinder::ceilometer
- class { '::cinder::setup_test_volume':
- size => join([hiera('cinder_lvm_loop_device_size'), 'M']),
- }
-
- $cinder_enable_iscsi = hiera('cinder_enable_iscsi_backend', true)
- if $cinder_enable_iscsi {
- $cinder_iscsi_backend = 'tripleo_iscsi'
-
- cinder::backend::iscsi { $cinder_iscsi_backend :
- iscsi_ip_address => hiera('cinder_iscsi_ip_address'),
- iscsi_helper => hiera('cinder_iscsi_helper'),
- }
- }
-
if $enable_ceph {
-
$ceph_pools = hiera('ceph_pools')
ceph::pool { $ceph_pools :
pg_num => hiera('ceph::profile::params::osd_pool_default_pg_num'),
pgp_num => hiera('ceph::profile::params::osd_pool_default_pgp_num'),
size => hiera('ceph::profile::params::osd_pool_default_size'),
}
-
- $cinder_pool_requires = [Ceph::Pool[hiera('cinder_rbd_pool_name')]]
-
- } else {
- $cinder_pool_requires = []
- }
-
- if hiera('cinder_enable_rbd_backend', false) {
- $cinder_rbd_backend = 'tripleo_ceph'
-
- cinder::backend::rbd { $cinder_rbd_backend :
- backend_host => hiera('cinder::host'),
- rbd_pool => hiera('cinder_rbd_pool_name'),
- rbd_user => hiera('ceph_client_user_name'),
- rbd_secret_uuid => hiera('ceph::profile::params::fsid'),
- require => $cinder_pool_requires,
- }
- }
-
- if hiera('cinder_enable_eqlx_backend', false) {
- $cinder_eqlx_backend = hiera('cinder::backend::eqlx::volume_backend_name')
-
- cinder::backend::eqlx { $cinder_eqlx_backend :
- volume_backend_name => hiera('cinder::backend::eqlx::volume_backend_name', undef),
- san_ip => hiera('cinder::backend::eqlx::san_ip', undef),
- san_login => hiera('cinder::backend::eqlx::san_login', undef),
- san_password => hiera('cinder::backend::eqlx::san_password', undef),
- san_thin_provision => hiera('cinder::backend::eqlx::san_thin_provision', undef),
- eqlx_group_name => hiera('cinder::backend::eqlx::eqlx_group_name', undef),
- eqlx_pool => hiera('cinder::backend::eqlx::eqlx_pool', undef),
- eqlx_use_chap => hiera('cinder::backend::eqlx::eqlx_use_chap', undef),
- eqlx_chap_login => hiera('cinder::backend::eqlx::eqlx_chap_login', undef),
- eqlx_chap_password => hiera('cinder::backend::eqlx::eqlx_san_password', undef),
- }
- }
-
- if hiera('cinder_enable_dellsc_backend', false) {
- $cinder_dellsc_backend = hiera('cinder::backend::dellsc_iscsi::volume_backend_name')
-
- cinder::backend::dellsc_iscsi{ $cinder_dellsc_backend :
- volume_backend_name => hiera('cinder::backend::dellsc_iscsi::volume_backend_name', undef),
- san_ip => hiera('cinder::backend::dellsc_iscsi::san_ip', undef),
- san_login => hiera('cinder::backend::dellsc_iscsi::san_login', undef),
- san_password => hiera('cinder::backend::dellsc_iscsi::san_password', undef),
- dell_sc_ssn => hiera('cinder::backend::dellsc_iscsi::dell_sc_ssn', undef),
- iscsi_ip_address => hiera('cinder::backend::dellsc_iscsi::iscsi_ip_address', undef),
- iscsi_port => hiera('cinder::backend::dellsc_iscsi::iscsi_port', undef),
- dell_sc_api_port => hiera('cinder::backend::dellsc_iscsi::dell_sc_api_port', undef),
- dell_sc_server_folder => hiera('cinder::backend::dellsc_iscsi::dell_sc_server_folder', undef),
- dell_sc_volume_folder => hiera('cinder::backend::dellsc_iscsi::dell_sc_volume_folder', undef),
- }
- }
-
- if hiera('cinder_enable_netapp_backend', false) {
- $cinder_netapp_backend = hiera('cinder::backend::netapp::title')
-
- if hiera('cinder::backend::netapp::nfs_shares', undef) {
- $cinder_netapp_nfs_shares = split(hiera('cinder::backend::netapp::nfs_shares', undef), ',')
- }
-
- cinder::backend::netapp { $cinder_netapp_backend :
- netapp_login => hiera('cinder::backend::netapp::netapp_login', undef),
- netapp_password => hiera('cinder::backend::netapp::netapp_password', undef),
- netapp_server_hostname => hiera('cinder::backend::netapp::netapp_server_hostname', undef),
- netapp_server_port => hiera('cinder::backend::netapp::netapp_server_port', undef),
- netapp_size_multiplier => hiera('cinder::backend::netapp::netapp_size_multiplier', undef),
- netapp_storage_family => hiera('cinder::backend::netapp::netapp_storage_family', undef),
- netapp_storage_protocol => hiera('cinder::backend::netapp::netapp_storage_protocol', undef),
- netapp_transport_type => hiera('cinder::backend::netapp::netapp_transport_type', undef),
- netapp_vfiler => hiera('cinder::backend::netapp::netapp_vfiler', undef),
- netapp_volume_list => hiera('cinder::backend::netapp::netapp_volume_list', undef),
- netapp_vserver => hiera('cinder::backend::netapp::netapp_vserver', undef),
- netapp_partner_backend_name => hiera('cinder::backend::netapp::netapp_partner_backend_name', undef),
- nfs_shares => $cinder_netapp_nfs_shares,
- nfs_shares_config => hiera('cinder::backend::netapp::nfs_shares_config', undef),
- netapp_copyoffload_tool_path => hiera('cinder::backend::netapp::netapp_copyoffload_tool_path', undef),
- netapp_controller_ips => hiera('cinder::backend::netapp::netapp_controller_ips', undef),
- netapp_sa_password => hiera('cinder::backend::netapp::netapp_sa_password', undef),
- netapp_storage_pools => hiera('cinder::backend::netapp::netapp_storage_pools', undef),
- netapp_eseries_host_type => hiera('cinder::backend::netapp::netapp_eseries_host_type', undef),
- netapp_webservice_path => hiera('cinder::backend::netapp::netapp_webservice_path', undef),
- }
- }
-
- if hiera('cinder_enable_nfs_backend', false) {
- $cinder_nfs_backend = 'tripleo_nfs'
-
- if str2bool($::selinux) {
- selboolean { 'virt_use_nfs':
- value => on,
- persistent => true,
- } -> Package['nfs-utils']
- }
-
- package { 'nfs-utils': } ->
- cinder::backend::nfs { $cinder_nfs_backend:
- nfs_servers => hiera('cinder_nfs_servers'),
- nfs_mount_options => hiera('cinder_nfs_mount_options',''),
- nfs_shares_config => '/etc/cinder/shares-nfs.conf',
- }
- }
-
- $cinder_enabled_backends = delete_undef_values([$cinder_iscsi_backend, $cinder_rbd_backend, $cinder_eqlx_backend, $cinder_dellsc_backend, $cinder_netapp_backend, $cinder_nfs_backend])
- class { '::cinder::backends' :
- enabled_backends => union($cinder_enabled_backends, hiera('cinder_user_enabled_backends')),
}
# swift storage
@@ -873,14 +732,10 @@ password=\"${mysql_root_password}\"",
}
$nova_enable_db_purge = hiera('nova_enable_db_purge', true)
- $cinder_enable_db_purge = hiera('cinder_enable_db_purge', true)
if $nova_enable_db_purge {
include ::nova::cron::archive_deleted_rows
}
- if $cinder_enable_db_purge {
- include ::cinder::cron::db_purge
- }
if $pacemaker_master {
@@ -903,58 +758,6 @@ password=\"${mysql_root_password}\"",
Pacemaker::Resource::Ocf['openstack-core']],
}
- # Cinder
- pacemaker::resource::service { $::cinder::params::api_service :
- clone_params => 'interleave=true',
- require => Pacemaker::Resource::Ocf['openstack-core'],
- }
- pacemaker::resource::service { $::cinder::params::scheduler_service :
- clone_params => 'interleave=true',
- }
- pacemaker::resource::service { $::cinder::params::volume_service : }
-
- pacemaker::constraint::base { 'keystone-then-cinder-api-constraint':
- constraint_type => 'order',
- first_resource => 'openstack-core-clone',
- second_resource => "${::cinder::params::api_service}-clone",
- first_action => 'start',
- second_action => 'start',
- require => [Pacemaker::Resource::Ocf['openstack-core'],
- Pacemaker::Resource::Service[$::cinder::params::api_service]],
- }
- pacemaker::constraint::base { 'cinder-api-then-cinder-scheduler-constraint':
- constraint_type => 'order',
- first_resource => "${::cinder::params::api_service}-clone",
- second_resource => "${::cinder::params::scheduler_service}-clone",
- first_action => 'start',
- second_action => 'start',
- require => [Pacemaker::Resource::Service[$::cinder::params::api_service],
- Pacemaker::Resource::Service[$::cinder::params::scheduler_service]],
- }
- pacemaker::constraint::colocation { 'cinder-scheduler-with-cinder-api-colocation':
- source => "${::cinder::params::scheduler_service}-clone",
- target => "${::cinder::params::api_service}-clone",
- score => 'INFINITY',
- require => [Pacemaker::Resource::Service[$::cinder::params::api_service],
- Pacemaker::Resource::Service[$::cinder::params::scheduler_service]],
- }
- pacemaker::constraint::base { 'cinder-scheduler-then-cinder-volume-constraint':
- constraint_type => 'order',
- first_resource => "${::cinder::params::scheduler_service}-clone",
- second_resource => $::cinder::params::volume_service,
- first_action => 'start',
- second_action => 'start',
- require => [Pacemaker::Resource::Service[$::cinder::params::scheduler_service],
- Pacemaker::Resource::Service[$::cinder::params::volume_service]],
- }
- pacemaker::constraint::colocation { 'cinder-volume-with-cinder-scheduler-colocation':
- source => $::cinder::params::volume_service,
- target => "${::cinder::params::scheduler_service}-clone",
- score => 'INFINITY',
- require => [Pacemaker::Resource::Service[$::cinder::params::scheduler_service],
- Pacemaker::Resource::Service[$::cinder::params::volume_service]],
- }
-
if hiera('neutron::enable_ovs_agent', true) {
pacemaker::resource::service { $::neutron::params::ovs_agent_service:
clone_params => 'interleave=true',
diff --git a/puppet/services/cinder-api.yaml b/puppet/services/cinder-api.yaml
new file mode 100644
index 00000000..c53bef6f
--- /dev/null
+++ b/puppet/services/cinder-api.yaml
@@ -0,0 +1,42 @@
+heat_template_version: 2016-04-08
+
+description: >
+ OpenStack Cinder API service configured with Puppet
+
+parameters:
+ CinderEnableDBPurge:
+ default: true
+ description: |
+ Whether to create cron job for purging soft deleted rows in Cinder database.
+ type: boolean
+ CinderPassword:
+ description: The password for the cinder service account, used by cinder-api.
+ type: string
+ hidden: true
+ EndpointMap:
+ default: {}
+ description: Mapping of service endpoint -> protocol. Typically set
+ via parameter_defaults in the resource registry.
+ type: json
+
+resources:
+
+ CinderBase:
+ type: ./cinder-base.yaml
+ properties:
+ EndpointMap: {get_param: EndpointMap}
+
+outputs:
+ role_data:
+ description: Role data for the Cinder API role.
+ value:
+ config_settings:
+ map_merge:
+ - get_attr: [CinderBase, role_data, config_settings]
+ - cinder::api::auth_uri: {get_param: [EndpointMap, KeystoneInternal, uri]}
+ cinder::api::identity_uri: {get_param: [EndpointMap, KeystoneAdmin, uri_no_suffix]}
+ cinder::api::keystone_password: {get_param: CinderPassword}
+ cinder::glance::glance_api_servers: {get_param: [EndpointMap, GlanceInternal, uri]}
+ tripleo::profile::base::cinder::cinder_enable_db_purge: {get_param: CinderEnableDBPurge}
+ step_config: |
+ include ::tripleo::profile::base::cinder::api
diff --git a/puppet/services/cinder-base.yaml b/puppet/services/cinder-base.yaml
new file mode 100644
index 00000000..85682448
--- /dev/null
+++ b/puppet/services/cinder-base.yaml
@@ -0,0 +1,58 @@
+heat_template_version: 2016-04-08
+
+description: >
+ OpenStack Cinder base service. Shared by all Cinder services.
+
+parameters:
+ CinderPassword:
+ description: The password for the cinder service account, used by cinder-api.
+ type: string
+ hidden: true
+ Debug:
+ default: ''
+ description: Set to True to enable debugging on all services.
+ type: string
+ EndpointMap:
+ default: {}
+ description: Mapping of service endpoint -> protocol. Typically set
+ via parameter_defaults in the resource registry.
+ type: json
+ RabbitClientPort:
+ default: 5672
+ description: Set rabbit subscriber port, change this if using SSL
+ type: number
+ RabbitClientUseSSL:
+ default: false
+ description: >
+ Rabbit client subscriber parameter to specify
+ an SSL connection to the RabbitMQ host.
+ type: string
+ RabbitPassword:
+ description: The password for RabbitMQ
+ type: string
+ hidden: true
+ RabbitUserName:
+ default: guest
+ description: The username for RabbitMQ
+ type: string
+
+outputs:
+ role_data:
+ description: Role data for the Cinder base service.
+ value:
+ config_settings:
+ cinder::database_connection:
+ list_join:
+ - ''
+ - - {get_param: [EndpointMap, MysqlInternal, protocol]}
+ - '://cinder:'
+ - {get_param: CinderPassword}
+ - '@'
+ - {get_param: [EndpointMap, MysqlInternal, host]}
+ - '/cinder'
+ cinder::db::mysql::password: {get_param: CinderPassword}
+ cinder::debug: {get_param: Debug}
+ cinder::rabbit_use_ssl: {get_param: RabbitClientUseSSL}
+ cinder::rabbit_userid: {get_param: RabbitUserName}
+ cinder::rabbit_password: {get_param: RabbitPassword}
+ cinder::rabbit_port: {get_param: RabbitClientPort}
diff --git a/puppet/services/cinder-scheduler.yaml b/puppet/services/cinder-scheduler.yaml
new file mode 100644
index 00000000..6bdf86bc
--- /dev/null
+++ b/puppet/services/cinder-scheduler.yaml
@@ -0,0 +1,27 @@
+heat_template_version: 2016-04-08
+
+description: >
+ OpenStack Cinder Scheduler service configured with Puppet
+
+parameters:
+ EndpointMap:
+ default: {}
+ description: Mapping of service endpoint -> protocol. Typically set
+ via parameter_defaults in the resource registry.
+ type: json
+
+resources:
+
+ CinderBase:
+ type: ./cinder-base.yaml
+ properties:
+ EndpointMap: {get_param: EndpointMap}
+
+outputs:
+ role_data:
+ description: Role data for the Cinder Scheduler role.
+ value:
+ config_settings:
+ get_attr: [CinderBase, role_data, config_settings]
+ step_config: |
+ include ::tripleo::profile::base::cinder::scheduler
diff --git a/puppet/services/cinder-volume.yaml b/puppet/services/cinder-volume.yaml
new file mode 100644
index 00000000..d28f40e6
--- /dev/null
+++ b/puppet/services/cinder-volume.yaml
@@ -0,0 +1,71 @@
+heat_template_version: 2016-04-08
+
+description: >
+ OpenStack Cinder Volume service configured with Puppet
+
+parameters:
+ CinderEnableNfsBackend:
+ default: false
+ description: Whether to enable or not the NFS backend for Cinder
+ type: boolean
+ CinderEnableIscsiBackend:
+ default: true
+ description: Whether to enable or not the Iscsi backend for Cinder
+ type: boolean
+ CinderEnableRbdBackend:
+ default: false
+ description: Whether to enable or not the Rbd backend for Cinder
+ type: boolean
+ CinderISCSIHelper:
+ default: lioadm
+ description: The iSCSI helper to use with cinder.
+ type: string
+ CinderLVMLoopDeviceSize:
+ default: 10280
+ description: The size of the loopback file used by the cinder LVM driver.
+ type: number
+ CinderNfsMountOptions:
+ default: ''
+ description: >
+ Mount options for NFS mounts used by Cinder NFS backend. Effective
+ when CinderEnableNfsBackend is true.
+ type: string
+ CinderNfsServers:
+ default: ''
+ description: >
+ NFS servers used by Cinder NFS backend. Effective when
+ CinderEnableNfsBackend is true.
+ type: comma_delimited_list
+ EndpointMap:
+ default: {}
+ description: Mapping of service endpoint -> protocol. Typically set
+ via parameter_defaults in the resource registry.
+ type: json
+
+resources:
+
+ CinderBase:
+ type: ./cinder-base.yaml
+ properties:
+ EndpointMap: {get_param: EndpointMap}
+
+outputs:
+ role_data:
+ description: Role data for the Cinder Volume role.
+ value:
+ config_settings:
+ map_merge:
+ - get_attr: [CinderBase, role_data, config_settings]
+ - tripleo::profile::base::cinder::volume::cinder_enable_iscsi_backend: {get_param: CinderEnableIscsiBackend}
+ tripleo::profile::base::cinder::volume::cinder_enable_nfs_backend: {get_param: CinderEnableNfsBackend}
+ tripleo::profile::base::cinder::volume::cinder_enable_rbd_backend: {get_param: CinderEnableRbdBackend}
+ tripleo::profile::base::cinder::volume::nfs::cinder_nfs_mount_options: {get_param: CinderNfsMountOptions}
+ tripleo::profile::base::cinder::volume::nfs::cinder_nfs_servers:
+ str_replace:
+ template: SERVERS
+ params:
+ SERVERS: {get_param: CinderNfsServers}
+ 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}
+ step_config: |
+ include ::tripleo::profile::base::cinder::volume
diff --git a/puppet/services/pacemaker/cinder-api.yaml b/puppet/services/pacemaker/cinder-api.yaml
new file mode 100644
index 00000000..0f66cc06
--- /dev/null
+++ b/puppet/services/pacemaker/cinder-api.yaml
@@ -0,0 +1,30 @@
+heat_template_version: 2016-04-08
+
+description: >
+ OpenStack Cinder API service with Pacemaker configured with Puppet.
+
+parameters:
+ EndpointMap:
+ default: {}
+ description: Mapping of service endpoint -> protocol. Typically set
+ via parameter_defaults in the resource registry.
+ type: json
+
+resources:
+
+ CinderApiBase:
+ type: ../cinder-api.yaml
+ properties:
+ EndpointMap: {get_param: EndpointMap}
+
+outputs:
+ role_data:
+ description: Role data for the Cinder API role.
+ value:
+ config_settings:
+ map_merge:
+ - get_attr: [CinderApiBase, role_data, config_settings]
+ - cinder::api::manage_service: false
+ cinder::api::enabled: false
+ step_config: |
+ include ::tripleo::profile::pacemaker::cinder::api
diff --git a/puppet/services/pacemaker/cinder-scheduler.yaml b/puppet/services/pacemaker/cinder-scheduler.yaml
new file mode 100644
index 00000000..d1472c00
--- /dev/null
+++ b/puppet/services/pacemaker/cinder-scheduler.yaml
@@ -0,0 +1,30 @@
+heat_template_version: 2016-04-08
+
+description: >
+ OpenStack Cinder Scheduler service with Pacemaker configured with Puppet
+
+parameters:
+ EndpointMap:
+ default: {}
+ description: Mapping of service endpoint -> protocol. Typically set
+ via parameter_defaults in the resource registry.
+ type: json
+
+resources:
+
+ CinderSchedulerBase:
+ type: ../cinder-scheduler.yaml
+ properties:
+ EndpointMap: {get_param: EndpointMap}
+
+outputs:
+ role_data:
+ description: Role data for the Cinder Scheduler role.
+ value:
+ config_settings:
+ map_merge:
+ - get_attr: [CinderSchedulerBase, role_data, config_settings]
+ - cinder::scheduler::manage_service: false
+ cinder::scheduler::enabled: false
+ step_config:
+ include ::tripleo::profile::pacemaker::cinder::scheduler
diff --git a/puppet/services/pacemaker/cinder-volume.yaml b/puppet/services/pacemaker/cinder-volume.yaml
new file mode 100644
index 00000000..ee4e6cea
--- /dev/null
+++ b/puppet/services/pacemaker/cinder-volume.yaml
@@ -0,0 +1,30 @@
+heat_template_version: 2016-04-08
+
+description: >
+ OpenStack Cinder Volume service with Pacemaker configured with Puppet
+
+parameters:
+ EndpointMap:
+ default: {}
+ description: Mapping of service endpoint -> protocol. Typically set
+ via parameter_defaults in the resource registry.
+ type: json
+
+resources:
+
+ CinderVolumeBase:
+ type: ../cinder-volume.yaml
+ properties:
+ EndpointMap: {get_param: EndpointMap}
+
+outputs:
+ role_data:
+ description: Role data for the Cinder Volume role.
+ value:
+ config_settings:
+ map_merge:
+ - get_attr: [CinderVolumeBase, role_data, config_settings]
+ - cinder::volume::manage_service: false
+ cinder::volume::enabled: false
+ step_config:
+ include ::tripleo::profile::pacemaker::cinder::volume