2017-08-28 11:52:02 +02:00
|
|
|
[Unit]
|
2017-08-31 15:02:47 +02:00
|
|
|
Description=Openstack Cinder Storage container
|
2017-08-28 11:52:02 +02:00
|
|
|
After=docker.service
|
|
|
|
Requires=docker.service
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
TimeoutStartSec=0
|
|
|
|
Restart=always
|
|
|
|
ExecStartPre=-/usr/bin/docker kill %n
|
|
|
|
ExecStartPre=-/usr/bin/docker rm %n
|
|
|
|
ExecStart=/usr/bin/docker run --name %n \
|
|
|
|
--privileged \
|
|
|
|
{{ env_vars | replace('\n', '') }} \
|
2018-04-13 16:19:17 +02:00
|
|
|
-v /dev/cinder-volumes/:/dev/cinder-volumes \
|
2017-08-28 11:52:02 +02:00
|
|
|
-v /srv/cinder-storage/root:/root \
|
|
|
|
-v "{{ storage_volume }}":/dev/cinder_storage_volume \
|
2018-04-13 16:19:17 +02:00
|
|
|
-v /dev/lvm:/dev/lvm \
|
|
|
|
-v /srv/cinder-storage/volumes/:/var/lib/cinder/volumes/ \
|
|
|
|
-v /srv/cinder-storage/etc/ceph:/etc/ceph
|
2017-08-31 15:02:47 +02:00
|
|
|
-p 8777:8776 \
|
|
|
|
-p 3260:3260 \
|
2017-08-28 11:52:02 +02:00
|
|
|
{{ docker_image }}
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|