Skip to content

Commit 6f7ea1f

Browse files
authored
Merge pull request #1436 from stackhpc/build-images-from-ark
Build overcloud host images using packages from Ark
2 parents 89c6c5e + 53d18e8 commit 6f7ea1f

File tree

12 files changed

+44
-26
lines changed

12 files changed

+44
-26
lines changed

.github/workflows/overcloud-host-image-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ jobs:
212212
source venvs/kayobe/bin/activate &&
213213
source src/kayobe-config/kayobe-env --environment ci-builder &&
214214
kayobe seed host command run \
215-
--command "sudo apt update && sudo apt -y install gcc git libffi-dev python3-dev python-is-python3 python3-venv" --show-output
215+
--command "sudo apt update && sudo apt -y install gcc git libffi-dev python3-dev python-is-python3 python3-venv containerd docker.io docker-buildx" --show-output
216216
env:
217217
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD }}
218218

.github/workflows/stackhpc-container-image-build.yml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -190,17 +190,6 @@ jobs:
190190
localhost ansible_connection=local ansible_python_interpreter=/usr/bin/python3
191191
EOF
192192
193-
# See etc/kayobe/ansible/roles/pulp_auth_proxy/README.md for details.
194-
# NOTE: We override pulp_auth_proxy_conf_path to a path shared by the
195-
# runner and dind containers.
196-
- name: Deploy an authenticating package repository mirror proxy
197-
run: |
198-
source venvs/kayobe/bin/activate &&
199-
source src/kayobe-config/kayobe-env --environment ci-builder &&
200-
kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp-auth-proxy.yml -e pulp_auth_proxy_conf_path=/home/runner/_work/pulp_proxy
201-
env:
202-
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD }}
203-
204193
- name: Create build logs output directory
205194
run: mkdir image-build-logs
206195

@@ -222,6 +211,9 @@ jobs:
222211
args="$args -e stackhpc_repo_mirror_auth_proxy_enabled=true"
223212
args="$args -e kolla_build_log_path=$GITHUB_WORKSPACE/image-build-logs/kolla-build-overcloud.log"
224213
args="$args -e base_path=$GITHUB_WORKSPACE/opt/kayobe"
214+
# NOTE: We override pulp_auth_proxy_conf_path to a path shared by the
215+
# runner and dind containers.
216+
args="$args -e pulp_auth_proxy_conf_path=/home/runner/_work/pulp_proxy"
225217
source venvs/kayobe/bin/activate &&
226218
source src/kayobe-config/kayobe-env --environment ci-builder &&
227219
kayobe overcloud container image build $args
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../../../ansible/pulp-auth-proxy.yml
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../../../ansible/pulp-auth-proxy.yml

etc/kayobe/environments/ci-builder/stackhpc-ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ kolla_build_neutron_ovs: true
3636
# Host and port of a package repository mirror.
3737
# Build against the development Pulp service repositories.
3838
# Use Ark's package repositories to install packages.
39+
stackhpc_repo_mirror_auth_proxy_enabled: true
3940
stackhpc_repo_mirror_url: "{{ stackhpc_repo_mirror_auth_proxy_url if stackhpc_repo_mirror_auth_proxy_enabled | bool else stackhpc_release_pulp_url }}"
4041
stackhpc_repo_mirror_username: "skc-ci-aio"
4142
stackhpc_repo_mirror_password: !vault |
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
# Whether or not to build overcloud host images from Ark
3+
stackhpc_build_overcloud_image_from_pulp_package_mirrors: true

etc/kayobe/overcloud-dib.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,7 @@ overcloud_dib_host_packages_extra:
6464

6565
# List of additional git repositories containing Diskimage Builder (DIB)
6666
# elements. See stackhpc.openstack.os_images role for usage. Default is empty.
67-
overcloud_dib_git_elements_extra:
68-
- repo: "https://github.com/stackhpc/stackhpc-image-elements"
69-
local: "{{ source_checkout_path }}/stackhpc-image-elements"
70-
version: "v1.6.3"
71-
elements_path: "elements"
67+
overcloud_dib_git_elements_extra: "{{ stackhpc_dib_image_elements_repos }}"
7268

7369
# List of git repositories containing Diskimage Builder (DIB) elements. See
7470
# stackhpc.openstack.os_images role for usage. Default is a combination of
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
22
# Overcloud host image versioning tags
33
# These images must be in SMS, since they are used by our AIO CI runners
4-
stackhpc_rocky_9_overcloud_host_image_version: "2025.1-20250620T125648"
5-
stackhpc_ubuntu_noble_overcloud_host_image_version: "2025.1-20250620T125648"
4+
stackhpc_rocky_9_overcloud_host_image_version: "2025.1-20250916T145046"
5+
stackhpc_ubuntu_noble_overcloud_host_image_version: "2025.1-20250916T145046"

