diff options
| author | Jenkins <jenkins@review.openstack.org> | 2015-05-24 17:52:38 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2015-05-24 17:52:39 +0000 |
| commit | 6b5e691c86fc2c9077ac9aae835e6a07fddd8e42 (patch) | |
| tree | 1ca0f5e71ea98b8fef4866acb20c9777d2a73ad1 /docker/centos/binary/nova-compute/nova-libvirt | |
| parent | ac97b74052cf3d928ae0a77728bd3bfbc8641eed (diff) | |
| parent | 13062e23e86b5d86020949754540460cb5b0b4fe (diff) | |
| download | kolla-6b5e691c86fc2c9077ac9aae835e6a07fddd8e42.tar.gz kolla-6b5e691c86fc2c9077ac9aae835e6a07fddd8e42.zip | |
Merge "Restructure builds to allow more flexibility"
Diffstat (limited to 'docker/centos/binary/nova-compute/nova-libvirt')
3 files changed, 39 insertions, 0 deletions
diff --git a/docker/centos/binary/nova-compute/nova-libvirt/Dockerfile b/docker/centos/binary/nova-compute/nova-libvirt/Dockerfile new file mode 100644 index 000000000..980940615 --- /dev/null +++ b/docker/centos/binary/nova-compute/nova-libvirt/Dockerfile @@ -0,0 +1,16 @@ +FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%base:%%KOLLA_TAG%% +MAINTAINER Kolla Project (https://launchpad.net/kolla) + +RUN yum -y install libvirt-daemon \ + libguestfs \ + qemu-system-x86 \ + libvirt-daemon-driver-nwfilter \ + libvirt-daemon-config-nwfilter \ + libvirt-daemon-driver-lxc \ + && yum clean all + +VOLUME [ "/sys/fs/cgroup" ] + +ADD ./start.sh /start.sh + +CMD ["/start.sh"] diff --git a/docker/centos/binary/nova-compute/nova-libvirt/build b/docker/centos/binary/nova-compute/nova-libvirt/build new file mode 120000 index 000000000..ec1913803 --- /dev/null +++ b/docker/centos/binary/nova-compute/nova-libvirt/build @@ -0,0 +1 @@ +../../../../../tools/build-docker-image
\ No newline at end of file diff --git a/docker/centos/binary/nova-compute/nova-libvirt/start.sh b/docker/centos/binary/nova-compute/nova-libvirt/start.sh new file mode 100755 index 000000000..47a09399b --- /dev/null +++ b/docker/centos/binary/nova-compute/nova-libvirt/start.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +if [[ $(cat /proc/cpuinfo | grep vmx) ]]; then + modprobe kvm_intel +elif [[ $(cat /proc/cpuinfo | grep svm) ]]; then + modprobe kvm_amd +else + echo "WARNING: Your hardware does not support hardware virtualization -" \ + "using qemu software virtualization instead" +fi + +modprobe ip6_tables ip_tables ebtable_nat + +# If libvirt is not installed on the host permissions need to be set +# If running in qemu, we don't need to set anything as /dev/kvm won't exist +if [[ -c /dev/kvm ]]; then + chmod 660 /dev/kvm + chown root:kvm /dev/kvm +fi + +echo "Starting libvirtd." +exec /usr/sbin/libvirtd |
