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 Heat services.
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]}
103 - service_debug_unset
104 - {get_param: Debug }
105 - {get_param: ZaqarDebug }
106 zaqar::server::service_name: 'httpd'
107 zaqar::transport::websocket::bind: {get_param: [EndpointMap, ZaqarInternal, host]}
108 zaqar::wsgi::apache::ssl: false
109 zaqar::wsgi::apache::bind_host: {get_param: [ServiceNetMap, ZaqarApiNetwork]}
110 zaqar::message_pipeline: 'zaqar.notification.notifier'
111 zaqar::unreliable: true
112 zaqar::wsgi::apache::servername:
115 "%{hiera('fqdn_$NETWORK')}"
117 $NETWORK: {get_param: [ServiceNetMap, ZaqarApiNetwork]}
118 zaqar::message_store: {get_param: ZaqarMessageStore}
119 zaqar::management_store: {get_param: ZaqarManagementStore}
122 - zaqar_messaging_store_swift
124 zaqar::messaging::swift::uri:
127 - ['swift://zaqar:', {get_param: ZaqarPassword}, '@/service']
128 zaqar::messaging::swift::auth_url: {get_param: [EndpointMap, KeystoneInternal, uri_no_suffix] }
129 tripleo::profile::base::zaqar::messaging_store: 'swift'
133 - zaqar_management_store_sqlalchemy
135 tripleo::profile::base::zaqar::management_store: 'sqlalchemy'
136 zaqar::management::sqlalchemy::uri:
138 scheme: {get_param: [EndpointMap, MysqlInternal, protocol]}
140 password: {get_param: ZaqarPassword}
141 host: {get_param: [EndpointMap, MysqlInternal, host]}
144 read_default_file: /etc/my.cnf.d/tripleo.cnf
145 read_default_group: tripleo
151 - zaqar::wsgi::apache::workers: {get_param: ZaqarWorkers}
152 service_config_settings:
155 zaqar::keystone::auth::password: {get_param: ZaqarPassword}
156 zaqar::keystone::auth::public_url: {get_param: [EndpointMap, ZaqarPublic, uri]}
157 zaqar::keystone::auth::admin_url: {get_param: [EndpointMap, ZaqarAdmin, uri]}
158 zaqar::keystone::auth::internal_url: {get_param: [EndpointMap, ZaqarInternal, uri]}
159 zaqar::keystone::auth::region: {get_param: KeystoneRegion}
160 zaqar::keystone::auth::tenant: 'service'
161 zaqar::keystone::auth_websocket::password: {get_param: ZaqarPassword}
162 zaqar::keystone::auth_websocket::public_url: {get_param: [EndpointMap, ZaqarWebSocketPublic, uri]}
163 zaqar::keystone::auth_websocket::admin_url: {get_param: [EndpointMap, ZaqarWebSocketAdmin, uri]}
164 zaqar::keystone::auth_websocket::internal_url: {get_param: [EndpointMap, ZaqarWebSocketInternal, uri]}
165 zaqar::keystone::auth_websocket::region: {get_param: KeystoneRegion}
166 zaqar::keystone::auth_websocket::tenant: 'service'
169 - zaqar_management_store_sqlalchemy
171 zaqar::db::mysql::user: zaqar
172 zaqar::db::mysql::host: {get_param: [EndpointMap, MysqlInternal, host_nobrackets]}
173 zaqar::db::mysql::dbname: zaqar
174 zaqar::db::mysql::password: {get_param: ZaqarPassword}
175 zaqar::db::mysql::allowed_hosts:
177 - "%{hiera('mysql_bind_host')}"
180 include ::tripleo::profile::base::zaqar
183 expression: $.data.apache_upgrade + $.data.zaqar_upgrade
186 get_attr: [ApacheServiceBase, role_data, upgrade_tasks]
188 - name: Check if zaqar is deployed
189 command: systemctl is-enabled openstack-zaqar
192 register: zaqar_enabled
193 - name: "PreUpgrade step0,validation: Check if openstack-zaqar is running"
195 /usr/bin/systemctl show 'openstack-zaqar' --property ActiveState |
197 when: zaqar_enabled.rc == 0
198 tags: step0,validation
199 - name: Check for zaqar running under apache (post upgrade)
201 shell: "httpd -t -D DUMP_VHOSTS | grep -q zaqar_wsgi"
202 register: zaqar_apache
204 - name: Stop zaqar service (running under httpd)
206 service: name=httpd state=stopped
207 when: zaqar_apache.rc == 0
208 - name: Stop and disable zaqar service (pre-upgrade not under httpd)
210 when: zaqar_enabled.rc == 0
211 service: name=openstack-zaqar state=stopped enabled=no
212 - name: Install openstack-zaqar package if it was disabled
214 yum: name=openstack-zaqar state=latest
215 when: zaqar_enabled.rc != 0