kolla-ansible/docker/nova/nova-libvirt/Dockerfile.j2
Jeffrey Zhang 255198e742 Fix the failure to launch instance when enabled Ceph
We need install qemu-kvm package which come from the Cloud SIG rather
then qemu-system-x86 which come from EPEL.

Change-Id: Ibd027069771552d3db0e4fe0c7406ddd1bfc0673
Closes-Bug: #1631984
2016-10-12 01:31:09 +08:00

74 lines
1.7 KiB
Django/Jinja

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', 'fedora', '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', 'fedora', '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 }}