Skip to content

Commit

Permalink
add cross-arch aarch64 container image builds
Browse files Browse the repository at this point in the history
  • Loading branch information
bbezak committed Oct 3, 2024
1 parent 8f9e962 commit a3d0f9c
Show file tree
Hide file tree
Showing 6 changed files with 87 additions and 35 deletions.
27 changes: 26 additions & 1 deletion .github/workflows/stackhpc-container-image-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ on:
type: boolean
required: false
default: true
overcloud-r9-aarch64:
description: Build overcloud Rocky Linux 9 AARCH64 images?
type: boolean
required: false
default: false
seed:
description: Build seed images?
type: boolean
Expand Down Expand Up @@ -180,7 +185,7 @@ jobs:
run: |
args="${{ inputs.regexes }}"
args="$args -e kolla_base_distro=${{ matrix.distro }}"
args="$args -e kolla_tag=${{ steps.write-kolla-tag.outputs.kolla-tag }}"
args="$args -e kolla_tag=${{ steps.write-kolla-tag.outputs.kolla-tag }}-amd64"
args="$args -e stackhpc_repo_mirror_auth_proxy_enabled=true"
source venvs/kayobe/bin/activate &&
source src/kayobe-config/kayobe-env --environment ci-builder &&
Expand All @@ -189,10 +194,30 @@ jobs:
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD }}
if: inputs.overcloud

- name: Build kolla overcloud images Rocky 9 AARCH64
id: build_overcloud_images_r9_aarch64
continue-on-error: true
run: |
args="${{ inputs.regexes }}"
args="$args -e kolla_base_distro=rocky"
args="$args -e kolla_base_arch=aarch64"
args="$args -e kolla_tag=${{ steps.write-kolla-tag.outputs.kolla-tag }}-aarch64"
args="$args -e stackhpc_repo_mirror_auth_proxy_enabled=true"
source venvs/kayobe/bin/activate &&
source src/kayobe-config/kayobe-env --environment ci-builder &&
kayobe overcloud container image build $args
env:
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD }}
if: inputs.overcloud-r9-aarch64

- name: Copy overcloud container image build logs to output directory
run: sudo mv /var/log/kolla-build.log image-build-logs/kolla-build-overcloud.log
if: inputs.overcloud

