Skip to content

Commit ff0ae1f

Browse files
committed
Merge branch 'stackhpc/2024.1' into cross-arch-builds-2024.1
Change-Id: I3c0fc7adebe274920592ab461c3e803c0f78a27c
2 parents b7c0457 + 7950069 commit ff0ae1f

File tree

9 files changed

+78
-124
lines changed

9 files changed

+78
-124
lines changed

.github/workflows/package-build-ofed.yml

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ jobs:
2828
runs-on: arc-skc-host-image-builder-runner
2929
permissions: {}
3030
steps:
31+
- name: Generate OFED tag
32+
id: ofed_tag
33+
run: |
34+
echo "ofed_tag=$(date +%Y%m%dT%H%M%S)" >> $GITHUB_OUTPUT
35+
3136
- name: Install Package
3237
uses: ConorMacBride/install-package@main
3338
with:
@@ -42,32 +47,14 @@ jobs:
4247
with:
4348
path: src/kayobe-config
4449

45-
- name: Determine OpenStack release
46-
id: openstack_release
47-
run: |
48-
BRANCH=$(awk -F'=' '/defaultbranch/ {print $2}' src/kayobe-config/.gitreview)
49-
echo "openstack_release=${BRANCH}" | sed -E "s,(stable|unmaintained)/,," >> $GITHUB_OUTPUT
50-
51-
- name: Generate OFED tag
52-
id: ofed_tag
53-
run: |
54-
echo "ofed_tag=$(date +%Y%m%dT%H%M%S)" >> $GITHUB_OUTPUT
55-
56-
- name: Clone StackHPC Kayobe repository
57-
uses: actions/checkout@v4
58-
with:
59-
repository: stackhpc/kayobe
60-
ref: refs/heads/stackhpc/${{ steps.openstack_release.outputs.openstack_release }}
61-
path: src/kayobe
62-
6350
- name: Install Kayobe
6451
run: |
6552
mkdir -p venvs &&
6653
pushd venvs &&
6754
python3 -m venv kayobe &&
6855
source kayobe/bin/activate &&
6956
pip install -U pip &&
70-
pip install ../src/kayobe
57+
pip install -r ../src/kayobe-config/requirements.txt
7158
7259
- name: Install terraform
7360
uses: hashicorp/setup-terraform@v2

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

