kolla/docker/nova/nova-compute/Dockerfile.j2
Alfredo Moralejo 0c63129682 Use StorageSIG repos for Ceph in CentOS8
Storage SIG has built Ceph Nautilus and Ganesha for CentOS8 in CentOS
Build System.

Let's switch to use them in kolla.

Change-Id: Id37dca84c4eb918aaf2d3c036ef5387fe75988dd
2020-03-03 16:31:53 +05:30

179 lines
4.8 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']) }}
{% if install_type == 'binary' %}
{% if base_package_type == 'rpm' %}
{% set nova_compute_packages = [
'ceph-common',
'device-mapper-multipath',
'e2fsprogs',
'genisoimage',
'iscsi-initiator-utils',
'nfs-utils',
'nvme-cli',
'openstack-nova-compute',
'openvswitch',
'parted',
'sysfsutils',
'targetcli',
'xfsprogs'
] %}
{% if distro_python_version.startswith('3') %}
{% set nova_compute_packages = nova_compute_packages + [
'python3-libguestfs',
'python3-oslo-vmware',
'python3-rtslib'
] %}
{% else %}
{% set nova_compute_packages = nova_compute_packages + [
'python-libguestfs',
'python-oslo-vmware',
'python-rtslib'
] %}
{% 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',
'python3-cephfs',
'python3-guestfs',
'python3-ironicclient',
'python3-oslo.vmware',
'python3-rados',
'python3-rbd',
'python3-rtslib-fb',
'sysfsutils',
'targetcli-fb',
'xfsprogs'
] %}
{{ 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',
'nfs-utils',
'openvswitch',
'parted',
'sysfsutils',
'targetcli',
'xfsprogs'
] %}
{% if distro_python_version.startswith('3') %}
{% set nova_compute_packages = nova_compute_packages + [
'python3-libguestfs',
'python3-libvirt',
'python3-rtslib'
] %}
{% else %}
{% set nova_compute_packages = nova_compute_packages + [
'libvirt-python',
'python-libguestfs',
'python-rtslib'
] %}
{% endif %}
{% if distro_package_manager == 'dnf' %}
{% set nova_compute_packages = nova_compute_packages + [
'qemu-img',
] %}
{% else %}
{% set nova_compute_packages = nova_compute_packages + [
'qemu-img-ev',
] %}
{% endif %}
{% elif base_package_type == 'deb' %}
{% set nova_compute_packages = [
'ceph-common',
'dosfstools',
'e2fsprogs',
'genisoimage',
'libosinfo-bin',
'multipath-tools',
'nfs-common',
'open-iscsi',
'parted',
'python3-cephfs',
'python3-guestfs',
'python3-libvirt',
'python3-rados',
'python3-rbd',
'python3-rtslib-fb',
'qemu-utils',
'targetcli-fb',
'xfsprogs'
] %}
{% if base_arch == "aarch64" %}
{% set nova_compute_packages = nova_compute_packages + [
'qemu-efi'
] %}
{% 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