FROM {{ namespace }}/{{ image_prefix }}nova-base:{{ tag }} MAINTAINER {{ maintainer }} {% block nova_libvirt_header %}{% endblock %} {% import "macros.j2" as macros with context %} {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} {% set nova_libvirt_packages = [ 'libvirt-daemon', 'libguestfs', 'qemu-kvm', 'libvirt-daemon-driver-nwfilter', 'libvirt-daemon-config-nwfilter', 'libvirt-daemon-driver-lxc', 'ceph-common' ] %} {% elif base_distro == 'ubuntu' %} {% set nova_libvirt_packages = [ 'ceph-common', 'libvirt-bin', 'dmidecode', 'pm-utils', 'qemu', 'qemu-block-extra', 'ebtables', 'xen-utils-4.6' ] %} {% set libvirt_group = 'libvirtd' %} {% elif base_distro == 'debian' %} {% set nova_libvirt_packages = [ 'ceph-common', 'libvirt-bin', 'dmidecode', 'pm-utils', 'qemu', 'qemu-block-extra', 'ebtables', 'xen-utils-4.4', 'usermode' ] %} {% set libvirt_group = 'libvirt' %} {% endif %} {{ macros.install_packages(nova_libvirt_packages | customizable("packages")) }} {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} RUN usermod -a -G qemu nova {% elif base_distro in ['ubuntu', 'debian'] %} RUN mkdir -p /etc/ceph \ && rm -f /etc/libvirt/qemu/networks/default.xml \ /etc/libvirt/qemu/networks/autostart/default.xml \ && usermod -a -G {{ libvirt_group }} nova {% endif %} COPY extend_start.sh /usr/local/bin/kolla_extend_start RUN chmod 755 /usr/local/bin/kolla_extend_start {% block nova_libvirt_footer %}{% endblock %} {% block footer %}{% endblock %} {{ include_footer }}