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: Mapping of service_name -> network name. Typically set
19 via parameter_defaults in the resource registry. This
20 mapping overrides those in ServiceNetMapDefaults.
27 description: Role name on which the service is applied
31 description: Parameters specific to the role
35 description: Mapping of service endpoint -> protocol. Typically set
36 via parameter_defaults in the resource registry.
41 description: Keystone region for endpoint
42 MonitoringSubscriptionCinderApi:
43 default: 'overcloud-cinder-api'
45 CinderApiLoggingSource:
48 tag: openstack.cinder.api
49 path: /var/log/cinder/cinder-api.log
52 description: Set the number of workers for cinder::wsgi::apache
53 default: '%{::os_workers}'
59 A hash of policies to configure for Cinder API.
60 e.g. { cinder-context_is_admin: { key: context_is_admin, value: 'role:admin' } }
65 cinder_workers_zero: {equals : [{get_param: CinderWorkers}, 0]}
72 ServiceNetMap: {get_param: ServiceNetMap}
73 DefaultPasswords: {get_param: DefaultPasswords}
74 EndpointMap: {get_param: EndpointMap}
75 RoleName: {get_param: RoleName}
76 RoleParameters: {get_param: RoleParameters}
77 EnableInternalTLS: {get_param: EnableInternalTLS}
80 type: ./cinder-base.yaml
82 ServiceNetMap: {get_param: ServiceNetMap}
83 DefaultPasswords: {get_param: DefaultPasswords}
84 EndpointMap: {get_param: EndpointMap}
85 RoleName: {get_param: RoleName}
86 RoleParameters: {get_param: RoleParameters}
90 description: Role data for the Cinder API role.
92 service_name: cinder_api
93 monitoring_subscription: {get_param: MonitoringSubscriptionCinderApi}
94 logging_source: {get_param: CinderApiLoggingSource}
99 - get_attr: [CinderBase, role_data, config_settings]
100 - get_attr: [ApacheServiceBase, role_data, config_settings]
101 - cinder::keystone::authtoken::auth_uri: {get_param: [EndpointMap, KeystoneInternal, uri_no_suffix]}
102 cinder::keystone::authtoken::auth_url: {get_param: [EndpointMap, KeystoneInternal, uri_no_suffix]}
103 cinder::keystone::authtoken::password: {get_param: CinderPassword}
104 cinder::keystone::authtoken::project_name: 'service'
105 cinder::keystone::authtoken::user_domain_name: 'Default'
106 cinder::keystone::authtoken::project_domain_name: 'Default'
107 cinder::policy::policies: {get_param: CinderApiPolicies}
108 cinder::api::enable_proxy_headers_parsing: true
110 cinder::api::nova_catalog_info: 'compute:nova:internalURL'
111 cinder::api::nova_catalog_admin_info: 'compute:nova:adminURL'
112 # TODO(emilien) move it to puppet-cinder
114 DEFAULT/swift_catalog_info:
115 value: 'object-store:swift:internalURL'
116 tripleo::profile::base::cinder::cinder_enable_db_purge: {get_param: CinderEnableDBPurge}
117 tripleo.cinder_api.firewall_rules:
122 cinder::api::bind_host:
125 "%{hiera('fqdn_$NETWORK')}"
127 $NETWORK: {get_param: [ServiceNetMap, CinderApiNetwork]}
128 cinder::wsgi::apache::ssl: {get_param: EnableInternalTLS}
129 cinder::api::service_name: 'httpd'
130 # NOTE: bind IP is found in Heat replacing the network name with the local node IP
131 # for the given network; replacement examples (eg. for internal_api):
133 # internal_api_uri -> [IP]
134 # internal_api_subnet - > IP/CIDR
135 cinder::wsgi::apache::bind_host: {get_param: [ServiceNetMap, CinderApiNetwork]}
136 cinder::wsgi::apache::servername:
139 "%{hiera('fqdn_$NETWORK')}"
141 $NETWORK: {get_param: [ServiceNetMap, CinderApiNetwork]}
144 - cinder_workers_zero
146 - cinder::wsgi::apache::workers: {get_param: CinderWorkers}
148 include ::tripleo::profile::base::cinder::api
149 service_config_settings:
151 cinder::keystone::auth::tenant: 'service'
152 cinder::keystone::auth::public_url: {get_param: [EndpointMap, CinderPublic, uri]}
153 cinder::keystone::auth::internal_url: {get_param: [EndpointMap, CinderInternal, uri]}
154 cinder::keystone::auth::admin_url: {get_param: [EndpointMap, CinderAdmin, uri]}
155 cinder::keystone::auth::public_url_v2: {get_param: [EndpointMap, CinderV2Public, uri]}
156 cinder::keystone::auth::internal_url_v2: {get_param: [EndpointMap, CinderV2Internal, uri]}
157 cinder::keystone::auth::admin_url_v2: {get_param: [EndpointMap, CinderV2Admin, uri]}
158 cinder::keystone::auth::public_url_v3: {get_param: [EndpointMap, CinderV3Public, uri]}
159 cinder::keystone::auth::internal_url_v3: {get_param: [EndpointMap, CinderV3Internal, uri]}
160 cinder::keystone::auth::admin_url_v3: {get_param: [EndpointMap, CinderV3Admin, uri]}
161 cinder::keystone::auth::password: {get_param: CinderPassword}
162 cinder::keystone::auth::region: {get_param: KeystoneRegion}
164 cinder::db::mysql::password: {get_param: CinderPassword}
165 cinder::db::mysql::user: cinder
166 cinder::db::mysql::host: {get_param: [EndpointMap, MysqlInternal, host_nobrackets]}
167 cinder::db::mysql::dbname: cinder
168 cinder::db::mysql::allowed_hosts:
170 - "%{hiera('mysql_bind_host')}"
172 get_attr: [ApacheServiceBase, role_data, metadata_settings]
175 expression: $.data.apache_upgrade + $.data.cinder_api_upgrade
178 get_attr: [ApacheServiceBase, role_data, upgrade_tasks]
180 - name: Check if cinder_api is deployed
181 command: systemctl is-enabled openstack-cinder-api
184 register: cinder_api_enabled
185 - name: "PreUpgrade step0,validation: Check service openstack-cinder-api is running"
186 shell: /usr/bin/systemctl show 'openstack-cinder-api' --property ActiveState | grep '\bactive\b'
187 when: cinder_api_enabled.rc == 0
188 tags: step0,validation
189 - name: check for cinder running under apache (post upgrade)
191 shell: "httpd -t -D DUMP_VHOSTS | grep -q cinder"
192 register: cinder_apache
194 - name: Stop cinder_api service (running under httpd)
196 service: name=httpd state=stopped
197 when: cinder_apache.rc == 0
198 - name: Stop and disable cinder_api service (pre-upgrade not under httpd)
200 when: cinder_api_enabled.rc == 0
201 service: name=openstack-cinder-api state=stopped enabled=no