- name: Copy build configs to output directory
run: sudo cp -rnL /opt/kayobe/etc/kolla/* image-build-logs/
if: inputs.overcloud

- name: Build kolla seed images
id: build_seed_images
continue-on-error: true
Expand Down
24 changes: 12 additions & 12 deletions etc/kayobe/environments/ci-builder/stackhpc-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,34 +46,34 @@ stackhpc_repo_mirror_password: !vault |
3837336661653962340a316631366463623138623530373133336665376433633437306631383666
30333461333535363433363336663664316634343432633766346564323833346663
# Build against released Pulp repository versions.
stackhpc_repo_grafana_version: "{{ stackhpc_pulp_repo_grafana_version }}"
stackhpc_repo_rhel9_rabbitmq_erlang_version: "{{ stackhpc_pulp_repo_rhel9_rabbitmq_erlang_version }}"
stackhpc_repo_rhel9_rabbitmq_erlang_version: "{{ stackhpc_pulp_repo_rhel9_rabbitmq_erlang_aarch64_version if kolla_base_arch == 'aarch64' else stackhpc_pulp_repo_rhel9_rabbitmq_erlang_version }}"
stackhpc_repo_rhel9_rabbitmq_server_version: "{{ stackhpc_pulp_repo_rhel9_rabbitmq_server_version }}"
stackhpc_repo_ubuntu_jammy_version: "{{ stackhpc_pulp_repo_ubuntu_jammy_version }}"
stackhpc_repo_ubuntu_jammy_security_version: "{{ stackhpc_pulp_repo_ubuntu_jammy_security_version }}"
stackhpc_repo_ubuntu_jammy_cve_2024_6387_version: ""
stackhpc_repo_ubuntu_cloud_archive_version: "{{ stackhpc_pulp_repo_ubuntu_cloud_archive_version }}"
stackhpc_repo_docker_ce_ubuntu_jammy_version: "{{ stackhpc_pulp_repo_docker_ce_ubuntu_jammy_version }}"
stackhpc_repo_centos_stream_9_nfv_openvswitch_version: "{{ stackhpc_pulp_repo_centos_stream_9_nfv_openvswitch_version }}"
stackhpc_repo_centos_stream_9_openstack_caracal_version: "{{ stackhpc_pulp_repo_centos_stream_9_openstack_caracal_version }}"
stackhpc_repo_centos_stream_9_opstools_version: "{{ stackhpc_pulp_repo_centos_stream_9_opstools_version }}"
stackhpc_repo_centos_stream_9_storage_ceph_reef_version: "{{ stackhpc_pulp_repo_centos_stream_9_storage_ceph_reef_version }}"
stackhpc_repo_centos_stream_9_docker_version: "{{ stackhpc_pulp_repo_centos_stream_9_docker_version }}"
stackhpc_repo_rhel_9_treasuredata_5_version: "{{ stackhpc_pulp_repo_rhel_9_treasuredata_5_version }}"
stackhpc_repo_rhel_9_mariadb_10_11_version: "{{ stackhpc_pulp_repo_rhel_9_mariadb_10_11_version }}"
stackhpc_repo_rhel_9_influxdb_version: "{{ stackhpc_pulp_repo_rhel_9_influxdb_version }}"
stackhpc_repo_epel_9_version: "{{ stackhpc_pulp_repo_epel_9_version }}"
stackhpc_repo_centos_stream_9_nfv_openvswitch_version: "{{ stackhpc_pulp_repo_centos_stream_9_nfv_openvswitch_aarch64_version if kolla_base_arch == 'aarch64' else stackhpc_pulp_repo_centos_stream_9_nfv_openvswitch_version }}"
stackhpc_repo_centos_stream_9_openstack_caracal_version: "{{ stackhpc_pulp_repo_centos_stream_9_openstack_caracal_aarch64_version if kolla_base_arch == 'aarch64' else stackhpc_pulp_repo_centos_stream_9_openstack_caracal_version }}"
stackhpc_repo_centos_stream_9_opstools_version: "{{ stackhpc_pulp_repo_centos_stream_9_opstools_aarch64_version if kolla_base_arch == 'aarch64' else stackhpc_pulp_repo_centos_stream_9_opstools_version }}"
stackhpc_repo_centos_stream_9_storage_ceph_reef_version: "{{ stackhpc_pulp_repo_centos_stream_9_storage_ceph_reef_aarch64_version if kolla_base_arch == 'aarch64' else stackhpc_pulp_repo_centos_stream_9_storage_ceph_reef_version }}"
stackhpc_repo_centos_stream_9_docker_version: "{{ stackhpc_pulp_repo_centos_stream_9_docker_aarch64_version if kolla_base_arch == 'aarch64' else stackhpc_pulp_repo_centos_stream_9_docker_version }}"
stackhpc_repo_rhel_9_treasuredata_5_version: "{{ stackhpc_pulp_repo_rhel_9_treasuredata_5_aarch64_version if kolla_base_arch == 'aarch64' else stackhpc_pulp_repo_rhel_9_treasuredata_5_version }}"
stackhpc_repo_rhel_9_mariadb_10_11_version: "{{ stackhpc_pulp_repo_rhel_9_mariadb_10_11_aarch64_version if kolla_base_arch == 'aarch64' else stackhpc_pulp_repo_rhel_9_mariadb_10_11_version }}"
stackhpc_repo_rhel_9_influxdb_version: "{{ stackhpc_pulp_repo_rhel_9_influxdb_aarch64_version if kolla_base_arch == 'aarch64' else stackhpc_pulp_repo_rhel_9_influxdb_version }}"
stackhpc_repo_epel_9_version: "{{ stackhpc_pulp_repo_epel_9_aarch64_version if kolla_base_arch == 'aarch64' else stackhpc_pulp_repo_epel_9_version }}"
stackhpc_repo_opensearch_2_x_version: "{{ stackhpc_pulp_repo_opensearch_2_x_version }}"
stackhpc_repo_opensearch_dashboards_2_x_version: "{{ stackhpc_pulp_repo_opensearch_dashboards_2_x_version }}"

## Use derived vars from etc/kayobe/pulp.yml to switch between
## minor Rocky versions using stackhpc_pulp_repo_rocky_x_minor_version
stackhpc_repo_rocky_9_baseos_version: "{{ stackhpc_pulp_repo_rocky_9_baseos_version }}"
stackhpc_repo_rocky_9_appstream_version: "{{ stackhpc_pulp_repo_rocky_9_appstream_version }}"
stackhpc_repo_rocky_9_extras_version: "{{ stackhpc_pulp_repo_rocky_9_extras_version }}"
stackhpc_repo_rocky_9_crb_version: "{{ stackhpc_pulp_repo_rocky_9_crb_version }}"
stackhpc_repo_rocky_9_highavailability_version: "{{ stackhpc_pulp_repo_rocky_9_highavailability_version }}"
stackhpc_repo_rocky_9_sig_security_common_version: "{{ stackhpc_pulp_repo_rocky_9_sig_security_common_version }}"
stackhpc_repo_rocky_9_sig_security_common_version: "{{ stackhpc_pulp_repo_rocky_9_sig_security_common_aarch64_version if kolla_base_arch == 'aarch64' else stackhpc_pulp_repo_rocky_9_sig_security_common_version }}"

# Rocky-and-CI-specific Pulp urls
stackhpc_include_os_minor_version_in_repo_url: true
Expand Down
12 changes: 11 additions & 1 deletion etc/kayobe/kolla.yml
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ stackhpc_rocky_9_third_party_repos:
file: "CentOS-Ceph-Reef.repo"
tag: "centos-ceph-reef"
- url: "{{ stackhpc_repo_rhel9_rabbitmq_erlang_url }}"
file: "rabbitmq_rabbitmq-erlang.repo"
file: "{{ 'copr-rabbitmq-erlang.repo' if kolla_base_arch == 'aarch64' else 'rabbitmq_rabbitmq-erlang.repo' }}"
tag: "rabbitmq_rabbitmq-erlang"
- url: "{{ stackhpc_repo_rhel9_rabbitmq_server_url }}"
file: "rabbitmq_rabbitmq-server.repo"
Expand Down Expand Up @@ -254,13 +254,18 @@ kolla_build_blocks:
mkdir -p /etc/yum.repos.d.backup && \
tar -czf /etc/yum.repos.d.backup/repos.tar.gz -C /etc/yum.repos.d . && \
{% endif %}
echo "===== Before sed modifications I =====" && \
cat /etc/yum.repos.d/*.repo && \
{% for repo in stackhpc_yum_repos %}
sed -i -e '/\[{{ repo.tag }}\]/,/^\[/ s/^\(mirrorlist *=.*\)/#\1/g' \
-e '/\[{{ repo.tag }}\]/,/^\[/ s/^[# ]*\(baseurl *=.*\)/#\1/g' \
-e '/\[{{ repo.tag }}\]/,/^\[/ s/^[# ]*\(metalink *=.*\)/#\1/g' \
-e '/\[{{ repo.tag }}\]/,/^\[/ s|^\(name.*\)|\1\nbaseurl={{ repo.url }}|' /etc/yum.repos.d/{{ repo.file }}{% if not loop.last %} && \
{% endif %}
{% endfor %}
&& \
echo "===== After sed modifications I =====" && \
cat /etc/yum.repos.d/*.repo
{% else %}
RUN \
rm /etc/apt/sources.list && \
Expand All @@ -281,13 +286,18 @@ kolla_build_blocks:
tar -xzf /etc/yum.repos.d.backup/repos.tar.gz -C /etc/yum.repos.d && \
tar -czf /etc/yum.repos.d.backup/repos.tar.gz -C /etc/yum.repos.d . && \
{% endif %}
echo "===== Before sed modifications II =====" && \
cat /etc/yum.repos.d/*.repo && \
{% for repo in base_centos_repo_overrides_post_yum_list %}
sed -i -e '/\[{{ repo.tag }}\]/,/^\[/ s/^\(mirrorlist *=.*\)/#\1/g' \
-e '/\[{{ repo.tag }}\]/,/^\[/ s/^[# ]*\(baseurl *=.*\)/#\1/g' \
-e '/\[{{ repo.tag }}\]/,/^\[/ s/^[ \t]*\(https.*\)/#\1/g' \
-e '/\[{{ repo.tag }}\]/,/^\[/ s/^[# ]*\(metalink *=.*\)/#\1/g' \
-e '/\[{{ repo.tag }}\]/,/^\[/ s|^\(name.*\)|\1\nbaseurl={{ repo.url }}|' /etc/yum.repos.d/{{ repo.file }}{% if not loop.last %} &&{% endif %} \
{% endfor %}
&& \
echo "===== After sed modifications II =====" && \
cat /etc/yum.repos.d/*.repo \
{% endif %}
# With the UCA keyring installed we can now add all repos.
base_ubuntu_package_sources_list: |
Expand Down
17 changes: 17 additions & 0 deletions etc/kayobe/pulp-repo-versions.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,34 @@
---
# Do not edit! This file is autogenerated by Ansible.
stackhpc_pulp_repo_centos_stream_9_docker_version: 20240829T093746
stackhpc_pulp_repo_centos_stream_9_docker_aarch64_version: 20240927T073838
stackhpc_pulp_repo_centos_stream_9_nfv_openvswitch_version: 20240829T093746
stackhpc_pulp_repo_centos_stream_9_nfv_openvswitch_aarch64_version: 20240927T073838
stackhpc_pulp_repo_centos_stream_9_openstack_caracal_version: 20240902T080424
stackhpc_pulp_repo_centos_stream_9_openstack_caracal_aarch64_version: 20240927T073838
stackhpc_pulp_repo_centos_stream_9_opstools_version: 20231213T031318
stackhpc_pulp_repo_centos_stream_9_opstools_aarch64_version: 20240927T073838
stackhpc_pulp_repo_centos_stream_9_storage_ceph_reef_version: 20240502T000614
stackhpc_pulp_repo_centos_stream_9_storage_ceph_reef_aarch64_version: 20240927T073838
stackhpc_pulp_repo_docker_ce_ubuntu_jammy_version: 20240910T001721
stackhpc_pulp_repo_elrepo_9_version: 20240902T122220
stackhpc_pulp_repo_elrepo_9_aarch64_version: 20240927T073838
stackhpc_pulp_repo_epel_9_version: 20240902T080424
stackhpc_pulp_repo_epel_9_aarch64_version: 20240927T073838
stackhpc_pulp_repo_grafana_version: 20240902T080424
stackhpc_pulp_repo_opensearch_2_x_version: 20240807T235120
stackhpc_pulp_repo_opensearch_dashboards_2_x_version: 20240807T235120
stackhpc_pulp_repo_rhel9_rabbitmq_erlang_version: 20240925T093206
stackhpc_pulp_repo_rhel9_rabbitmq_erlang_aarch64_version: 20240927T073838
stackhpc_pulp_repo_rhel9_rabbitmq_server_version: 20240925T111913
stackhpc_pulp_repo_rhel_9_influxdb_version: 20240817T001913
stackhpc_pulp_repo_rhel_9_influxdb_aarch64_version: 20240927T073838
stackhpc_pulp_repo_rhel_9_mariadb_10_11_version: 20240810T001640
stackhpc_pulp_repo_rhel_9_mariadb_10_11_aarch64_version: 20240927T073838
stackhpc_pulp_repo_rhel_9_rabbitmq_erlang_version: 20240711T091318
stackhpc_pulp_repo_rhel_9_rabbitmq_server_version: 20240711T091318
stackhpc_pulp_repo_rhel_9_treasuredata_5_version: 20240711T091318
stackhpc_pulp_repo_rhel_9_treasuredata_5_aarch64_version: 20240927T073838
stackhpc_pulp_repo_rocky_9_1_appstream_version: 20231207T013715
stackhpc_pulp_repo_rocky_9_1_baseos_version: 20231206T014015
stackhpc_pulp_repo_rocky_9_1_crb_version: 20231211T120328
Expand All @@ -34,11 +45,17 @@ stackhpc_pulp_repo_rocky_9_3_crb_version: 20240429T003818
stackhpc_pulp_repo_rocky_9_3_extras_version: 20240506T000343
stackhpc_pulp_repo_rocky_9_3_highavailability_version: 20240510T001129
stackhpc_pulp_repo_rocky_9_4_appstream_version: 20240816T002610
stackhpc_pulp_repo_rocky_9_4_appstream_aarch64_version: 20240927T073838
stackhpc_pulp_repo_rocky_9_4_baseos_version: 20240816T002610
stackhpc_pulp_repo_rocky_9_4_baseos_aarch64_version: 20240927T073838
stackhpc_pulp_repo_rocky_9_4_crb_version: 20240816T002610
stackhpc_pulp_repo_rocky_9_4_crb_aarch64_version: 20240927T073838
stackhpc_pulp_repo_rocky_9_4_extras_version: 20240816T002610
stackhpc_pulp_repo_rocky_9_4_extras_aarch64_version: 20240927T073838
stackhpc_pulp_repo_rocky_9_4_highavailability_version: 20240816T002610
stackhpc_pulp_repo_rocky_9_4_highavailability_aarch64_version: 20240927T073838
stackhpc_pulp_repo_rocky_9_sig_security_common_version: 20240718T001130
stackhpc_pulp_repo_rocky_9_sig_security_common_aarch64_version: 20240927T073838
stackhpc_pulp_repo_ubuntu_cloud_archive_version: 20240911T041957
stackhpc_pulp_repo_ubuntu_jammy_security_version: 20240911T063424
stackhpc_pulp_repo_ubuntu_jammy_version: 20240911T063424
10 changes: 5 additions & 5 deletions etc/kayobe/pulp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -208,11 +208,11 @@ stackhpc_pulp_sync_rocky_9: "{{ os_distribution == 'rocky' }}"
stackhpc_pulp_repo_rocky_9_minor_version: 4
# Rocky 9 Snapshot versions. The defaults use the appropriate version from
# pulp-repo-versions.yml for the selected minor release.
stackhpc_pulp_repo_rocky_9_appstream_version: "{{ lookup('vars', 'stackhpc_pulp_repo_rocky_9_%s_appstream_version' % stackhpc_pulp_repo_rocky_9_minor_version) }}"
stackhpc_pulp_repo_rocky_9_baseos_version: "{{ lookup('vars', 'stackhpc_pulp_repo_rocky_9_%s_baseos_version' % stackhpc_pulp_repo_rocky_9_minor_version) }}"
stackhpc_pulp_repo_rocky_9_extras_version: "{{ lookup('vars', 'stackhpc_pulp_repo_rocky_9_%s_extras_version' % stackhpc_pulp_repo_rocky_9_minor_version) }}"
stackhpc_pulp_repo_rocky_9_crb_version: "{{ lookup('vars', 'stackhpc_pulp_repo_rocky_9_%s_crb_version' % stackhpc_pulp_repo_rocky_9_minor_version) }}"
stackhpc_pulp_repo_rocky_9_highavailability_version: "{{ lookup('vars', 'stackhpc_pulp_repo_rocky_9_%s_highavailability_version' % stackhpc_pulp_repo_rocky_9_minor_version) }}"
stackhpc_pulp_repo_rocky_9_baseos_version: "{{ lookup('vars', 'stackhpc_pulp_repo_rocky_9_' ~ stackhpc_pulp_repo_rocky_9_minor_version ~ '_baseos' ~ ('_aarch64' if kolla_base_arch == 'aarch64' else '') ~ '_version') }}"
stackhpc_pulp_repo_rocky_9_appstream_version: "{{ lookup('vars', 'stackhpc_pulp_repo_rocky_9_' ~ stackhpc_pulp_repo_rocky_9_minor_version ~ '_appstream' ~ ('_aarch64' if kolla_base_arch == 'aarch64' else '') ~ '_version') }}"
stackhpc_pulp_repo_rocky_9_extras_version: "{{ lookup('vars', 'stackhpc_pulp_repo_rocky_9_' ~ stackhpc_pulp_repo_rocky_9_minor_version ~ '_extras' ~ ('_aarch64' if kolla_base_arch == 'aarch64' else '') ~ '_version') }}"
stackhpc_pulp_repo_rocky_9_crb_version: "{{ lookup('vars', 'stackhpc_pulp_repo_rocky_9_' ~ stackhpc_pulp_repo_rocky_9_minor_version ~ '_crb' ~ ('_aarch64' if kolla_base_arch == 'aarch64' else '') ~ '_version') }}"
stackhpc_pulp_repo_rocky_9_highavailability_version: "{{ lookup('vars', 'stackhpc_pulp_repo_rocky_9_' ~ stackhpc_pulp_repo_rocky_9_minor_version ~ '_highavailability' ~ ('_aarch64' if kolla_base_arch == 'aarch64' else '') ~ '_version') }}"

# Whether to sync packages common to all RHEL 9 derivatives.
stackhpc_pulp_sync_el_9: "{{ stackhpc_pulp_sync_rocky_9 | bool }}"
Expand Down
Loading

0 comments on commit a3d0f9c

Please sign in to comment.