Merge "Remove root_template and root_environment from capabilities-map.yaml"
[apex-tripleo-heat-templates.git] / puppet / services / zaqar.yaml
1 heat_template_version: ocata
2
3 description: >
4   Openstack Zaqar service. Shared for all Heat services.
5
6 parameters:
7   ServiceNetMap:
8     default: {}
9     description: Mapping of service_name -> network name. Typically set
10                  via parameter_defaults in the resource registry.  This
11                  mapping overrides those in ServiceNetMapDefaults.
12     type: json
13   EndpointMap:
14     default: {}
15     description: Mapping of service endpoint -> protocol. Typically set
16                  via parameter_defaults in the resource registry.
17     type: json
18   DefaultPasswords:
19     default: {}
20     type: json
21   Debug:
22     default: ''
23     description: Set to True to enable debugging on all services.
24     type: string
25   ZaqarPassword:
26     description: The password for Zaqar
27     type: string
28     hidden: true
29   KeystoneRegion:
30     type: string
31     default: 'regionOne'
32     description: Keystone region for endpoint
33   ZaqarPolicies:
34     description: |
35       A hash of policies to configure for Zaqar.
36       e.g. { zaqar-context_is_admin: { key: context_is_admin, value: 'role:admin' } }
37     default: {}
38     type: json
39
40
41 outputs:
42   role_data:
43     description: Shared role data for the Heat services.
44     value:
45       service_name: zaqar
46       config_settings:
47         zaqar::policy::policies: {get_param: ZaqarPolicies}
48         zaqar::keystone::authtoken::password: {get_param: ZaqarPassword}
49         zaqar::keystone::authtoken::project_name: 'service'
50         zaqar::keystone::authtoken::auth_url: {get_param: [EndpointMap, KeystoneInternal, uri_no_suffix]}
51         zaqar::keystone::authtoken::auth_uri: {get_param: [EndpointMap, KeystoneInternal, uri]}
52         zaqar::debug: {get_param: Debug}
53         zaqar::transport::websocket::bind: {get_param: [EndpointMap, ZaqarInternal, host]}
54         zaqar::transport::wsgi::bind: {get_param: [ServiceNetMap, ZaqarApiNetwork]}
55         zaqar::message_pipeline: 'zaqar.notification.notifier'
56         zaqar::unreliable: true
57       service_config_settings:
58         keystone:
59           zaqar::keystone::auth::password: {get_param: ZaqarPassword}
60           zaqar::keystone::auth::public_url: {get_param: [EndpointMap, ZaqarPublic, uri]}
61           zaqar::keystone::auth::admin_url: {get_param: [EndpointMap, ZaqarAdmin, uri]}
62           zaqar::keystone::auth::internal_url: {get_param: [EndpointMap, ZaqarInternal, uri]}
63           zaqar::keystone::auth::region: {get_param: KeystoneRegion}
64           zaqar::keystone::auth::tenant: 'service'
65           zaqar::keystone::auth_websocket::password: {get_param: ZaqarPassword}
66           zaqar::keystone::auth_websocket::public_url: {get_param: [EndpointMap, ZaqarWebSocketPublic, uri]}
67           zaqar::keystone::auth_websocket::admin_url: {get_param: [EndpointMap, ZaqarWebSocketAdmin, uri]}
68           zaqar::keystone::auth_websocket::internal_url: {get_param: [EndpointMap, ZaqarWebSocketInternal, uri]}
69           zaqar::keystone::auth_websocket::region: {get_param: KeystoneRegion}
70           zaqar::keystone::auth_websocket::tenant: 'service'
71
72       step_config: |
73         include ::tripleo::profile::base::zaqar
74       upgrade_tasks:
75         - name: Check if zaqar is deployed
76           command: systemctl is-enabled openstack-zaqar
77           tags: common
78           ignore_errors: True
79           register: zaqar_enabled
80         - name: "PreUpgrade step0,validation: Check if openstack-zaqar is running"
81           shell: >
82             /usr/bin/systemctl show 'openstack-zaqar' --property ActiveState |
83             grep '\bactive\b'
84           when: zaqar_enabled.rc == 0
85           tags: step0,validation
86         - name: Stop zaqar service
87           tags: step1
88           when: zaqar_enabled.rc == 0
89           service: name=openstack-zaqar state=stopped
90         - name: Install openstack-zaqar package if it was disabled
91           tags: step3
92           yum: name=openstack-zaqar state=latest
93           when: zaqar_enabled.rc != 0