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
92 image: &cinder_api_image {get_param: DockerCinderApiImage}
96 - /var/log/containers/cinder:/var/log/cinder
97 command: ['/bin/bash', '-c', 'chown -R cinder:cinder /var/log/cinder']
100 image: *cinder_api_image
107 - {get_attr: [ContainersCommon, volumes]}
109 - /var/lib/config-data/cinder/etc/cinder/:/etc/cinder/:ro
110 - /var/log/containers/cinder:/var/log/cinder
112 - '/usr/bin/bootstrap_host_exec'
114 - "su cinder -s /bin/bash -c 'cinder-manage db sync'"
117 image: *cinder_api_image
121 # NOTE(mandre) kolla image changes the user to 'cinder', we need it
122 # to be root to run httpd
126 - {get_attr: [ContainersCommon, volumes]}
128 - /var/lib/kolla/config_files/cinder_api.json:/var/lib/kolla/config_files/config.json:ro
129 - /var/lib/config-data/puppet-generated/cinder/:/var/lib/kolla/config_files/src:ro
130 - /var/log/containers/cinder:/var/log/cinder
133 - internal_tls_enabled
134 - /etc/pki/tls/certs/httpd:/etc/pki/tls/certs/httpd:ro
138 - internal_tls_enabled
139 - /etc/pki/tls/private/httpd:/etc/pki/tls/private/httpd:ro
142 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
144 - name: create persistent logs directory
146 path: /var/log/containers/cinder
149 - name: Stop and disable cinder_api service
151 service: name=httpd state=stopped enabled=no