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