1 heat_template_version: ocata
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: Mapping of service endpoint -> protocol. Typically set
28 via parameter_defaults in the resource registry.
33 description: Keystone region for endpoint
34 MonitoringSubscriptionCinderApi:
35 default: 'overcloud-cinder-api'
37 CinderApiLoggingSource:
40 tag: openstack.cinder.api
41 path: /var/log/cinder/cinder-api.log
44 description: Set the number of workers for cinder::wsgi::apache
45 default: '%{::os_workers}'
51 A hash of policies to configure for Cinder API.
52 e.g. { cinder-context_is_admin: { key: context_is_admin, value: 'role:admin' } }
57 cinder_workers_zero: {equals : [{get_param: CinderWorkers}, 0]}
64 ServiceNetMap: {get_param: ServiceNetMap}
65 DefaultPasswords: {get_param: DefaultPasswords}
66 EndpointMap: {get_param: EndpointMap}
67 EnableInternalTLS: {get_param: EnableInternalTLS}
70 type: ./cinder-base.yaml
72 ServiceNetMap: {get_param: ServiceNetMap}
73 DefaultPasswords: {get_param: DefaultPasswords}
74 EndpointMap: {get_param: EndpointMap}
78 description: Role data for the Cinder API role.
80 service_name: cinder_api
81 monitoring_subscription: {get_param: MonitoringSubscriptionCinderApi}
82 logging_source: {get_param: CinderApiLoggingSource}
87 - get_attr: [CinderBase, role_data, config_settings]
88 - get_attr: [ApacheServiceBase, role_data, config_settings]
89 - cinder::keystone::authtoken::auth_uri: {get_param: [EndpointMap, KeystoneInternal, uri_no_suffix]}
90 cinder::keystone::authtoken::auth_url: {get_param: [EndpointMap, KeystoneInternal, uri_no_suffix]}
91 cinder::keystone::authtoken::password: {get_param: CinderPassword}
92 cinder::keystone::authtoken::project_name: 'service'
93 cinder::keystone::authtoken::user_domain_name: 'Default'
94 cinder::keystone::authtoken::project_domain_name: 'Default'
95 cinder::policy::policies: {get_param: CinderApiPolicies}
96 cinder::api::enable_proxy_headers_parsing: true
98 cinder::api::nova_catalog_info: 'compute:nova:internalURL'
99 cinder::api::nova_catalog_admin_info: 'compute:nova:adminURL'
100 # TODO(emilien) move it to puppet-cinder
102 DEFAULT/swift_catalog_info:
103 value: 'object-store:swift:internalURL'
104 tripleo::profile::base::cinder::cinder_enable_db_purge: {get_param: CinderEnableDBPurge}
105 tripleo.cinder_api.firewall_rules:
110 cinder::api::bind_host:
113 "%{hiera('fqdn_$NETWORK')}"
115 $NETWORK: {get_param: [ServiceNetMap, CinderApiNetwork]}
116 cinder::wsgi::apache::ssl: {get_param: EnableInternalTLS}
117 cinder::api::service_name: 'httpd'
118 # NOTE: bind IP is found in Heat replacing the network name with the local node IP
119 # for the given network; replacement examples (eg. for internal_api):
121 # internal_api_uri -> [IP]
122 # internal_api_subnet - > IP/CIDR
123 cinder::wsgi::apache::bind_host: {get_param: [ServiceNetMap, CinderApiNetwork]}
124 cinder::wsgi::apache::servername:
127 "%{hiera('fqdn_$NETWORK')}"
129 $NETWORK: {get_param: [ServiceNetMap, CinderApiNetwork]}
132 - cinder_workers_zero
134 - cinder::wsgi::apache::workers: {get_param: CinderWorkers}
136 include ::tripleo::profile::base::cinder::api
137 service_config_settings:
139 cinder::keystone::auth::tenant: 'service'
140 cinder::keystone::auth::public_url: {get_param: [EndpointMap, CinderPublic, uri]}
141 cinder::keystone::auth::internal_url: {get_param: [EndpointMap, CinderInternal, uri]}
142 cinder::keystone::auth::admin_url: {get_param: [EndpointMap, CinderAdmin, uri]}
143 cinder::keystone::auth::public_url_v2: {get_param: [EndpointMap, CinderV2Public, uri]}
144 cinder::keystone::auth::internal_url_v2: {get_param: [EndpointMap, CinderV2Internal, uri]}
145 cinder::keystone::auth::admin_url_v2: {get_param: [EndpointMap, CinderV2Admin, uri]}
146 cinder::keystone::auth::public_url_v3: {get_param: [EndpointMap, CinderV3Public, uri]}
147 cinder::keystone::auth::internal_url_v3: {get_param: [EndpointMap, CinderV3Internal, uri]}
148 cinder::keystone::auth::admin_url_v3: {get_param: [EndpointMap, CinderV3Admin, uri]}
149 cinder::keystone::auth::password: {get_param: CinderPassword}
150 cinder::keystone::auth::region: {get_param: KeystoneRegion}
152 cinder::db::mysql::password: {get_param: CinderPassword}
153 cinder::db::mysql::user: cinder
154 cinder::db::mysql::host: {get_param: [EndpointMap, MysqlInternal, host_nobrackets]}
155 cinder::db::mysql::dbname: cinder
156 cinder::db::mysql::allowed_hosts:
158 - "%{hiera('mysql_bind_host')}"
160 get_attr: [ApacheServiceBase, role_data, metadata_settings]
162 - name: Check if cinder_api is deployed
163 command: systemctl is-enabled openstack-cinder-api
166 register: cinder_api_enabled
167 - name: "PreUpgrade step0,validation: Check service openstack-cinder-api is running"
168 shell: /usr/bin/systemctl show 'openstack-cinder-api' --property ActiveState | grep '\bactive\b'
169 when: cinder_api_enabled.rc == 0
170 tags: step0,validation
171 - name: check for cinder running under apache (post upgrade)
173 shell: "httpd -t -D DUMP_VHOSTS | grep -q cinder"
174 register: cinder_apache
176 - name: Stop cinder_api service (running under httpd)
178 service: name=httpd state=stopped
179 when: cinder_apache.rc == 0
180 - name: Stop and disable cinder_api service (pre-upgrade not under httpd)
182 when: cinder_api_enabled.rc == 0
183 service: name=openstack-cinder-api state=stopped enabled=no