fb61ba7dac
There are several images installing 'python3-libvirt' package. Which for Debian reside in 'libvirt' repo. So let's enable it where needed. Change-Id: I1c91d27f2578f5ca7c83c4747725b1d9371880b0
185 lines
5.2 KiB
Django/Jinja
185 lines
5.2 KiB
Django/Jinja
FROM {{ namespace }}/{{ image_prefix }}nova-base:{{ tag }}
|
|
{% block labels %}
|
|
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
|
|
{% endblock %}
|
|
|
|
{% block nova_compute_header %}{% endblock %}
|
|
|
|
{% import "macros.j2" as macros with context %}
|
|
|
|
{{ macros.enable_extra_repos(['ceph', 'libvirt']) }}
|
|
|
|
{% if install_type == 'binary' %}
|
|
{% if base_package_type == 'rpm' %}
|
|
|
|
{% set nova_compute_packages = [
|
|
'ceph-common',
|
|
'device-mapper-multipath',
|
|
'e2fsprogs',
|
|
'genisoimage',
|
|
'iscsi-initiator-utils',
|
|
'ndctl',
|
|
'nfs-utils',
|
|
'nvme-cli',
|
|
'openstack-nova-compute',
|
|
'openvswitch',
|
|
'parted',
|
|
'python3-libguestfs',
|
|
'python3-oslo-vmware',
|
|
'python3-rtslib',
|
|
'sysfsutils',
|
|
'targetcli',
|
|
'xfsprogs'
|
|
] %}
|
|
|
|
# NOTE(hrw): daxio is part of pmdk which is x86-64 only in CentOS 8
|
|
{% if base_arch == 'x86_64' %}
|
|
{% set nova_compute_packages = nova_compute_packages + [
|
|
'daxio'
|
|
] %}
|
|
{% endif %}
|
|
|
|
{{ macros.install_packages(nova_compute_packages | customizable("packages")) }}
|
|
|
|
{% elif base_package_type == 'deb' %}
|
|
|
|
# ironic as workaround https://bugs.launchpad.net/packstack/+bug/1430388
|
|
{% set nova_compute_packages = [
|
|
'ceph-common',
|
|
'e2fsprogs',
|
|
'genisoimage',
|
|
'ironic-common',
|
|
'multipath-tools',
|
|
'nfs-common',
|
|
'nova-compute',
|
|
'openvswitch-switch',
|
|
'open-iscsi',
|
|
'parted',
|
|
'pmdk-tools',
|
|
'python3-cephfs',
|
|
'python3-guestfs',
|
|
'python3-ironicclient',
|
|
'python3-oslo.vmware',
|
|
'python3-rados',
|
|
'python3-rbd',
|
|
'python3-rtslib-fb',
|
|
'sysfsutils',
|
|
'targetcli-fb',
|
|
'xfsprogs'
|
|
] %}
|
|
# FIXME(pkopec): since Ubuntu 19.04 'ndctl' package is available
|
|
# for other archs than 'x86_64
|
|
{% if base_distro == 'debian' or
|
|
(base_distro == 'ubuntu' and base_arch == 'x86_64') %}
|
|
{% set nova_compute_packages = nova_compute_packages + [
|
|
'ndctl',
|
|
] %}
|
|
{% endif %}
|
|
|
|
{{ macros.install_packages(nova_compute_packages | customizable("packages")) }}
|
|
|
|
RUN rm -f /etc/nova/nova-compute.conf
|
|
|
|
{% endif %}
|
|
{% elif install_type == 'source' %}
|
|
{% if base_package_type == 'rpm' %}
|
|
|
|
{% set nova_compute_packages = [
|
|
'ceph-common',
|
|
'device-mapper-multipath',
|
|
'dosfstools',
|
|
'e2fsprogs',
|
|
'genisoimage',
|
|
'iscsi-initiator-utils',
|
|
'libosinfo',
|
|
'ndctl',
|
|
'nfs-utils',
|
|
'openvswitch',
|
|
'parted',
|
|
'python3-libguestfs',
|
|
'python3-libvirt',
|
|
'python3-rtslib',
|
|
'qemu-img',
|
|
'sysfsutils',
|
|
'targetcli',
|
|
'xfsprogs'
|
|
] %}
|
|
|
|
# NOTE(hrw): daxio is part of pmdk which is x86-64 only in CentOS 8
|
|
{% if base_arch == 'x86_64' %}
|
|
{% set nova_compute_packages = nova_compute_packages + [
|
|
'daxio'
|
|
] %}
|
|
{% endif %}
|
|
|
|
{% elif base_package_type == 'deb' %}
|
|
|
|
{% set nova_compute_packages = [
|
|
'ceph-common',
|
|
'dosfstools',
|
|
'e2fsprogs',
|
|
'genisoimage',
|
|
'libosinfo-bin',
|
|
'multipath-tools',
|
|
'nfs-common',
|
|
'open-iscsi',
|
|
'parted',
|
|
'pmdk-tools',
|
|
'python3-cephfs',
|
|
'python3-guestfs',
|
|
'python3-libvirt',
|
|
'python3-rados',
|
|
'python3-rbd',
|
|
'python3-rtslib-fb',
|
|
'qemu-utils',
|
|
'sysfsutils',
|
|
'targetcli-fb',
|
|
'xfsprogs'
|
|
] %}
|
|
|
|
{% if base_arch == "aarch64" %}
|
|
{% set nova_compute_packages = nova_compute_packages + [
|
|
'qemu-efi'
|
|
] %}
|
|
{% endif %}
|
|
# FIXME(pkopec): since Ubuntu 19.04 'ndctl' package is available
|
|
# for other archs than 'x86_64'
|
|
{% if base_distro == 'debian' or
|
|
(base_distro == 'ubuntu' and base_arch == 'x86_64') %}
|
|
{% set nova_compute_packages = nova_compute_packages + [
|
|
'ndctl',
|
|
] %}
|
|
{% endif %}
|
|
|
|
RUN mkdir -p /etc/ceph
|
|
|
|
{% endif %}
|
|
|
|
{{ macros.install_packages(nova_compute_packages | customizable("packages")) }}
|
|
|
|
{% set nova_compute_pip_packages = [
|
|
'oslo-vmware'
|
|
]
|
|
%}
|
|
|
|
{% set nova_compute_plugins_pip_packages = [
|
|
'/plugins/*'
|
|
] %}
|
|
|
|
ADD plugins-archive /
|
|
RUN {{ macros.install_pip(nova_compute_pip_packages | customizable("pip_packages")) }} \
|
|
&& if [ "$(ls /plugins)" ]; then \
|
|
{{ macros.install_pip(nova_compute_plugins_pip_packages) }}; \
|
|
fi
|
|
|
|
{% endif %}
|
|
|
|
COPY extend_start.sh /usr/local/bin/kolla_nova_extend_start
|
|
RUN chmod 755 /usr/local/bin/kolla_nova_extend_start \
|
|
&& rm -f /etc/machine-id
|
|
|
|
{% block nova_compute_footer %}{% endblock %}
|
|
{% block footer %}{% endblock %}
|
|
|
|
USER nova
|