Lines changed: 12 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -139,23 +139,14 @@ jobs:
139139
- generate-tag
140140
- runner-selection
141141
steps:
142-
- name: Purge workspace (Arm runner only)
143-
if: runner.arch == 'ARM64'
142+
- name: Purge workspace
144143
run: sudo rm -rf "$GITHUB_WORKSPACE"/*
145144

146145
- name: Install package dependencies
147146
run: |
148147
sudo apt update
149148
sudo apt install -y build-essential git unzip nodejs python3-wheel python3-pip python3-venv curl jq wget
150149
151-
- name: Install gh
152-
run: |
153-
sudo mkdir -p -m 755 /etc/apt/keyrings && wget -qO- https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null
154-
sudo chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg
155-
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null
156-
sudo apt update
157-
sudo apt install gh -y
158-
159150
- name: Checkout
160151
uses: actions/checkout@v4
161152
with:
@@ -232,7 +223,7 @@ jobs:
232223
args="$args -e kolla_tag=${{ steps.write-kolla-tag.outputs.kolla-tag }}"
233224
fi
234225
args="$args -e stackhpc_repo_mirror_auth_proxy_enabled=true"
235-
args="$args -e kolla_build_log_path=/var/log/kolla-build-${{ steps.write-kolla-tag.outputs.kolla-tag }}.log"
226+
args="$args -e kolla_build_log_path=$GITHUB_WORKSPACE/image-build-logs/kolla-build-overcloud.log"
236227
args="$args -e base_path=$GITHUB_WORKSPACE/opt/kayobe"
237228
source venvs/kayobe/bin/activate &&
238229
source src/kayobe-config/kayobe-env --environment ci-builder &&
@@ -241,12 +232,6 @@ jobs:
241232
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD }}
242233
if: inputs.overcloud
243234

244-
- name: Copy overcloud container image build logs to output directory
245-
run: |
246-
sudo mv /var/log/kolla-build-${{ steps.write-kolla-tag.outputs.kolla-tag }}.log \
247-
image-build-logs/kolla-build-overcloud.log
248-
if: inputs.overcloud
249-
250235
- name: Copy build configs to output directory
251236
run: sudo cp -rnL "$GITHUB_WORKSPACE/opt/kayobe/etc/kolla/"* image-build-logs/
252237
if: inputs.overcloud
@@ -377,92 +362,31 @@ jobs:
377362
run: |
378363
sudo apt update
379364
sudo apt install -y git unzip python3-wheel python3-pip python3-venv curl jq wget openssh-server openssh-client
365+
380366
- name: Install gh
381367
run: |
382368
sudo mkdir -p -m 755 /etc/apt/keyrings && wget -qO- https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null
383369
sudo chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg
384370
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null
385371
sudo apt update
386372
sudo apt install gh -y
387-
- name: Checkout Kayobe Config
388-
uses: actions/checkout@v4
389-
with:
390-
path: src/kayobe-config
391-
392-
- name: Install Kayobe
393-
run: |
394-
mkdir -p venvs &&
395-
pushd venvs &&
396-
python3 -m venv kayobe &&
397-
source kayobe/bin/activate &&
398-
pip install -U pip &&
399-
pip install -r ../src/kayobe-config/requirements.txt
400-
# Required for Pulp auth proxy deployment and Docker registry login.
401-
# Normally installed during host configure.
402-
- name: Install Docker Python SDK
403-
run: |
404-
sudo pip install docker
405-
- name: Configure localhost as a seed
406-
run: |
407-
cat > src/kayobe-config/etc/kayobe/environments/ci-builder/inventory/hosts << EOF
408-
# A 'seed' host used for building images.
409-
# Use localhost for container image builds.
410-
[seed]
411-
localhost ansible_connection=local ansible_python_interpreter=/usr/bin/python3
412-
EOF
413-
# See etc/kayobe/ansible/roles/pulp_auth_proxy/README.md for details.
414-
# NOTE: We override pulp_auth_proxy_conf_path to a path shared by the
415-
# runner and dind containers.
416-
- name: Deploy an authenticating package repository mirror proxy
417-
run: |
418-
source venvs/kayobe/bin/activate &&
419-
source src/kayobe-config/kayobe-env --environment ci-builder &&
420-
kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp-auth-proxy.yml -e pulp_auth_proxy_conf_path=/home/runner/_work/pulp_proxy
421-
env:
422-
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD }}
423373
424374
- name: Download artifacts
425375
uses: actions/download-artifact@v4
426376

427377
- name: Combine pushed images lists
428378
run: |
429379
find . -name 'push-attempt-images.txt' -exec cat {} + > all-pushed-images.txt
430-
- name: Log in to Docker registry
431-
run: |
432-
source venvs/kayobe/bin/activate &&
433-
source src/kayobe-config/kayobe-env --environment ci-builder &&
434-
kayobe playbook run ${KAYOBE_CONFIG_PATH}/ansible/docker-registry-login.yml
435-
env:
436-
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD }}
437380
438-
- name: Create and Push Docker Manifests
439-
run: |
440-
set -ex
441-
mkdir -p logs
442-
images=$(cat all-pushed-images.txt | sort | uniq)
443-
# Filter out Ubuntu and Rocky Bifrost images
444-
manifest_images=$(echo "$images" | grep -E '.*-(amd64|aarch64)$' | sed -E 's/-(amd64|aarch64)$//' | sort | uniq)
445-
if [ -z "$manifest_images" ]; then
446-
echo "No Rocky overcloud images found. Skipping manifest creation." | tee -a logs/manifest-creation.log
447-
exit 0
448-
fi
449-
for base_image in $manifest_images; do
450-
arch_images=""
451-
for arch in amd64 aarch64; do
452-
arch_image="${base_image}-${arch}"
453-
# Check if the image exists in the registry
454-
if docker manifest inspect "$arch_image" > /dev/null 2>&1; then
455-
arch_images="$arch_images $arch_image"
456-
fi
457-
done
458-
if [ -n "$arch_images" ]; then
459-
echo "Creating manifest for $base_image with images:$arch_images" | tee -a logs/manifest-creation.log
460-
docker manifest create "$base_image" $arch_images | tee -a logs/manifest-creation.log
461-
docker manifest push "$base_image" | tee -a logs/manifest-creation.log
462-
else
463-
echo "No images found for $base_image, skipping." | tee -a logs/manifest-creation.log
464-
fi
465-
done
381+
- name: Log in to container registry
382+
uses: docker/login-action@v3
383+
with:
384+
registry: ark.stackhpc.com
385+
username: ${{ secrets.RLS_TRAIN_CI_ARK_REGISTRY_USER }}
386+
password: ${{ secrets.RLS_TRAIN_CI_ARK_REGISTRY_PASS }}
387+
388+
- name: Create and push Docker manifests
389+
run: tools/multiarch-manifests.sh
466390

467391
- name: Upload manifest logs
468392
uses: actions/upload-artifact@v4

etc/kayobe/kolla-image-tags.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
# where the key is the OS distro and the value is the tag to deploy.
55
kolla_image_tags:
66
openstack:
7-
rocky-9: 2024.1-rocky-9-20250711T161715
8-
ubuntu-jammy: 2024.1-ubuntu-jammy-20250711T161715
9-
ubuntu-noble: 2024.1-ubuntu-noble-20250711T161715
7+
rocky-9: 2024.1-rocky-9-20250715T083226
8+
ubuntu-jammy: 2024.1-ubuntu-jammy-20250715T083226
9+
ubuntu-noble: 2024.1-ubuntu-noble-20250715T083226

etc/kayobe/ofed.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,22 @@
33

44
###############################################################################
55
# DOCA host version
6-
stackhpc_pulp_doca_version: 2.9.1
6+
stackhpc_pulp_doca_version: "{{ '2.9.3' if stackhpc_pulp_repo_rocky_9_minor_version == '6' else '2.9.1' }}"
77

88
###############################################################################
99
# Pulp configuration for DOCA OFED
1010

1111
# Whether to sync OFED repositories into the local Pulp service
1212
stackhpc_pulp_sync_ofed: "{{ groups['mlnx'] | length > 0 }}"
1313

14+
# DOCA Snapshot lookup vars
15+
doca_version_lookup_var: "stackhpc_pulp_repo_doca_{{ stackhpc_pulp_doca_version | replace('.', '_') }}_rhel9_{{ stackhpc_pulp_repo_rocky_9_minor_version }}_version"
16+
doca_modules_version_lookup_var: "stackhpc_pulp_repo_doca_{{ stackhpc_pulp_doca_version | replace('.', '_') }}_rhel9_{{ stackhpc_pulp_repo_rocky_9_minor_version }}_modules_version"
17+
1418
# DOCA Snapshot versions. The defaults use the appropriate version from
1519
# pulp-repo-versions.yml
16-
stackhpc_pulp_repo_rhel9_doca_version: "{{ lookup('vars', 'stackhpc_pulp_repo_rhel_9_{{ stackhpc_pulp_repo_rocky_9_minor_version }}_doca_version') }}"
17-
stackhpc_pulp_repo_rhel9_doca_modules_version: "{{ lookup('vars', 'stackhpc_pulp_repo_rhel_9_{{ stackhpc_pulp_repo_rocky_9_minor_version }}_doca_modules_version') }}"
20+
stackhpc_pulp_repo_rhel9_doca_version: "{{ lookup('vars', doca_version_lookup_var) }}"
21+
stackhpc_pulp_repo_rhel9_doca_modules_version: "{{ lookup('vars', doca_modules_version_lookup_var) }}"
1822

1923
###############################################################################
2024
# Dummy variable to allow Ansible to accept this file.

etc/kayobe/pulp-repo-versions.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,9 @@ stackhpc_pulp_repo_ubuntu_jammy_security_version: 20250417T070229
7979
stackhpc_pulp_repo_ubuntu_jammy_version: 20250417T070229
8080
stackhpc_pulp_repo_ubuntu_noble_security_version: 20250417T033501
8181
stackhpc_pulp_repo_ubuntu_noble_version: 20250417T033501
82-
stackhpc_pulp_repo_rhel_9_4_doca_version: 20241211T153620
83-
stackhpc_pulp_repo_rhel_9_4_doca_modules_version: 20241213T112245
84-
stackhpc_pulp_repo_rhel_9_5_doca_version: 20241211T171301
85-
stackhpc_pulp_repo_rhel_9_5_doca_modules_version: 20250115T150314
86-
##### NOTE: Dummy variables, currently no RL9.6 DOCA
87-
stackhpc_pulp_repo_rhel_9_6_doca_modules_version: 00000000T000000
88-
stackhpc_pulp_repo_rhel_9_6_doca_version: 00000000T000000
89-
######
82+
stackhpc_pulp_repo_doca_2_9_1_rhel9_4_version: 20241211T153620
83+
stackhpc_pulp_repo_doca_2_9_1_rhel9_4_modules_version: 20241213T112245
84+
stackhpc_pulp_repo_doca_2_9_1_rhel9_5_version: 20241211T171301
85+
stackhpc_pulp_repo_doca_2_9_1_rhel9_5_modules_version: 20250115T150314
86+
stackhpc_pulp_repo_doca_2_9_3_rhel9_6_version: 20250703T135021
87+
stackhpc_pulp_repo_doca_2_9_3_rhel9_6_modules_version: 20250714T141841

etc/kayobe/pulp.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ stackhpc_pulp_distribution_deb_production: >-
243243
# Whether to sync Rocky Linux 9 packages.
244244
stackhpc_pulp_sync_rocky_9: "{{ os_distribution == 'rocky' }}"
245245
# Rocky 9 minor version number. Supported values: 1, 2, 3, 4, 5, 6. Default is 6
246-
stackhpc_pulp_repo_rocky_9_minor_version: 6
246+
stackhpc_pulp_repo_rocky_9_minor_version: '6'
247247
# Rocky 9 Snapshot versions. The defaults use the appropriate version from
248248
# pulp-repo-versions.yml for the selected minor release.
249249

etc/kayobe/stackhpc.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,11 +165,11 @@ stackhpc_repo_elrepo_9_version: "{{ stackhpc_repo_distribution }}"
165165

166166
# Kolla source repository.
167167
stackhpc_kolla_source_url: "https://github.com/stackhpc/kolla"
168-
stackhpc_kolla_source_version: stackhpc/18.6.0.13
168+
stackhpc_kolla_source_version: stackhpc/18.7.0.2
169169

170170
# Kolla Ansible source repository.
171171
stackhpc_kolla_ansible_source_url: "https://github.com/stackhpc/kolla-ansible"
172-
stackhpc_kolla_ansible_source_version: stackhpc/18.6.0.15
172+
stackhpc_kolla_ansible_source_version: stackhpc/18.7.0.1
173173

174174
###############################################################################
175175
# Container image registry
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
features:
3+
- |
4+
Added support for DOCA OFED on Rocky Linux 9.6 at version ``2.9.3``. The
5+
package versions for Rocky 9.4 and 9.5 remain unchanged, using ``2.9.1``.

tools/multiarch-manifests.sh

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#!/usr/bin/env bash
2+
# Script used by the Image build workflow to build & push multiarch manifests.
3+
4+
set -ex
5+
6+
mkdir -p logs
7+
images=$(cat all-pushed-images.txt | sort | uniq)
8+
9+
# Filter out Ubuntu and Rocky Bifrost images
10+
manifest_images=$(echo "$images" \
11+
| grep -E '.*-(amd64|aarch64)$' \
12+
| sed -E 's/-(amd64|aarch64)$//' \
13+
| sort | uniq)
14+
15+
if [ -z "$manifest_images" ]; then
16+
echo "No Rocky overcloud images found. Skipping manifest creation." | tee -a logs/manifest-creation.log
17+
exit 0
18+
fi
19+
20+
for base_image in $manifest_images; do
21+
arch_images=""
22+
for arch in amd64 aarch64; do
23+
arch_image="${base_image}-${arch}"
24+
# Check if the image exists in the registry
25+
if docker manifest inspect "$arch_image" > /dev/null 2>&1; then
26+
arch_images="$arch_images $arch_image"
27+
fi
28+
done
29+
if [ -n "$arch_images" ]; then
30+
echo "Creating manifest for $base_image with images:$arch_images" | tee -a logs/manifest-creation.log
31+
docker manifest create "$base_image" $arch_images | tee -a logs/manifest-creation.log
32+
docker manifest push "$base_image" | tee -a logs/manifest-creation.log
33+
else
34+
echo "No images found for $base_image, skipping." | tee -a logs/manifest-creation.log
35+
fi
36+
done

0 commit comments

Comments
 (0)