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