1 heat_template_version: pike
4 OpenStack Cinder API service configured with Puppet
10 Whether to create cron job for purging soft deleted rows in Cinder database.
13 description: The password for the cinder service account, used by cinder-api.
18 description: Dictionary packing service data
22 description: Mapping of service_name -> network name. Typically set
23 via parameter_defaults in the resource registry. This
24 mapping overrides those in ServiceNetMapDefaults.
31 description: Role name on which the service is applied
35 description: Parameters specific to the role
39 description: Mapping of service endpoint -> protocol. Typically set
40 via parameter_defaults in the resource registry.
45 description: Keystone region for endpoint
46 MonitoringSubscriptionCinderApi:
47 default: 'overcloud-cinder-api'
49 CinderApiLoggingSource:
52 tag: openstack.cinder.api
53 path: /var/log/cinder/cinder-api.log
56 description: Set the number of workers for cinder::wsgi::apache
57 default: '%{::os_workers}'
63 A hash of policies to configure for Cinder API.
64 e.g. { cinder-context_is_admin: { key: context_is_admin, value: 'role:admin' } }
69 default: 'messagingv2'
70 description: Driver or drivers to handle sending notifications.
72 - allowed_values: [ 'messagingv2', 'noop' ]
75 cinder_workers_zero: {equals : [{get_param: CinderWorkers}, 0]}
82 ServiceData: {get_param: ServiceData}
83 ServiceNetMap: {get_param: ServiceNetMap}
84 DefaultPasswords: {get_param: DefaultPasswords}
85 EndpointMap: {get_param: EndpointMap}
86 RoleName: {get_param: RoleName}
87 RoleParameters: {get_param: RoleParameters}
88 EnableInternalTLS: {get_param: EnableInternalTLS}
91 type: ./cinder-base.yaml
93 ServiceData: {get_param: ServiceData}
94 ServiceNetMap: {get_param: ServiceNetMap}
95 DefaultPasswords: {get_param: DefaultPasswords}
96 EndpointMap: {get_param: EndpointMap}
97 RoleName: {get_param: RoleName}
98 RoleParameters: {get_param: RoleParameters}
102 description: Role data for the Cinder API role.
104 service_name: cinder_api
105 monitoring_subscription: {get_param: MonitoringSubscriptionCinderApi}
106 logging_source: {get_param: CinderApiLoggingSource}
111 - get_attr: [CinderBase, role_data, config_settings]
112 - get_attr: [ApacheServiceBase, role_data, config_settings]
113 - cinder::keystone::authtoken::auth_uri: {get_param: [EndpointMap, KeystoneInternal, uri_no_suffix]}
114 cinder::keystone::authtoken::auth_url: {get_param: [EndpointMap, KeystoneInternal, uri_no_suffix]}
115 cinder::keystone::authtoken::password: {get_param: CinderPassword}
116 cinder::keystone::authtoken::project_name: 'service'
117 cinder::keystone::authtoken::user_domain_name: 'Default'
118 cinder::keystone::authtoken::project_domain_name: 'Default'
119 cinder::policy::policies: {get_param: CinderApiPolicies}
120 cinder::ceilometer::notification_driver: {get_param: NotificationDriver}
121 cinder::api::enable_proxy_headers_parsing: true
123 cinder::api::nova_catalog_info: 'compute:nova:internalURL'
124 cinder::api::nova_catalog_admin_info: 'compute:nova:adminURL'
125 # TODO(emilien) move it to puppet-cinder
127 DEFAULT/swift_catalog_info:
128 value: 'object-store:swift:internalURL'
129 tripleo::profile::base::cinder::cinder_enable_db_purge: {get_param: CinderEnableDBPurge}
130 tripleo.cinder_api.firewall_rules:
135 cinder::api::bind_host:
138 "%{hiera('fqdn_$NETWORK')}"
140 $NETWORK: {get_param: [ServiceNetMap, CinderApiNetwork]}
141 cinder::wsgi::apache::ssl: {get_param: EnableInternalTLS}
142 cinder::api::service_name: 'httpd'
143 # NOTE: bind IP is found in Heat replacing the network name with the local node IP
144 # for the given network; replacement examples (eg. for internal_api):
146 # internal_api_uri -> [IP]
147 # internal_api_subnet - > IP/CIDR
148 cinder::wsgi::apache::bind_host: {get_param: [ServiceNetMap, CinderApiNetwork]}
149 cinder::wsgi::apache::servername:
152 "%{hiera('fqdn_$NETWORK')}"
154 $NETWORK: {get_param: [ServiceNetMap, CinderApiNetwork]}
157 - cinder_workers_zero
159 - cinder::wsgi::apache::workers: {get_param: CinderWorkers}
161 include ::tripleo::profile::base::cinder::api
162 service_config_settings:
164 cinder::keystone::auth::tenant: 'service'
165 cinder::keystone::auth::public_url: {get_param: [EndpointMap, CinderPublic, uri]}
166 cinder::keystone::auth::internal_url: {get_param: [EndpointMap, CinderInternal, uri]}
167 cinder::keystone::auth::admin_url: {get_param: [EndpointMap, CinderAdmin, uri]}
168 cinder::keystone::auth::public_url_v2: {get_param: [EndpointMap, CinderV2Public, uri]}
169 cinder::keystone::auth::internal_url_v2: {get_param: [EndpointMap, CinderV2Internal, uri]}
170 cinder::keystone::auth::admin_url_v2: {get_param: [EndpointMap, CinderV2Admin, uri]}
171 cinder::keystone::auth::public_url_v3: {get_param: [EndpointMap, CinderV3Public, uri]}
172 cinder::keystone::auth::internal_url_v3: {get_param: [EndpointMap, CinderV3Internal, uri]}
173 cinder::keystone::auth::admin_url_v3: {get_param: [EndpointMap, CinderV3Admin, uri]}
174 cinder::keystone::auth::password: {get_param: CinderPassword}
175 cinder::keystone::auth::region: {get_param: KeystoneRegion}
177 cinder::db::mysql::password: {get_param: CinderPassword}
178 cinder::db::mysql::user: cinder
179 cinder::db::mysql::host: {get_param: [EndpointMap, MysqlInternal, host_nobrackets]}
180 cinder::db::mysql::dbname: cinder
181 cinder::db::mysql::allowed_hosts:
183 - "%{hiera('mysql_bind_host')}"
185 get_attr: [ApacheServiceBase, role_data, metadata_settings]
188 expression: $.data.apache_upgrade + $.data.cinder_api_upgrade
191 get_attr: [ApacheServiceBase, role_data, upgrade_tasks]
193 - name: Check if cinder_api is deployed
194 command: systemctl is-enabled openstack-cinder-api
197 register: cinder_api_enabled
198 - name: "PreUpgrade step0,validation: Check service openstack-cinder-api is running"
199 shell: /usr/bin/systemctl show 'openstack-cinder-api' --property ActiveState | grep '\bactive\b'
200 when: cinder_api_enabled.rc == 0
201 tags: step0,validation
202 - name: check for cinder running under apache (post upgrade)
204 shell: "httpd -t -D DUMP_VHOSTS | grep -q cinder"
205 register: cinder_apache
207 - name: Stop cinder_api service (running under httpd)
209 service: name=httpd state=stopped
210 when: cinder_apache.rc == 0
211 - name: Stop and disable cinder_api service (pre-upgrade not under httpd)
213 when: cinder_api_enabled.rc == 0
214 service: name=openstack-cinder-api state=stopped enabled=no