From 3fe85c57805b04b4c72cfc81d67f04e147bba5d7 Mon Sep 17 00:00:00 2001 From: Dmitry Tantsur Date: Wed, 10 Jun 2020 14:45:12 +0200 Subject: [PATCH] Add an option to use pre-built DIB images Change-Id: I391c423a9ce4d1cb948e887cac3fe53987c3c39e --- .../bifrost-ironic-install/defaults/main.yml | 19 +++++++++++++++++-- .../notes/use-tinyipa-31f5343def1c0bf4.yaml | 6 ++++++ 2 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 releasenotes/notes/use-tinyipa-31f5343def1c0bf4.yaml diff --git a/playbooks/roles/bifrost-ironic-install/defaults/main.yml b/playbooks/roles/bifrost-ironic-install/defaults/main.yml index d0d4ec3bb..722d746b3 100644 --- a/playbooks/roles/bifrost-ironic-install/defaults/main.yml +++ b/playbooks/roles/bifrost-ironic-install/defaults/main.yml @@ -54,6 +54,7 @@ ans_network_interface: "{{ network_interface | replace('-', '_') }}" ipa_file_protocol: "http" ipa_upstream_release: "master" +use_tinyipa: true enable_uefi_ipxe: true ipxe_efi_binary: ipxe.efi @@ -61,11 +62,25 @@ ipxe_efi_binary: ipxe.efi ipa_kernel: "{{http_boot_folder}}/ipa.kernel" ipa_ramdisk: "{{http_boot_folder}}/ipa.initramfs" ipa_kernel_url: "{{ ipa_file_protocol }}://{{ hostvars[inventory_hostname]['ansible_' + ans_network_interface]['ipv4']['address'] }}:{{file_url_port}}/ipa.kernel" -ipa_kernel_upstream_url: "https://tarballs.openstack.org/ironic-python-agent/tinyipa/files/tinyipa-{{ ipa_upstream_release }}.vmlinuz" +ipa_kernel_upstream_url: >- + {%- if use_tinyipa | bool -%} + https://tarballs.openstack.org/ironic-python-agent/tinyipa/files/tinyipa-{{ ipa_upstream_release }}.vmlinuz + {%- elif ipa_upstream_release == "stable-train" -%} + https://tarballs.openstack.org/ironic-python-agent/dib/files/ipa-centos7-{{ ipa_upstream_release }}.kernel + {%- else -%} + https://tarballs.openstack.org/ironic-python-agent/dib/files/ipa-centos8-{{ ipa_upstream_release }}.kernel + {%- endif -%} ipa_kernel_upstream_checksum_algo: "sha256" ipa_kernel_upstream_checksum_url: "{{ ipa_kernel_upstream_url }}.{{ ipa_kernel_upstream_checksum_algo }}" ipa_ramdisk_url: "{{ ipa_file_protocol }}://{{ hostvars[inventory_hostname]['ansible_' + ans_network_interface]['ipv4']['address'] }}:{{file_url_port}}/ipa.initramfs" -ipa_ramdisk_upstream_url: "https://tarballs.openstack.org/ironic-python-agent/tinyipa/files/tinyipa-{{ ipa_upstream_release }}.gz" +ipa_ramdisk_upstream_url: >- + {%- if use_tinyipa | bool -%} + https://tarballs.openstack.org/ironic-python-agent/tinyipa/files/tinyipa-{{ ipa_upstream_release }}.gz + {%- elif ipa_upstream_release == "stable-train" -%} + https://tarballs.openstack.org/ironic-python-agent/dib/files/ipa-centos7-{{ ipa_upstream_release }}.initramfs + {%- else -%} + https://tarballs.openstack.org/ironic-python-agent/dib/files/ipa-centos8-{{ ipa_upstream_release }}.initramfs + {%- endif -%} ipa_ramdisk_upstream_checksum_algo: "sha256" ipa_ramdisk_upstream_checksum_url: "{{ ipa_ramdisk_upstream_url }}.{{ ipa_ramdisk_upstream_checksum_algo }}" deploy_image_filename: "deployment_image.qcow2" diff --git a/releasenotes/notes/use-tinyipa-31f5343def1c0bf4.yaml b/releasenotes/notes/use-tinyipa-31f5343def1c0bf4.yaml new file mode 100644 index 000000000..5a4f8a923 --- /dev/null +++ b/releasenotes/notes/use-tinyipa-31f5343def1c0bf4.yaml @@ -0,0 +1,6 @@ +--- +features: + - | + The new variable ``use_tinyipa`` (defaulting to ``true``) defines whether + to use the pre-built tinyIPA images or production-ready CentOS images + built with DIB.