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 cinder_workers_zero: {equals : [{get_param: CinderWorkers}, 0]}
58 ServiceNetMap: {get_param: ServiceNetMap}
59 DefaultPasswords: {get_param: DefaultPasswords}
60 EndpointMap: {get_param: EndpointMap}
61 EnableInternalTLS: {get_param: EnableInternalTLS}
64 type: ./cinder-base.yaml
66 ServiceNetMap: {get_param: ServiceNetMap}
67 DefaultPasswords: {get_param: DefaultPasswords}
68 EndpointMap: {get_param: EndpointMap}
72 description: Role data for the Cinder API role.
74 service_name: cinder_api
75 monitoring_subscription: {get_param: MonitoringSubscriptionCinderApi}
76 logging_source: {get_param: CinderApiLoggingSource}
81 - get_attr: [CinderBase, role_data, config_settings]
82 - get_attr: [ApacheServiceBase, role_data, config_settings]
83 - cinder::keystone::authtoken::auth_uri: {get_param: [EndpointMap, KeystoneInternal, uri]}
84 cinder::keystone::authtoken::auth_url: {get_param: [EndpointMap, KeystoneInternal, uri_no_suffix]}
85 cinder::keystone::authtoken::password: {get_param: CinderPassword}
86 cinder::keystone::authtoken::project_name: 'service'
87 cinder::api::enable_proxy_headers_parsing: true
89 cinder::api::nova_catalog_info: 'compute:nova:internalURL'
90 cinder::api::nova_catalog_admin_info: 'compute:nova:adminURL'
91 # TODO(emilien) move it to puppet-cinder
93 DEFAULT/swift_catalog_info:
94 value: 'object-store:swift:internalURL'
95 tripleo::profile::base::cinder::cinder_enable_db_purge: {get_param: CinderEnableDBPurge}
96 tripleo.cinder_api.firewall_rules:
101 cinder::api::bind_host:
104 "%{hiera('fqdn_$NETWORK')}"
106 $NETWORK: {get_param: [ServiceNetMap, CinderApiNetwork]}
107 cinder::wsgi::apache::ssl: {get_param: EnableInternalTLS}
108 cinder::api::service_name: 'httpd'
109 # NOTE: bind IP is found in Heat replacing the network name with the local node IP
110 # for the given network; replacement examples (eg. for internal_api):
112 # internal_api_uri -> [IP]
113 # internal_api_subnet - > IP/CIDR
114 cinder::wsgi::apache::bind_host: {get_param: [ServiceNetMap, CinderApiNetwork]}
115 cinder::wsgi::apache::servername:
118 "%{hiera('fqdn_$NETWORK')}"
120 $NETWORK: {get_param: [ServiceNetMap, CinderApiNetwork]}
123 - cinder_workers_zero
125 - cinder::wsgi::apache::workers: {get_param: CinderWorkers}
127 include ::tripleo::profile::base::cinder::api
128 service_config_settings:
130 cinder::keystone::auth::tenant: 'service'
131 cinder::keystone::auth::public_url: {get_param: [EndpointMap, CinderPublic, uri]}
132 cinder::keystone::auth::internal_url: {get_param: [EndpointMap, CinderInternal, uri]}
133 cinder::keystone::auth::admin_url: {get_param: [EndpointMap, CinderAdmin, uri]}
134 cinder::keystone::auth::public_url_v2: {get_param: [EndpointMap, CinderV2Public, uri]}
135 cinder::keystone::auth::internal_url_v2: {get_param: [EndpointMap, CinderV2Internal, uri]}
136 cinder::keystone::auth::admin_url_v2: {get_param: [EndpointMap, CinderV2Admin, uri]}
137 cinder::keystone::auth::public_url_v3: {get_param: [EndpointMap, CinderV3Public, uri]}
138 cinder::keystone::auth::internal_url_v3: {get_param: [EndpointMap, CinderV3Internal, uri]}
139 cinder::keystone::auth::admin_url_v3: {get_param: [EndpointMap, CinderV3Admin, uri]}
140 cinder::keystone::auth::password: {get_param: CinderPassword}
141 cinder::keystone::auth::region: {get_param: KeystoneRegion}
143 cinder::db::mysql::password: {get_param: CinderPassword}
144 cinder::db::mysql::user: cinder
145 cinder::db::mysql::host: {get_param: [EndpointMap, MysqlInternal, host_nobrackets]}
146 cinder::db::mysql::dbname: cinder
147 cinder::db::mysql::allowed_hosts:
149 - "%{hiera('mysql_bind_host')}"
151 get_attr: [ApacheServiceBase, role_data, metadata_settings]
153 - name: "PreUpgrade step0,validation: Check service openstack-cinder-api is running"
154 shell: /usr/bin/systemctl show 'openstack-cinder-api' --property ActiveState | grep '\bactive\b'
155 tags: step0,validation
156 - name: check for cinder running under apache (post upgrade)
158 shell: "apachectl -t -D DUMP_VHOSTS | grep -q cinder"
159 register: cinder_apache
161 - name: Stop cinder_api service (running under httpd)
163 service: name=httpd state=stopped
164 when: "cinder_apache.rc == 0"
165 - name: Stop and disable cinder_api service (pre-upgrade not under httpd)
167 service: name=openstack-cinder-api state=stopped enabled=no