Merge "Fix typo in haproxy docker mapping"
[apex-tripleo-heat-templates.git] / docker / services / gnocchi-metricd.yaml
1 heat_template_version: pike
2
3 description: >
4   OpenStack containerized Gnocchi Metricd service
5
6 parameters:
7   DockerNamespace:
8     description: namespace
9     default: 'tripleoupstream'
10     type: string
11   DockerGnocchiMetricdImage:
12     description: image
13     default: 'centos-binary-gnocchi-metricd: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   RoleName:
30     default: ''
31     description: Role name on which the service is applied
32     type: string
33   RoleParameters:
34     default: {}
35     description: Parameters specific to the role
36     type: json
37
38 resources:
39
40   ContainersCommon:
41     type: ./containers-common.yaml
42
43   GnocchiMetricdBase:
44     type: ../../puppet/services/gnocchi-metricd.yaml
45     properties:
46       EndpointMap: {get_param: EndpointMap}
47       ServiceNetMap: {get_param: ServiceNetMap}
48       DefaultPasswords: {get_param: DefaultPasswords}
49       RoleName: {get_param: RoleName}
50       RoleParameters: {get_param: RoleParameters}
51
52 outputs:
53   role_data:
54     description: Role data for the Gnocchi API role.
55     value:
56       service_name: {get_attr: [GnocchiMetricdBase, role_data, service_name]}
57       config_settings: {get_attr: [GnocchiMetricdBase, role_data, config_settings]}
58       step_config: &step_config
59         get_attr: [GnocchiMetricdBase, role_data, step_config]
60       service_config_settings: {get_attr: [GnocchiMetricdBase, role_data, service_config_settings]}
61       # BEGIN DOCKER SETTINGS
62       puppet_config:
63         config_volume: gnocchi
64         puppet_tags: gnocchi_config
65         step_config: *step_config
66         config_image: &gnocchi_metricd_image
67           list_join:
68             - '/'
69             - [ {get_param: DockerNamespace}, {get_param: DockerGnocchiMetricdImage} ]
70       kolla_config:
71         /var/lib/kolla/config_files/gnocchi_metricd.json:
72           command: /usr/bin/gnocchi-metricd
73           permissions:
74             - path: /var/log/gnocchi
75               owner: gnocchi:gnocchi
76               recurse: true
77       docker_config:
78         step_4:
79           gnocchi_metricd:
80             image: *gnocchi_metricd_image
81             net: host
82             privileged: false
83             restart: always
84             volumes:
85               list_concat:
86                 - {get_attr: [ContainersCommon, volumes]}
87                 -
88                   - /var/lib/kolla/config_files/gnocchi_metricd.json:/var/lib/kolla/config_files/config.json:ro
89                   - /var/lib/config-data/gnocchi/etc/gnocchi/:/etc/gnocchi/:ro
90                   - /var/log/containers/gnocchi:/var/log/gnocchi
91             environment:
92               - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
93       host_prep_tasks:
94         - name: create persistent logs directory
95           file:
96             path: /var/log/containers/gnocchi
97             state: directory
98       upgrade_tasks:
99         - name: Stop and disable openstack-gnocchi-metricd service
100           tags: step2
101           service: name=openstack-gnocchi-metricd.service state=stopped enabled=no