hpc-cloud/roles/cinder-storage/templates/cinder-storage.service
Egon Rijpkema 4309956de1 Without host mode the docker container id
is referenced in volume name.
2018-12-10 17:24:43 +01:00

26 lines
662 B
Desktop File

[Unit]
Description=Openstack Cinder Storage container
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', '') }} \
-v "/dev/cinder-volumes/":/dev/cinder-volumes \
-v /srv/cinder-storage/root:/root \
-v "{{ storage_volume }}":/dev/cinder_storage_volume \
-v "/dev/lvm":/dev/lvm \
-v "/srv/cinder-storage/volumes/:/var/lib/cinder/volumes/" \
-p 8777:8776 \
-p 3260:3260 \
--network=host \
{{ docker_image }}
[Install]
WantedBy=multi-user.target