etc/kayobe/stackhpc-overcloud-dib.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ stackhpc_overcloud_dib_name: "deployment_image"
2222
# StackHPC overcloud DIB image elements.
2323
stackhpc_overcloud_dib_elements:
2424
- "{{ os_distribution }}-{% if os_distribution == 'rocky' %}container-stackhpc{% else %}minimal{% endif %}"
25+
- "{% if os_distribution == 'ubuntu' and stackhpc_repo_mirror_auth_proxy_enabled %}apt-no-verify-peer{% endif %}"
2526
- "cloud-init-datasources"
2627
- "{% if os_distribution == 'rocky' %}selinux-permissive{% endif %}"
2728
- "enable-serial-console"
@@ -34,7 +35,9 @@ stackhpc_overcloud_dib_elements:
3435
- "{% if os_distribution == 'ubuntu' %}sudoers{% endif %}"
3536

3637
# StackHPC overcloud DIB image environment variables.
37-
stackhpc_overcloud_dib_env_vars:
38+
stackhpc_overcloud_dib_env_vars: "{{ stackhpc_overcloud_dib_env_vars_default | combine(stackhpc_overcloud_dib_env_vars_ark if stackhpc_build_overcloud_image_from_pulp_package_mirrors | bool else {}) }}"
39+
40+
stackhpc_overcloud_dib_env_vars_default:
3841
DIB_BLOCK_DEVICE_CONFIG: "{{ stackhpc_overcloud_dib_block_device_config_uefi_lvm }}"
3942
DIB_BOOTLOADER_DEFAULT_CMDLINE: "nofb nomodeset gfxpayload=text net.ifnames=1 rd.auto"
4043
DIB_GRUB_TIMEOUT: "5"
@@ -43,22 +46,22 @@ stackhpc_overcloud_dib_env_vars:
4346
DIB_CONTAINERFILE_RUNTIME: "docker"
4447
DIB_CONTAINERFILE_NETWORK_DRIVER: "host"
4548
DIB_CONTAINERFILE_DOCKERFILE: "/opt/kayobe/src/stackhpc-image-elements/elements/rocky-container-stackhpc/containerfiles/9-stackhpc"
46-
# NOTE: Not currently syncing Ubuntu packages, since the on_demand mirror in
47-
# Ark does not work if the upstream mirror pulls packages (which it does
48-
# sometimes).
49-
# DIB_DISTRIBUTION_MIRROR: "{{ stackhpc_repo_ubuntu_focal_url if os_distribution == 'ubuntu' else '' }}"
5049
DIB_DRACUT_ENABLED_MODULES_DEFAULT_CONFIG: "{{ stackhpc_overcloud_dib_dracut_enabled_modules_default_config }}"
5150
DIB_RELEASE: "{{ overcloud_dib_os_release }}"
5251
DIB_SUDOERS_FILENAME: "no-fqdn"
5352
# Avoid DNS queries during sudo commands, since we might not always have working DNS.
5453
DIB_SUDOERS_CONFIG: |
5554
Defaults !fqdn
56-
# FIXME: Support templating repo files.
57-
# DIB_YUM_MINIMAL_BOOTSTRAP_REPOS: /path/to/dir/containing/dib-mirror-*.repo
5855
YUM: dnf
5956
# Workaround for stack user home ownership bug
6057
DIB_IMAGE_CACHE: "/tmp/yum"
6158

59+
stackhpc_overcloud_dib_env_vars_ark:
60+
DIB_CONTAINERFILE_BUILDOPTS: >-
61+
--build-arg=ROCKY_USE_MIRRORS=true
62+
--build-arg=ROCKY_MIRROR_URLS={{ [stackhpc_repo_rocky_9_baseos_url, stackhpc_repo_rocky_9_appstream_url] | join(',') }}
63+
DIB_DISTRIBUTION_MIRROR: "{{ stackhpc_repo_ubuntu_noble_url if os_distribution == 'ubuntu' else '' }}"
64+
6265
# StackHPC overcloud DIB image packages.
6366
stackhpc_overcloud_dib_packages:
6467
- "ethtool"

etc/kayobe/stackhpc-overcloud-host-images.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
# Whether or not to download overcloud host images from Ark
66
stackhpc_download_overcloud_host_images: false
77

8+
# Whether or not to build overcloud host images from Ark
9+
stackhpc_build_overcloud_image_from_pulp_package_mirrors: false
10+
811
# The overcloud host image source, defined by os_distribution, os_release,
912
# and the current stable version.
1013
stackhpc_overcloud_host_image_url: "{{ stackhpc_release_pulp_content_url_with_auth }}/kayobe-images/\

0 commit comments

Comments
 (0)