aboutsummaryrefslogtreecommitdiffstats
path: root/puppet/services
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/services
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/services')
-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
7 files changed, 288 insertions, 0 deletions
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