Install UEFI related package for nova image

- for x86_64 arch, install OVMF for RHEL family and ovmf for Debian
  family
- for aarch64 arch, install AAVMF for RHEL family and qemu-efi for
  Debian family
- there is no package support for ppc64le

Closes-Bug: #1796558
Change-Id: Ie1c688e74ec2aa3b6169c0a18a856dd0c92fe443
This commit is contained in:
Jeffrey Zhang 2018-10-08 14:04:14 +08:00
parent 649094f9d2
commit 6000933982

View File

@ -18,6 +18,18 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
'python-keystoneclient'
] %}
{% if base_arch == 'x86_64' %}
{% set nova_base_packages = nova_base_packages + [
'OVMF'
] %}
{% elif base_arch == 'aarch64' %}
{% set nova_base_packages = nova_base_packages + [
'AAVMF'
] %}
{% elif base_arch == 'ppc64le' %}
{# NOTE(Jeffrey4l): no packages for ppc64le #}
{% endif %}
{% elif base_distro in ['debian', 'ubuntu'] %}
{% set nova_base_packages = [
@ -26,7 +38,17 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
'openvswitch-switch',
'python-nova'
] %}
{% if base_arch == 'x86_64' %}
{% set nova_base_packages = nova_base_packages + [
'ovmf'
] %}
{% elif base_arch == 'aarch64' %}
{% set nova_base_packages = nova_base_packages + [
'qemu-efi',
] %}
{% elif base_arch == 'ppc64le' %}
{# NOTE(Jeffrey4l): no packages for ppc64le #}
{% endif %}
{% endif %}
{{ macros.install_packages(nova_base_packages | customizable("packages")) }}
@ -38,6 +60,17 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
'bridge-utils',
'openvswitch'
] %}
{% if base_arch == 'x86_64' %}
{% set nova_base_packages = nova_base_packages + [
'OVMF'
] %}
{% elif base_arch == 'aarch64' %}
{% set nova_base_packages = nova_base_packages + [
'AAVMF'
] %}
{% elif base_arch == 'ppc64le' %}
{# NOTE(Jeffrey4l): no packages for ppc64le #}
{% endif %}
{% elif base_distro in ['debian', 'ubuntu'] %}
@ -51,6 +84,17 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
'openvswitch-switch',
'python-libvirt'
] %}
{% if base_arch == 'x86_64' %}
{% set nova_base_packages = nova_base_packages + [
'ovmf'
] %}
{% elif base_arch == 'aarch64' %}
{% set nova_base_packages = nova_base_packages + [
'qemu-efi',
] %}
{% elif base_arch == 'ppc64le' %}
{# NOTE(Jeffrey4l): no packages for ppc64le #}
{% endif %}
{% endif %}
@ -83,6 +127,14 @@ RUN chmod 750 /etc/sudoers.d \
{% endif %}
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
{% if base_arch == 'x86_64' %}
# NOTE(jeffrey4l): for x86_64, nova will validate the existence of /usr/share/OVMF/OVMF_CODE.fd
RUN ln -sf /usr/share/OVMF/OVMF_CODE.secboot.fd /usr/share/OVMF/OVMF_CODE.fd
{% endif %}
{% endif %}
COPY extend_start.sh /usr/local/bin/kolla_extend_start
RUN touch /usr/local/bin/kolla_nova_extend_start \