Merge "Remove root_template and root_environment from capabilities-map.yaml"
[apex-tripleo-heat-templates.git] / docker / services / aodh-notifier.yaml
1 heat_template_version: ocata
2
3 description: >
4   OpenStack containerized Aodh Notifier service
5
6 parameters:
7   DockerNamespace:
8     description: namespace
9     default: 'tripleoupstream'
10     type: string
11   DockerAodhNotifierImage:
12     description: image
13     default: 'centos-binary-aodh-notifier:latest'
14     type: string
15   EndpointMap:
16     default: {}
17     description: Mapping of service endpoint -> protocol. Typically set
18                  via parameter_defaults in the resource registry.
19     type: json
20   ServiceNetMap:
21     default: {}
22     description: Mapping of service_name -> network name. Typically set
23                  via parameter_defaults in the resource registry.  This
24                  mapping overrides those in ServiceNetMapDefaults.
25     type: json
26   DefaultPasswords:
27     default: {}
28     type: json
29
30 resources:
31
32   ContainersCommon:
33     type: ./containers-common.yaml
34
35   AodhNotifierBase:
36     type: ../../puppet/services/aodh-notifier.yaml
37     properties:
38       EndpointMap: {get_param: EndpointMap}
39       ServiceNetMap: {get_param: ServiceNetMap}
40       DefaultPasswords: {get_param: DefaultPasswords}
41
42 outputs:
43   role_data:
44     description: Role data for the Aodh API role.
45     value:
46       service_name: {get_attr: [AodhNotifierBase, role_data, service_name]}
47       config_settings:
48         map_merge:
49           - get_attr: [AodhNotifierBase, role_data, config_settings]
50       step_config: &step_config
51         get_attr: [AodhNotifierBase, role_data, step_config]
52       service_config_settings: {get_attr: [AodhNotifierBase, role_data, service_config_settings]}
53       # BEGIN DOCKER SETTINGS
54       puppet_config:
55         config_volume: aodh
56         puppet_tags: aodh_config
57         step_config: *step_config
58         config_image: &aodh_notifier_image
59           list_join:
60             - '/'
61             - [ {get_param: DockerNamespace}, {get_param: DockerAodhNotifierImage} ]
62       kolla_config:
63         /var/lib/kolla/config_files/aodh-notifier.json:
64           command: /usr/bin/aodh-notifier
65       docker_config:
66         step_4:
67           aodh_notifier:
68             image: *aodh_notifier_image
69             net: host
70             privileged: false
71             restart: always
72             volumes:
73               yaql:
74                 expression: $.data.common.concat($.data.service)
75                 data:
76                   common: {get_attr: [ContainersCommon, volumes]}
77                   service:
78                     - /var/lib/kolla/config_files/aodh-notifier.json:/var/lib/kolla/config_files/config.json:ro
79                     - /var/lib/config-data/aodh/etc/aodh/:/etc/aodh/:ro
80             environment:
81               - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
82       upgrade_tasks:
83         - name: Stop and disable openstack-aodh-notifier service
84           tags: step2
85           service: name=openstack-aodh-notifier.service state=stopped enabled=no