1 heat_template_version: pike
4 OpenStack containerized Cinder API service
10 DockerCinderConfigImage:
11 description: The container image to use for the cinder 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/database/mysql-client.yaml
56 type: ../../puppet/services/cinder-api.yaml
58 EndpointMap: {get_param: EndpointMap}
59 ServiceData: {get_param: ServiceData}
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 Cinder API role.
69 service_name: {get_attr: [CinderBase, role_data, service_name]}
70 config_settings: {get_attr: [CinderBase, role_data, config_settings]}
71 step_config: &step_config
74 - - {get_attr: [CinderBase, role_data, step_config]}
75 - {get_attr: [MySQLClient, role_data, step_config]}
76 service_config_settings: {get_attr: [CinderBase, role_data, service_config_settings]}
77 # BEGIN DOCKER SETTINGS
80 puppet_tags: cinder_config,file,concat,file_line
81 step_config: *step_config
82 config_image: {get_param: DockerCinderConfigImage}
84 /var/lib/kolla/config_files/cinder_api.json:
85 command: /usr/sbin/httpd -DFOREGROUND
87 - source: "/var/lib/kolla/config_files/src/*"
90 preserve_properties: true
92 - path: /var/log/cinder
95 /var/lib/kolla/config_files/cinder_api_cron.json:
96 command: /usr/sbin/crond -n
98 - source: "/var/lib/kolla/config_files/src/*"
101 preserve_properties: true
103 - path: /var/log/cinder
108 cinder_api_init_logs:
109 image: &cinder_api_image {get_param: DockerCinderApiImage}
113 - /var/log/containers/cinder:/var/log/cinder
114 - /var/log/containers/httpd/cinder-api:/var/log/httpd
115 command: ['/bin/bash', '-c', 'chown -R cinder:cinder /var/log/cinder']
118 image: *cinder_api_image
125 - {get_attr: [ContainersCommon, volumes]}
127 - /var/lib/config-data/cinder/etc/cinder/:/etc/cinder/:ro
128 - /var/log/containers/cinder:/var/log/cinder
129 - /var/log/containers/httpd/cinder-api:/var/log/httpd
131 - '/usr/bin/bootstrap_host_exec'
133 - "su cinder -s /bin/bash -c 'cinder-manage db sync'"
136 image: *cinder_api_image
140 # NOTE(mandre) kolla image changes the user to 'cinder', we need it
141 # to be root to run httpd
145 - {get_attr: [ContainersCommon, volumes]}
147 - /var/lib/kolla/config_files/cinder_api.json:/var/lib/kolla/config_files/config.json:ro
148 - /var/lib/config-data/puppet-generated/cinder/:/var/lib/kolla/config_files/src:ro
149 - /var/log/containers/cinder:/var/log/cinder
150 - /var/log/containers/httpd/cinder-api:/var/log/httpd
153 - internal_tls_enabled
154 - /etc/pki/tls/certs/httpd:/etc/pki/tls/certs/httpd:ro
158 - internal_tls_enabled
159 - /etc/pki/tls/private/httpd:/etc/pki/tls/private/httpd:ro
162 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
164 image: *cinder_api_image
173 - {get_attr: [ContainersCommon, volumes]}
175 - /var/lib/kolla/config_files/cinder_api_cron.json:/var/lib/kolla/config_files/config.json:ro
176 - /var/lib/config-data/puppet-generated/cinder/:/var/lib/kolla/config_files/src:ro
177 - /var/log/containers/cinder:/var/log/cinder
178 - /var/log/containers/httpd/cinder-api:/var/log/httpd
180 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
183 get_attr: [CinderBase, role_data, metadata_settings]
185 - name: create persistent logs directory
190 - /var/log/containers/cinder
191 - /var/log/containers/httpd/cinder-api
193 - name: Stop and disable cinder_api service
195 service: name=httpd state=stopped enabled=no
196 - name: remove old cinder cron jobs
198 path: /var/spool/cron/cinder