1 heat_template_version: pike
4 OpenStack containerized gnocchi service
10 DockerGnocchiConfigImage:
11 description: The container image to use for the gnocchi config_volume
15 description: Mapping of service endpoint -> protocol. Typically set
16 via parameter_defaults in the resource registry.
20 description: Dictionary packing service data
24 description: Mapping of service_name -> network name. Typically set
25 via parameter_defaults in the resource registry. This
26 mapping overrides those in ServiceNetMapDefaults.
33 description: Role name on which the service is applied
37 description: Parameters specific to the role
45 internal_tls_enabled: {equals: [{get_param: EnableInternalTLS}, true]}
50 type: ./containers-common.yaml
53 type: ../../puppet/services/gnocchi-api.yaml
55 EndpointMap: {get_param: EndpointMap}
56 ServiceNetMap: {get_param: ServiceNetMap}
57 DefaultPasswords: {get_param: DefaultPasswords}
58 RoleName: {get_param: RoleName}
59 RoleParameters: {get_param: RoleParameters}
63 description: Role data for the gnocchi API role.
65 service_name: {get_attr: [GnocchiApiPuppetBase, role_data, service_name]}
68 - get_attr: [GnocchiApiPuppetBase, role_data, config_settings]
69 - apache::default_vhost: false
70 step_config: &step_config
71 get_attr: [GnocchiApiPuppetBase, role_data, step_config]
72 service_config_settings: {get_attr: [GnocchiApiPuppetBase, role_data, service_config_settings]}
73 # BEGIN DOCKER SETTINGS
75 config_volume: gnocchi
76 puppet_tags: gnocchi_api_paste_ini,gnocchi_config
77 step_config: *step_config
78 config_image: {get_param: DockerGnocchiConfigImage}
80 /var/lib/kolla/config_files/gnocchi_api.json:
81 command: /usr/sbin/httpd -DFOREGROUND
83 - source: "/var/lib/kolla/config_files/src/*"
86 preserve_properties: true
88 - path: /var/log/gnocchi
89 owner: gnocchi:gnocchi
92 # db sync runs before permissions set by kolla_config
95 image: &gnocchi_api_image {get_param: DockerGnocchiApiImage}
98 - /var/log/containers/gnocchi:/var/log/gnocchi
99 command: ['/bin/bash', '-c', 'mkdir -p /var/log/httpd; chown -R gnocchi:gnocchi /var/log/gnocchi']
102 image: *gnocchi_api_image
109 - {get_attr: [ContainersCommon, volumes]}
111 - /var/lib/config-data/gnocchi/etc/gnocchi/:/etc/gnocchi/:ro
112 - /var/log/containers/gnocchi:/var/log/gnocchi
113 command: "/usr/bin/bootstrap_host_exec gnocchi_api su gnocchi -s /bin/bash -c '/usr/bin/gnocchi-upgrade --skip-storage'"
116 image: *gnocchi_api_image
122 - {get_attr: [ContainersCommon, volumes]}
124 - /var/lib/kolla/config_files/gnocchi_api.json:/var/lib/kolla/config_files/config.json:ro
125 - /var/lib/config-data/puppet-generated/gnocchi/:/var/lib/kolla/config_files/src:ro
126 - /var/log/containers/gnocchi:/var/log/gnocchi
129 - internal_tls_enabled
130 - /etc/pki/tls/certs/httpd:/etc/pki/tls/certs/httpd:ro
134 - internal_tls_enabled
135 - /etc/pki/tls/private/httpd:/etc/pki/tls/private/httpd:ro
138 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
140 - name: create persistent logs directory
142 path: /var/log/containers/gnocchi
145 - name: Stop and disable httpd service
147 service: name=httpd state=stopped enabled=no
149 get_attr: [GnocchiApiPuppetBase, role_data, metadata_settings]