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/cinder-api.yaml
55 EndpointMap: {get_param: EndpointMap}
56 ServiceData: {get_param: ServiceData}
57 ServiceNetMap: {get_param: ServiceNetMap}
58 DefaultPasswords: {get_param: DefaultPasswords}
59 RoleName: {get_param: RoleName}
60 RoleParameters: {get_param: RoleParameters}
64 description: Role data for the Cinder API role.
66 service_name: {get_attr: [CinderBase, role_data, service_name]}
67 config_settings: {get_attr: [CinderBase, role_data, config_settings]}
68 step_config: &step_config
69 get_attr: [CinderBase, role_data, step_config]
70 service_config_settings: {get_attr: [CinderBase, role_data, service_config_settings]}
71 # BEGIN DOCKER SETTINGS
74 puppet_tags: cinder_config,file,concat,file_line
75 step_config: *step_config
76 config_image: {get_param: DockerCinderConfigImage}
78 /var/lib/kolla/config_files/cinder_api.json:
79 command: /usr/sbin/httpd -DFOREGROUND
81 - source: "/var/lib/kolla/config_files/src/*"
84 preserve_properties: true
86 - path: /var/log/cinder
89 /var/lib/kolla/config_files/cinder_api_cron.json:
90 command: /usr/sbin/crond -n
92 - source: "/var/lib/kolla/config_files/src/*"
95 preserve_properties: true
97 - path: /var/log/cinder
102 cinder_api_init_logs:
103 image: &cinder_api_image {get_param: DockerCinderApiImage}
107 - /var/log/containers/cinder:/var/log/cinder
108 command: ['/bin/bash', '-c', 'chown -R cinder:cinder /var/log/cinder']
111 image: *cinder_api_image
118 - {get_attr: [ContainersCommon, volumes]}
120 - /var/lib/config-data/cinder/etc/cinder/:/etc/cinder/:ro
121 - /var/log/containers/cinder:/var/log/cinder
123 - '/usr/bin/bootstrap_host_exec'
125 - "su cinder -s /bin/bash -c 'cinder-manage db sync'"
128 image: *cinder_api_image
132 # NOTE(mandre) kolla image changes the user to 'cinder', we need it
133 # to be root to run httpd
137 - {get_attr: [ContainersCommon, volumes]}
139 - /var/lib/kolla/config_files/cinder_api.json:/var/lib/kolla/config_files/config.json:ro
140 - /var/lib/config-data/puppet-generated/cinder/:/var/lib/kolla/config_files/src:ro
141 - /var/log/containers/cinder:/var/log/cinder
144 - internal_tls_enabled
145 - /etc/pki/tls/certs/httpd:/etc/pki/tls/certs/httpd:ro
149 - internal_tls_enabled
150 - /etc/pki/tls/private/httpd:/etc/pki/tls/private/httpd:ro
153 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
155 image: *cinder_api_image
161 - {get_attr: [ContainersCommon, volumes]}
163 - /var/lib/kolla/config_files/cinder_api_cron.json:/var/lib/kolla/config_files/config.json:ro
164 - /var/lib/config-data/puppet-generated/cinder/:/var/lib/kolla/config_files/src:ro
165 - /var/log/containers/cinder:/var/log/cinder
167 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
170 - name: create persistent logs directory
172 path: /var/log/containers/cinder
175 - name: Stop and disable cinder_api service
177 service: name=httpd state=stopped enabled=no