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
44 description: Number of storage sacks to create.
49 internal_tls_enabled: {equals: [{get_param: EnableInternalTLS}, true]}
54 type: ./containers-common.yaml
57 type: ../../puppet/services/gnocchi-api.yaml
59 EndpointMap: {get_param: EndpointMap}
60 ServiceNetMap: {get_param: ServiceNetMap}
61 DefaultPasswords: {get_param: DefaultPasswords}
62 RoleName: {get_param: RoleName}
63 RoleParameters: {get_param: RoleParameters}
67 description: Role data for the gnocchi API role.
69 service_name: {get_attr: [GnocchiApiPuppetBase, role_data, service_name]}
72 - get_attr: [GnocchiApiPuppetBase, role_data, config_settings]
73 - apache::default_vhost: false
74 step_config: &step_config
75 get_attr: [GnocchiApiPuppetBase, role_data, step_config]
76 service_config_settings: {get_attr: [GnocchiApiPuppetBase, role_data, service_config_settings]}
77 # BEGIN DOCKER SETTINGS
79 config_volume: gnocchi
80 puppet_tags: gnocchi_api_paste_ini,gnocchi_config
81 step_config: *step_config
82 config_image: {get_param: DockerGnocchiConfigImage}
84 /var/lib/kolla/config_files/gnocchi_api.json:
85 command: /usr/sbin/httpd -DFOREGROUND
87 - source: "/var/lib/kolla/config_files/src/*"
90 preserve_properties: true
91 - source: "/var/lib/kolla/config_files/src-ceph/"
94 preserve_properties: true
96 - path: /var/log/gnocchi
97 owner: gnocchi:gnocchi
100 # db sync runs before permissions set by kolla_config
103 image: &gnocchi_api_image {get_param: DockerGnocchiApiImage}
106 - /var/log/containers/gnocchi:/var/log/gnocchi
107 command: ['/bin/bash', '-c', 'mkdir -p /var/log/httpd; chown -R gnocchi:gnocchi /var/log/gnocchi']
110 image: *gnocchi_api_image
117 - {get_attr: [ContainersCommon, volumes]}
119 - /var/lib/config-data/gnocchi/etc/gnocchi/:/etc/gnocchi/:ro
120 - /var/log/containers/gnocchi:/var/log/gnocchi
121 - /etc/ceph:/etc/ceph:ro
124 template: /usr/bin/bootstrap_host_exec gnocchi_api su gnocchi -s /bin/bash -c '/usr/bin/gnocchi-upgrade --sacks-number=SACK_NUM'
126 SACK_NUM: {get_param: NumberOfStorageSacks}
129 image: *gnocchi_api_image
135 - {get_attr: [ContainersCommon, volumes]}
137 - /var/lib/kolla/config_files/gnocchi_api.json:/var/lib/kolla/config_files/config.json:ro
138 - /var/lib/config-data/puppet-generated/gnocchi/:/var/lib/kolla/config_files/src:ro
139 - /var/log/containers/gnocchi:/var/log/gnocchi
140 - /etc/ceph:/var/lib/kolla/config_files/src-ceph:ro
143 - internal_tls_enabled
144 - /etc/pki/tls/certs/httpd:/etc/pki/tls/certs/httpd:ro
148 - internal_tls_enabled
149 - /etc/pki/tls/private/httpd:/etc/pki/tls/private/httpd:ro
152 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
154 - name: create persistent logs directory
156 path: /var/log/containers/gnocchi
158 - name: ensure ceph configurations exist
163 - name: Stop and disable httpd service
165 service: name=httpd state=stopped enabled=no
167 get_attr: [GnocchiApiPuppetBase, role_data, metadata_settings]