Skip to content

Commit 90ceee1

Browse files
committed
Merge remote-tracking branch 'origin/build-images-from-ark' into jammy-cloud-init-fixup
2 parents 2fea1c5 + 9afdf57 commit 90ceee1

File tree

9 files changed

+25
-19
lines changed

9 files changed

+25
-19
lines changed

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

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -171,17 +171,6 @@ jobs:
171171
localhost ansible_connection=local ansible_python_interpreter=/usr/bin/python3
172172
EOF
173173
174-
# See etc/kayobe/ansible/roles/pulp_auth_proxy/README.md for details.
175-
# NOTE: We override pulp_auth_proxy_conf_path to a path shared by the
176-
# runner and dind containers.
177-
- name: Deploy an authenticating package repository mirror proxy
178-
run: |
179-
source venvs/kayobe/bin/activate &&
180-
source src/kayobe-config/kayobe-env --environment ci-builder &&
181-
kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp-auth-proxy.yml -e pulp_auth_proxy_conf_path=/home/runner/_work/pulp_proxy
182-
env:
183-
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD }}
184-
185174
- name: Create build logs output directory
186175
run: mkdir image-build-logs
187176

@@ -192,7 +181,9 @@ jobs:
192181
args="${{ inputs.regexes }}"
193182
args="$args -e kolla_base_distro=${{ matrix.distro }}"
194183
args="$args -e kolla_tag=${{ steps.write-kolla-tag.outputs.kolla-tag }}"
195-
args="$args -e stackhpc_repo_mirror_auth_proxy_enabled=true"
184+
# NOTE: We override pulp_auth_proxy_conf_path to a path shared by the
185+
# runner and dind containers.
186+
args="$args -e pulp_auth_proxy_conf_path=/home/runner/_work/pulp_proxy"
196187
source venvs/kayobe/bin/activate &&
197188
source src/kayobe-config/kayobe-env --environment ci-builder &&
198189
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
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: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Ensure we're using modern docker-buildx instead of legacy docker-build
2+
dev_tools_packages_extra:
3+
- "{% if os_distribution == 'ubuntu' %}docker-buildx-plugin{% endif %}"

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 |

etc/kayobe/ipa.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
ipa_build_dib_elements_extra:
3434
- extra-hardware
3535
- mellanox
36+
- purge-command-not-found
3637

3738
# List of Diskimage Builder (DIB) elements to use when building IPA images.
3839
# Default is combination of ipa_build_dib_elements_default and
@@ -58,7 +59,7 @@ ipa_build_dib_elements_extra:
5859

5960
# List of additional git repositories containing Diskimage Builder (DIB)
6061
# elements. See stackhpc.openstack.os_images role for usage. Default is empty.
61-
#ipa_build_dib_git_elements_extra:
62+
ipa_build_dib_git_elements_extra: "{{ stackhpc_dib_image_elements_repos }}"
6263

6364
# List of git repositories containing Diskimage Builder (DIB) elements. See
6465
# stackhpc.openstack.os_images role for usage. Default is a combination of

etc/kayobe/stackhpc-overcloud-dib.yml

Lines changed: 5 additions & 6 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"
@@ -44,18 +45,16 @@ stackhpc_overcloud_dib_env_vars:
4445
DIB_CONTAINERFILE_RUNTIME: "docker"
4546
DIB_CONTAINERFILE_NETWORK_DRIVER: "host"
4647
DIB_CONTAINERFILE_DOCKERFILE: "/opt/kayobe/src/stackhpc-image-elements/elements/rocky-container-stackhpc/containerfiles/9-stackhpc"
47-
# NOTE: Not currently syncing Ubuntu packages, since the on_demand mirror in
48-
# Ark does not work if the upstream mirror pulls packages (which it does
49-
# sometimes).
50-
# DIB_DISTRIBUTION_MIRROR: "{{ stackhpc_repo_ubuntu_focal_url if os_distribution == 'ubuntu' else '' }}"
48+
DIB_CONTAINERFILE_BUILDOPTS: >-
49+
--build-arg=ROCKY_USE_MIRRORS=true
50+
--build-arg=ROCKY_MIRROR_URLS={{ [stackhpc_repo_rocky_9_baseos_url, stackhpc_repo_rocky_9_appstream_url] | join(',') }}
51+
DIB_DISTRIBUTION_MIRROR: "{{ stackhpc_repo_ubuntu_jammy_url if os_distribution == 'ubuntu' else '' }}"
5152
DIB_DRACUT_ENABLED_MODULES_DEFAULT_CONFIG: "{{ stackhpc_overcloud_dib_dracut_enabled_modules_default_config }}"
5253
DIB_RELEASE: "{{ overcloud_dib_os_release }}"
5354
DIB_SUDOERS_FILENAME: "no-fqdn"
5455
# Avoid DNS queries during sudo commands, since we might not always have working DNS.
5556
DIB_SUDOERS_CONFIG: |
5657
Defaults !fqdn
57-
# FIXME: Support templating repo files.
58-
# DIB_YUM_MINIMAL_BOOTSTRAP_REPOS: /path/to/dir/containing/dib-mirror-*.repo
5958
YUM: dnf
6059
# Workaround for stack user home ownership bug
6160
DIB_IMAGE_CACHE: "/tmp/yum"

etc/kayobe/stackhpc.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,3 +166,11 @@ stackhpc_docker_registry_password: "{{ pulp_password }}"
166166

167167
# Whether or not to run CIS benchmark hardening playbooks. Default is false.
168168
#stackhpc_enable_cis_benchmark_hardening_hook:
169+
170+
###############################################################################
171+
# diskimage-builder elements repos
172+
stackhpc_dib_image_elements_repos:
173+
- repo: "https://github.com/stackhpc/stackhpc-image-elements"
174+
local: "{{ source_checkout_path }}/stackhpc-image-elements"
175+
version: "rocky-container-pulp-2"
176+
elements_path: "elements"

0 commit comments

Comments
 (0)