1 heat_template_version: pike
4 OpenStack containerized Cinder API service
9 default: 'tripleoupstream'
13 default: 'centos-binary-cinder-api:latest'
15 DockerCinderConfigImage:
16 description: The container image to use for the cinder config_volume
17 default: 'centos-binary-cinder-api:latest'
21 description: Mapping of service endpoint -> protocol. Typically set
22 via parameter_defaults in the resource registry.
26 description: Mapping of service_name -> network name. Typically set
27 via parameter_defaults in the resource registry. This
28 mapping overrides those in ServiceNetMapDefaults.
35 description: Role name on which the service is applied
39 description: Parameters specific to the role
47 internal_tls_enabled: {equals: [{get_param: EnableInternalTLS}, true]}
52 type: ./containers-common.yaml
55 type: ../../puppet/services/cinder-api.yaml
57 EndpointMap: {get_param: EndpointMap}
58 ServiceNetMap: {get_param: ServiceNetMap}
59 DefaultPasswords: {get_param: DefaultPasswords}
60 RoleName: {get_param: RoleName}
61 RoleParameters: {get_param: RoleParameters}
65 description: Role data for the Cinder API role.
67 service_name: {get_attr: [CinderBase, role_data, service_name]}
68 config_settings: {get_attr: [CinderBase, role_data, config_settings]}
69 step_config: &step_config
70 get_attr: [CinderBase, role_data, step_config]
71 service_config_settings: {get_attr: [CinderBase, role_data, service_config_settings]}
72 # BEGIN DOCKER SETTINGS
75 puppet_tags: cinder_config,file,concat,file_line
76 step_config: *step_config
80 - [ {get_param: DockerNamespace}, {get_param: DockerCinderConfigImage} ]
82 /var/lib/kolla/config_files/cinder_api.json:
83 command: /usr/sbin/httpd -DFOREGROUND
85 - source: "/var/lib/kolla/config_files/src/*"
88 preserve_properties: true
90 - path: /var/log/cinder
96 image: &cinder_api_image
99 - [ {get_param: DockerNamespace}, {get_param: DockerCinderApiImage} ]
103 - /var/log/containers/cinder:/var/log/cinder
104 command: ['/bin/bash', '-c', 'chown -R cinder:cinder /var/log/cinder']
107 image: *cinder_api_image
114 - {get_attr: [ContainersCommon, volumes]}
116 - /var/lib/config-data/cinder/etc/cinder/:/etc/cinder/:ro
117 - /var/log/containers/cinder:/var/log/cinder
119 - '/usr/bin/bootstrap_host_exec'
121 - "su cinder -s /bin/bash -c 'cinder-manage db sync'"
124 image: *cinder_api_image
128 # NOTE(mandre) kolla image changes the user to 'cinder', we need it
129 # to be root to run httpd
133 - {get_attr: [ContainersCommon, volumes]}
135 - /var/lib/kolla/config_files/cinder_api.json:/var/lib/kolla/config_files/config.json:ro
136 - /var/lib/config-data/puppet-generated/cinder/:/var/lib/kolla/config_files/src:ro
137 - /var/log/containers/cinder:/var/log/cinder
140 - internal_tls_enabled
141 - /etc/pki/tls/certs/httpd:/etc/pki/tls/certs/httpd:ro
145 - internal_tls_enabled
146 - /etc/pki/tls/private/httpd:/etc/pki/tls/private/httpd:ro
149 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
151 - name: create persistent logs directory
153 path: /var/log/containers/cinder
156 - name: Stop and disable cinder_api service
158 service: name=httpd state=stopped enabled=no