1 heat_template_version: pike
4 OpenStack containerized Cinder Volume service
9 default: 'tripleoupstream'
11 DockerCinderVolumeImage:
13 default: 'centos-binary-cinder-volume:latest'
15 # we configure all cinder services in the same cinder base container
16 DockerCinderConfigImage:
18 default: 'centos-binary-cinder-api:latest'
22 description: Mapping of service endpoint -> protocol. Typically set
23 via parameter_defaults in the resource registry.
27 description: Mapping of service_name -> network name. Typically set
28 via parameter_defaults in the resource registry. This
29 mapping overrides those in ServiceNetMapDefaults.
36 description: Role name on which the service is applied
40 description: Parameters specific to the role
42 # custom parameters for the Cinder volume role
43 CinderEnableIscsiBackend:
45 description: Whether to enable or not the Iscsi backend for Cinder
47 CinderLVMLoopDeviceSize:
49 description: The size of the loopback file used by the cinder LVM driver.
55 type: ./containers-common.yaml
58 type: ../../puppet/services/cinder-volume.yaml
60 EndpointMap: {get_param: EndpointMap}
61 ServiceNetMap: {get_param: ServiceNetMap}
62 DefaultPasswords: {get_param: DefaultPasswords}
63 RoleName: {get_param: RoleName}
64 RoleParameters: {get_param: RoleParameters}
68 description: Role data for the Cinder Volume role.
70 service_name: {get_attr: [CinderBase, role_data, service_name]}
71 config_settings: {get_attr: [CinderBase, role_data, config_settings]}
72 step_config: &step_config
73 get_attr: [CinderBase, role_data, step_config]
74 service_config_settings: {get_attr: [CinderBase, role_data, service_config_settings]}
75 # BEGIN DOCKER SETTINGS
78 puppet_tags: cinder_config,file,concat,file_line
79 step_config: *step_config
83 - [ {get_param: DockerNamespace}, {get_param: DockerCinderConfigImage} ]
85 /var/lib/kolla/config_files/cinder_volume.json:
86 command: /usr/bin/cinder-volume --config-file /usr/share/cinder/cinder-dist.conf --config-file /etc/cinder/cinder.conf
88 - path: /var/log/cinder
93 cinder_volume_init_logs:
95 image: &cinder_volume_image
98 - [ {get_param: DockerNamespace}, {get_param: DockerCinderVolumeImage} ]
102 - /var/log/containers/cinder:/var/log/cinder
103 command: ['/bin/bash', '-c', 'chown -R cinder:cinder /var/log/cinder']
106 image: *cinder_volume_image
112 - {get_attr: [ContainersCommon, volumes]}
114 - /var/lib/kolla/config_files/cinder_volume.json:/var/lib/kolla/config_files/config.json:ro
115 - /var/lib/config-data/cinder/etc/cinder/:/etc/cinder/:ro
116 - /var/lib/config-data/ceph/etc/ceph/:/etc/ceph/:ro #FIXME: we need to generate a ceph.conf with puppet for this
120 - /etc/iscsi:/etc/iscsi
121 - /var/lib/cinder:/var/lib/cinder
122 - /var/log/containers/cinder:/var/log/cinder
124 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
126 - name: create persistent directories
131 - /var/log/containers/cinder
133 #FIXME: all of this should be conditional on the CinderEnableIscsiBackend value being set to true
134 - name: cinder create LVM volume group dd
138 - - 'dd if=/dev/zero of=/var/lib/cinder/cinder-volumes bs=1 count=0 seek='
142 VALUE: {get_param: CinderLVMLoopDeviceSize}
145 creates: /var/lib/cinder/cinder-volumes
146 - name: cinder create LVM volume group
148 if ! losetup /dev/loop2; then
149 losetup /dev/loop2 /var/lib/cinder/cinder-volumes
151 if ! pvdisplay | grep cinder-volumes; then
154 if ! vgdisplay | grep cinder-volumes; then
155 vgcreate cinder-volumes /dev/loop2
158 executable: /bin/bash
161 - name: Stop and disable cinder_volume service
163 service: name=openstack-cinder-volume state=stopped enabled=no