1 heat_template_version: pike
4 Openstack Zaqar service. Shared for all Heat services.
9 description: Dictionary packing service data
13 description: Mapping of service_name -> network name. Typically set
14 via parameter_defaults in the resource registry. This
15 mapping overrides those in ServiceNetMapDefaults.
19 description: Mapping of service endpoint -> protocol. Typically set
20 via parameter_defaults in the resource registry.
27 description: Role name on which the service is applied
31 description: Parameters specific to the role
35 description: Set to True to enable debugging on all services.
39 description: Set to True to enable debugging Zaqar service.
42 description: The password for Zaqar
48 description: Keystone region for endpoint
51 A hash of policies to configure for Zaqar.
52 e.g. { zaqar-context_is_admin: { key: context_is_admin, value: 'role:admin' } }
57 description: Set the number of workers for zaqar::wsgi::apache
58 default: '%{::os_workers}'
61 description: The messaging store for Zaqar
65 description: The management store for Zaqar
72 zaqar_workers_zero: {equals : [{get_param: ZaqarWorkers}, 0]}
73 service_debug_unset: {equals : [{get_param: ZaqarDebug}, '']}
74 zaqar_messaging_store_swift: {equals : [{get_param: ZaqarMessageStore}, 'swift']}
75 zaqar_management_store_sqlalchemy: {equals : [{get_param: ZaqarManagementStore}, 'sqlalchemy']}
82 ServiceData: {get_param: ServiceData}
83 ServiceNetMap: {get_param: ServiceNetMap}
84 DefaultPasswords: {get_param: DefaultPasswords}
85 EndpointMap: {get_param: EndpointMap}
86 EnableInternalTLS: {get_param: EnableInternalTLS}
90 description: Shared role data for the Zaqar services.
92 service_name: zaqar_api
95 - get_attr: [ApacheServiceBase, role_data, config_settings]
96 - zaqar::policy::policies: {get_param: ZaqarPolicies}
97 zaqar::keystone::authtoken::password: {get_param: ZaqarPassword}
98 zaqar::keystone::authtoken::project_name: 'service'
99 zaqar::keystone::authtoken::auth_url: {get_param: [EndpointMap, KeystoneInternal, uri_no_suffix]}
100 zaqar::keystone::authtoken::auth_uri: {get_param: [EndpointMap, KeystoneInternal, uri]}
101 zaqar::keystone::trust::auth_url: {get_param: [EndpointMap, KeystoneInternal, uri_no_suffix]}
104 - service_debug_unset
105 - {get_param: Debug }
106 - {get_param: ZaqarDebug }
107 zaqar::server::service_name: 'httpd'
108 zaqar::transport::websocket::bind: {get_param: [EndpointMap, ZaqarInternal, host]}
109 zaqar::wsgi::apache::ssl: {get_param: EnableInternalTLS}
110 zaqar::wsgi::apache::bind_host: {get_param: [ServiceNetMap, ZaqarApiNetwork]}
111 zaqar::message_pipeline: 'zaqar.notification.notifier'
112 zaqar::unreliable: true
113 zaqar::wsgi::apache::servername:
116 "%{hiera('fqdn_$NETWORK')}"
118 $NETWORK: {get_param: [ServiceNetMap, ZaqarApiNetwork]}
119 zaqar::message_store: {get_param: ZaqarMessageStore}
120 zaqar::management_store: {get_param: ZaqarManagementStore}
123 - zaqar_messaging_store_swift
125 zaqar::messaging::swift::uri:
128 - ['swift://zaqar:', {get_param: ZaqarPassword}, '@/service']
129 zaqar::messaging::swift::auth_url: {get_param: [EndpointMap, KeystoneInternal, uri_no_suffix] }
130 tripleo::profile::base::zaqar::messaging_store: 'swift'
134 - zaqar_management_store_sqlalchemy
136 tripleo::profile::base::zaqar::management_store: 'sqlalchemy'
137 zaqar::management::sqlalchemy::uri:
139 scheme: {get_param: [EndpointMap, MysqlInternal, protocol]}
141 password: {get_param: ZaqarPassword}
142 host: {get_param: [EndpointMap, MysqlInternal, host]}
145 read_default_file: /etc/my.cnf.d/tripleo.cnf
146 read_default_group: tripleo
152 - zaqar::wsgi::apache::workers: {get_param: ZaqarWorkers}
153 service_config_settings:
156 zaqar::keystone::auth::password: {get_param: ZaqarPassword}
157 zaqar::keystone::auth::public_url: {get_param: [EndpointMap, ZaqarPublic, uri]}
158 zaqar::keystone::auth::admin_url: {get_param: [EndpointMap, ZaqarAdmin, uri]}
159 zaqar::keystone::auth::internal_url: {get_param: [EndpointMap, ZaqarInternal, uri]}
160 zaqar::keystone::auth::region: {get_param: KeystoneRegion}
161 zaqar::keystone::auth::tenant: 'service'
162 zaqar::keystone::auth_websocket::password: {get_param: ZaqarPassword}
163 zaqar::keystone::auth_websocket::public_url: {get_param: [EndpointMap, ZaqarWebSocketPublic, uri]}
164 zaqar::keystone::auth_websocket::admin_url: {get_param: [EndpointMap, ZaqarWebSocketAdmin, uri]}
165 zaqar::keystone::auth_websocket::internal_url: {get_param: [EndpointMap, ZaqarWebSocketInternal, uri]}
166 zaqar::keystone::auth_websocket::region: {get_param: KeystoneRegion}
167 zaqar::keystone::auth_websocket::tenant: 'service'
168 zaqar::keystone::trust::password: {get_param: ZaqarPassword}
169 zaqar::keystone::trust::user_domain_name: 'Default'
172 - zaqar_management_store_sqlalchemy
174 zaqar::db::mysql::user: zaqar
175 zaqar::db::mysql::host: {get_param: [EndpointMap, MysqlInternal, host_nobrackets]}
176 zaqar::db::mysql::dbname: zaqar
177 zaqar::db::mysql::password: {get_param: ZaqarPassword}
178 zaqar::db::mysql::allowed_hosts:
180 - "%{hiera('mysql_bind_host')}"
183 include ::tripleo::profile::base::zaqar
185 get_attr: [ApacheServiceBase, role_data, metadata_settings]
188 expression: $.data.apache_upgrade + $.data.zaqar_upgrade
191 get_attr: [ApacheServiceBase, role_data, upgrade_tasks]
193 - name: Check if zaqar is deployed
194 command: systemctl is-enabled openstack-zaqar
197 register: zaqar_enabled
198 - name: "PreUpgrade step0,validation: Check if openstack-zaqar is running"
200 /usr/bin/systemctl show 'openstack-zaqar' --property ActiveState |
202 when: zaqar_enabled.rc == 0
203 tags: step0,validation
204 - name: Check for zaqar running under apache (post upgrade)
206 shell: "httpd -t -D DUMP_VHOSTS | grep -q zaqar_wsgi"
207 register: zaqar_apache
209 - name: Stop zaqar service (running under httpd)
211 service: name=httpd state=stopped
212 when: zaqar_apache.rc == 0
213 - name: Stop and disable zaqar service (pre-upgrade not under httpd)
215 when: zaqar_enabled.rc == 0
216 service: name=openstack-zaqar state=stopped enabled=no
217 - name: Install openstack-zaqar package if it was disabled
219 yum: name=openstack-zaqar state=latest
220 when: zaqar_enabled.rc != 0