Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build overcloud host and IPA images using packages from Ark #1436

Draft
wants to merge 2 commits into
base: stackhpc/2024.1
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Build overcloud and IPA images from StackHPC package mirrors
m-bull committed Dec 27, 2024
commit bdcd8a56a34870fc2b3b38feda2dfa592e6bcd1c
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Ensure we're using modern docker-buildx instead of legacy docker-build
dev_tools_packages_extra:
- "{% if os_distribution == 'ubuntu' %}docker-buildx-plugin{% endif %}"
3 changes: 2 additions & 1 deletion etc/kayobe/ipa.yml
Original file line number Diff line number Diff line change
@@ -33,6 +33,7 @@
ipa_build_dib_elements_extra:
- extra-hardware
- mellanox
- purge-command-not-found

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

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

# List of git repositories containing Diskimage Builder (DIB) elements. See
# stackhpc.openstack.os_images role for usage. Default is a combination of
6 changes: 1 addition & 5 deletions etc/kayobe/overcloud-dib.yml
Original file line number Diff line number Diff line change
@@ -64,11 +64,7 @@ overcloud_dib_host_packages_extra:

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

# List of git repositories containing Diskimage Builder (DIB) elements. See
# stackhpc.openstack.os_images role for usage. Default is a combination of
11 changes: 5 additions & 6 deletions etc/kayobe/stackhpc-overcloud-dib.yml
Original file line number Diff line number Diff line change
@@ -22,6 +22,7 @@ stackhpc_overcloud_dib_name: "deployment_image"
# StackHPC overcloud DIB image elements.
stackhpc_overcloud_dib_elements:
- "{{ os_distribution }}-{% if os_distribution == 'rocky' %}container-stackhpc{% else %}minimal{% endif %}"
- "{% if os_distribution == 'ubuntu' and stackhpc_repo_mirror_auth_proxy_enabled %}apt-no-verify-peer{% endif %}"
- "cloud-init-datasources"
- "{% if os_distribution == 'rocky' %}selinux-permissive{% endif %}"
- "enable-serial-console"
@@ -41,18 +42,16 @@ stackhpc_overcloud_dib_env_vars:
DIB_CONTAINERFILE_RUNTIME: "docker"
DIB_CONTAINERFILE_NETWORK_DRIVER: "host"
DIB_CONTAINERFILE_DOCKERFILE: "/opt/kayobe/src/stackhpc-image-elements/elements/rocky-container-stackhpc/containerfiles/9-stackhpc"
# NOTE: Not currently syncing Ubuntu packages, since the on_demand mirror in
# Ark does not work if the upstream mirror pulls packages (which it does
# sometimes).
# DIB_DISTRIBUTION_MIRROR: "{{ stackhpc_repo_ubuntu_focal_url if os_distribution == 'ubuntu' else '' }}"
DIB_CONTAINERFILE_BUILDOPTS: >-
--build-arg=ROCKY_USE_MIRRORS=true
--build-arg=ROCKY_MIRROR_URLS={{ [stackhpc_repo_rocky_9_baseos_url, stackhpc_repo_rocky_9_appstream_url] | join(',') }}
DIB_DISTRIBUTION_MIRROR: "{{ stackhpc_repo_ubuntu_jammy_url if os_distribution == 'ubuntu' else '' }}"
DIB_DRACUT_ENABLED_MODULES_DEFAULT_CONFIG: "{{ stackhpc_overcloud_dib_dracut_enabled_modules_default_config }}"
DIB_RELEASE: "{{ overcloud_dib_os_release }}"
DIB_SUDOERS_FILENAME: "no-fqdn"
# Avoid DNS queries during sudo commands, since we might not always have working DNS.
DIB_SUDOERS_CONFIG: |
Defaults !fqdn
# FIXME: Support templating repo files.
# DIB_YUM_MINIMAL_BOOTSTRAP_REPOS: /path/to/dir/containing/dib-mirror-*.repo
YUM: dnf
# Workaround for stack user home ownership bug
DIB_IMAGE_CACHE: "/tmp/yum"
8 changes: 8 additions & 0 deletions etc/kayobe/stackhpc.yml
Original file line number Diff line number Diff line change
@@ -166,3 +166,11 @@ stackhpc_docker_registry_password: "{{ pulp_password }}"

# Whether or not to run CIS benchmark hardening playbooks. Default is false.
#stackhpc_enable_cis_benchmark_hardening_hook:

###############################################################################
# diskimage-builder elements repos
stackhpc_dib_image_elements_repos:
- repo: "https://github.com/stackhpc/stackhpc-image-elements"
local: "{{ source_checkout_path }}/stackhpc-image-elements"
version: "rocky-container-pulp-2"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use this branch for testing and update when stackhpc/stackhpc-image-elements#67 is merged and a new tag cut.

elements_path: "elements"