diff --git a/compose/nova-compute-network.yml b/compose/nova-compute-network.yml index c9efa5fb20..299573ae4b 100644 --- a/compose/nova-compute-network.yml +++ b/compose/nova-compute-network.yml @@ -1,3 +1,7 @@ +computedata: + image: kollaglue/centos-rdo-nova-compute-data + name: computedata + libvirt: image: kollaglue/centos-rdo-nova-libvirt name: libvirt @@ -10,9 +14,8 @@ libvirt: volumes: - /run:/run - /sys/fs/cgroup:/sys/fs/cgroup - - /var/lib/nova:/var/lib/nova - - /var/lib/libvirt:/var/lib/libvirt - - /etc/libvirt/qemu:/etc/libvirt/qemu + volumes_from: + - computedata novanetwork: image: kollaglue/centos-rdo-nova-network @@ -25,8 +28,8 @@ novanetwork: volumes: - /run:/run - /sys/fs/cgroup:/sys/fs/cgroup - - /var/lib/nova:/var/lib/nova - - /var/lib/libvirt:/var/lib/libvirt + volumes_from: + - computedata novacompute: image: kollaglue/centos-rdo-nova-compute @@ -39,6 +42,5 @@ novacompute: volumes: - /run:/run - /sys/fs/cgroup:/sys/fs/cgroup - - /var/lib/nova:/var/lib/nova - - /var/lib/libvirt:/var/lib/libvirt - - /etc/libvirt/qemu:/etc/libvirt/qemu + volumes_from: + - computedata diff --git a/docker/nova-compute/nova-compute-data/Dockerfile b/docker/nova-compute/nova-compute-data/Dockerfile new file mode 100644 index 0000000000..07e26709da --- /dev/null +++ b/docker/nova-compute/nova-compute-data/Dockerfile @@ -0,0 +1,10 @@ +FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%base +MAINTAINER Kolla Project (https://launchpad.net/kolla) + +VOLUME [ "/var/lib/nova" ] +VOLUME [ "/var/lib/libvirt" ] +VOLUME [ "/etc/libvirt/qemu" ] + +# Command needed to start the data container. +# Note: data containers do not need to be persistent. +CMD ["/bin/true"] diff --git a/docker/nova-compute/nova-compute-data/build b/docker/nova-compute/nova-compute-data/build new file mode 120000 index 0000000000..43944faa00 --- /dev/null +++ b/docker/nova-compute/nova-compute-data/build @@ -0,0 +1 @@ +../../../tools/build-docker-image \ No newline at end of file diff --git a/docker/nova-compute/nova-compute/Dockerfile b/docker/nova-compute/nova-compute/Dockerfile index 6e24c456e9..bdc7ba3cde 100644 --- a/docker/nova-compute/nova-compute/Dockerfile +++ b/docker/nova-compute/nova-compute/Dockerfile @@ -9,7 +9,5 @@ ADD config-nova-compute.sh /opt/kolla/config-nova-compute.sh ADD ./start.sh /start.sh VOLUME [ "/sys/fs/cgroup" ] -VOLUME [ "/var/lib/nova" ] -VOLUME [ "/var/lib/libvirt" ] CMD ["/start.sh"] diff --git a/docker/nova-compute/nova-libvirt/Dockerfile b/docker/nova-compute/nova-libvirt/Dockerfile index bc64e10021..36b8dfc019 100644 --- a/docker/nova-compute/nova-libvirt/Dockerfile +++ b/docker/nova-compute/nova-libvirt/Dockerfile @@ -6,7 +6,6 @@ RUN yum -y install libvirtd libguestfs qemu-system-x86 \ libvirt-daemon-config-nwfilter; yum clean all VOLUME [ "/sys/fs/cgroup" ] -VOLUME [ "/var/lib/nova" ] ADD ./start.sh /start.sh diff --git a/docker/nova-compute/nova-network/Dockerfile b/docker/nova-compute/nova-network/Dockerfile index 2ee4deff43..11eb7effa7 100644 --- a/docker/nova-compute/nova-network/Dockerfile +++ b/docker/nova-compute/nova-network/Dockerfile @@ -7,7 +7,4 @@ RUN yum -y install openstack-nova-network \ ADD config-nova-network.sh /opt/kolla/config-nova-network.sh ADD ./start.sh /start.sh -VOLUME [ "/var/lib/nova" ] -VOLUME [ "/var/lib/libvirt" ] - CMD ["/start.sh"]