Merge "Role Specific paramaeter support for neutron-ovs-dpdk-agent service"
[apex-tripleo-heat-templates.git] / puppet / services / mistral-engine.yaml
1 heat_template_version: pike
2
3 description: >
4   Openstack Mistral Engine service configured with Puppet
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   DefaultPasswords:
14     default: {}
15     type: json
16   RoleName:
17     default: ''
18     description: Role name on which the service is applied
19     type: string
20   RoleParameters:
21     default: {}
22     description: Parameters specific to the role
23     type: json
24   EndpointMap:
25     default: {}
26     description: Mapping of service endpoint -> protocol. Typically set
27                  via parameter_defaults in the resource registry.
28     type: json
29
30 resources:
31   MistralBase:
32     type: ./mistral-base.yaml
33     properties:
34       ServiceNetMap: {get_param: ServiceNetMap}
35       DefaultPasswords: {get_param: DefaultPasswords}
36       EndpointMap: {get_param: EndpointMap}
37       RoleName: {get_param: RoleName}
38       RoleParameters: {get_param: RoleParameters}
39
40 outputs:
41   role_data:
42     description: Role data for the Mistral Engine role.
43     value:
44       service_name: mistral_engine
45       config_settings:
46         get_attr: [MistralBase, role_data, config_settings]
47       step_config: |
48         include ::tripleo::profile::base::mistral::engine
49       upgrade_tasks:
50         - name: Check if mistral engine is deployed
51           command: systemctl is-enabled openstack-mistral-engine
52           tags: common
53           ignore_errors: True
54           register: mistral_engine_enabled
55         - name: "PreUpgrade step0,validation: Check if openstack-mistral-engine is running"
56           shell: >
57             /usr/bin/systemctl show 'openstack-mistral-engine' --property ActiveState |
58             grep '\bactive\b'
59           when: mistral_engine_enabled.rc == 0
60           tags: step0,validation
61         - name: Stop mistral_engine service
62           tags: step1
63           service: name=openstack-mistral-engine state=stopped
64         - name: Install openstack-mistral-engine package if it was disabled
65           tags: step3
66           yum: name=openstack-mistral-engine state=latest
67           when: mistral_engine_enabled.rc != 0