1 heat_template_version: pike
4 OpenStack containerized gnocchi service
9 default: 'tripleoupstream'
11 DockerGnocchiApiImage:
13 default: 'centos-binary-gnocchi-api:latest'
15 DockerGnocchiConfigImage:
16 description: The container image to use for the gnocchi config_volume
17 default: 'centos-binary-gnocchi-api:latest'
21 description: Mapping of service endpoint -> protocol. Typically set
22 via parameter_defaults in the resource registry.
26 description: Dictionary packing service data
30 description: Mapping of service_name -> network name. Typically set
31 via parameter_defaults in the resource registry. This
32 mapping overrides those in ServiceNetMapDefaults.
39 description: Role name on which the service is applied
43 description: Parameters specific to the role
51 internal_tls_enabled: {equals: [{get_param: EnableInternalTLS}, true]}
56 type: ./containers-common.yaml
59 type: ../../puppet/services/gnocchi-api.yaml
61 EndpointMap: {get_param: EndpointMap}
62 ServiceNetMap: {get_param: ServiceNetMap}
63 DefaultPasswords: {get_param: DefaultPasswords}
64 RoleName: {get_param: RoleName}
65 RoleParameters: {get_param: RoleParameters}
69 description: Role data for the gnocchi API role.
71 service_name: {get_attr: [GnocchiApiPuppetBase, role_data, service_name]}
74 - get_attr: [GnocchiApiPuppetBase, role_data, config_settings]
75 - apache::default_vhost: false
76 step_config: &step_config
77 get_attr: [GnocchiApiPuppetBase, role_data, step_config]
78 service_config_settings: {get_attr: [GnocchiApiPuppetBase, role_data, service_config_settings]}
79 # BEGIN DOCKER SETTINGS
81 config_volume: gnocchi
82 puppet_tags: gnocchi_api_paste_ini,gnocchi_config
83 step_config: *step_config
87 - [ {get_param: DockerNamespace}, {get_param: DockerGnocchiConfigImage} ]
89 /var/lib/kolla/config_files/gnocchi_api.json:
90 command: /usr/sbin/httpd -DFOREGROUND
92 - source: "/var/lib/kolla/config_files/src/*"
95 preserve_properties: true
97 - path: /var/log/gnocchi
98 owner: gnocchi:gnocchi
101 # db sync runs before permissions set by kolla_config
104 image: &gnocchi_api_image
107 - [ {get_param: DockerNamespace}, {get_param: DockerGnocchiApiImage} ]
110 - /var/log/containers/gnocchi:/var/log/gnocchi
111 command: ['/bin/bash', '-c', 'mkdir -p /var/log/httpd; chown -R gnocchi:gnocchi /var/log/gnocchi']
114 image: *gnocchi_api_image
121 - {get_attr: [ContainersCommon, volumes]}
123 - /var/lib/config-data/gnocchi/etc/gnocchi/:/etc/gnocchi/:ro
124 - /var/log/containers/gnocchi:/var/log/gnocchi
125 command: "/usr/bin/bootstrap_host_exec gnocchi_api su gnocchi -s /bin/bash -c '/usr/bin/gnocchi-upgrade --skip-storage'"
128 image: *gnocchi_api_image
134 - {get_attr: [ContainersCommon, volumes]}
136 - /var/lib/kolla/config_files/gnocchi_api.json:/var/lib/kolla/config_files/config.json:ro
137 - /var/lib/config-data/puppet-generated/gnocchi/:/var/lib/kolla/config_files/src:ro
138 - /var/log/containers/gnocchi:/var/log/gnocchi
141 - internal_tls_enabled
142 - /etc/pki/tls/certs/httpd:/etc/pki/tls/certs/httpd:ro
146 - internal_tls_enabled
147 - /etc/pki/tls/private/httpd:/etc/pki/tls/private/httpd:ro
150 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
152 - name: create persistent logs directory
154 path: /var/log/containers/gnocchi
157 - name: Stop and disable httpd service
159 service: name=httpd state=stopped enabled=no
161 get_attr: [GnocchiApiPuppetBase, role_data, metadata_settings]