b41247c656
Change needed to add header blocks to all Dockerfiles, similar to the base. Use case is to easily run something before packages are installed, e.g. to COPY a local rpm in that can be added to the package list. Change-Id: I1bbfdf0b762da0a392aa8bf47781315b45377bee Closes-Bug: 1618969
74 lines
1.7 KiB
Django/Jinja
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-system-x86',
|
|
'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 nova qemu
|
|
|
|
{% 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 }}
|