Merge "Make nova-libvirt container build with debian"

This commit is contained in:
Jenkins 2016-06-04 13:37:54 +00:00 committed by Gerrit Code Review
commit c69311b792

View File

@ -1,6 +1,8 @@
FROM {{ namespace }}/{{ image_prefix }}nova-base:{{ tag }} FROM {{ namespace }}/{{ image_prefix }}nova-base:{{ tag }}
MAINTAINER {{ maintainer }} MAINTAINER {{ maintainer }}
{% set libvirt_group = 'libvirtd' %}
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %} {% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
RUN yum -y install \ RUN yum -y install \
@ -17,6 +19,17 @@ RUN yum -y install \
{% elif base_distro in ['ubuntu', 'debian'] %} {% elif base_distro in ['ubuntu', 'debian'] %}
{% if base_distro == 'ubuntu' %}
{% set packages =
' xen-utils-4.6'
%}
{% elif base_distro == 'debian' %}
{% set packages =
' xen-utils-4.4 usermode'
%}
{% set libvirt_group = 'libvirt' %}
{% endif %}
RUN apt-get -y install --no-install-recommends \ RUN apt-get -y install --no-install-recommends \
ceph-common \ ceph-common \
libvirt-bin \ libvirt-bin \
@ -25,11 +38,11 @@ RUN apt-get -y install --no-install-recommends \
qemu \ qemu \
qemu-block-extra \ qemu-block-extra \
ebtables \ ebtables \
xen-utils-4.6 \ {{ packages }} \
&& apt-get clean \ && apt-get clean \
&& mkdir -p /etc/ceph \ && mkdir -p /etc/ceph \
&& rm /etc/libvirt/qemu/networks/default.xml /etc/libvirt/qemu/networks/autostart/default.xml \ && rm -f /etc/libvirt/qemu/networks/default.xml /etc/libvirt/qemu/networks/autostart/default.xml \
&& usermod -a -G libvirtd nova && usermod -a -G {{ libvirt_group }} nova
{% endif %} {% endif %}