Skip to content

Commit 3e40ffb

Browse files
committed
Merge stackhpc/yoga into stackhpc/zed
2 parents e4ce4ec + 75c38d2 commit 3e40ffb

File tree

11 files changed

+137
-71
lines changed

11 files changed

+137
-71
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ jobs:
209209
if: inputs.ubuntu-jammy && steps.build_ubuntu_jammy.outcome == 'success'
210210

211211
- name: Upload updated images artifact
212-
uses: actions/upload-artifact@v3
212+
uses: actions/upload-artifact@v4
213213
with:
214214
name: Updated images list
215215
path: /tmp/updated_images.txt
@@ -218,7 +218,7 @@ jobs:
218218
steps.build_ubuntu_jammy.outcome == 'success'
219219

220220
- name: Upload Rocky 9 build logs if build failed
221-
uses: actions/upload-artifact@v3
221+
uses: actions/upload-artifact@v4
222222
with:
223223
name: Rocky 9 build logs
224224
path: |
@@ -228,7 +228,7 @@ jobs:
228228
if: steps.build_rocky_9.outcome == 'failure'
229229

230230
- name: Upload Ubuntu Jammy 22.04 build logs if build failed
231-
uses: actions/upload-artifact@v3
231+
uses: actions/upload-artifact@v4
232232
with:
233233
name: Ubuntu Jammy 22.04 build logs
234234
path: |

.github/workflows/stackhpc-all-in-one.yml

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -34,19 +34,19 @@ on:
3434
vm_interface:
3535
description: Default network interface name
3636
type: string
37-
default: enp3s0
37+
default: ens3
3838
vm_flavor:
3939
description: Flavor for the all-in-one VM
4040
type: string
41-
default: general.v1.medium
41+
default: en1.large
4242
vm_network:
4343
description: Network for the all-in-one VM
4444
type: string
45-
default: stackhpc-release
45+
default: stackhpc-ci
4646
vm_subnet:
4747
description: Subnet for the all-in-one VM
4848
type: string
49-
default: stackhpc-release-subnet
49+
default: stackhpc-ci
5050
OS_CLOUD:
5151
description: Name of cloud in clouds.yaml
5252
type: string
@@ -74,7 +74,7 @@ jobs:
7474
all-in-one:
7575
name: All in one
7676
if: inputs.if
77-
runs-on: [self-hosted, stackhpc-kayobe-config-aio]
77+
runs-on: arc-skc-aio-runner
7878
permissions: {}
7979
env:
8080
KAYOBE_ENVIRONMENT: ci-aio
@@ -85,6 +85,11 @@ jobs:
8585
# NOTE(upgrade): Reference the PREVIOUS release branch here.
8686
PREVIOUS_BRANCH: stackhpc/yoga
8787
steps:
88+
- name: Install Package
89+
uses: ConorMacBride/install-package@main
90+
with:
91+
apt: build-essential git unzip nodejs python3 python3-pip python3-wheel python-is-python3
92+
8893
# If testing upgrade, checkout previous release, otherwise checkout current branch
8994
- name: Checkout ${{ inputs.upgrade && 'previous release' || 'current' }} config
9095
uses: actions/checkout@v4
@@ -102,6 +107,10 @@ jobs:
102107
fi
103108
echo kayobe_image=$kayobe_image >> $GITHUB_OUTPUT
104109
110+
- name: Make sure dockerd is running and test Docker.
111+
run: |
112+
docker run --rm hello-world
113+
105114
- name: Output image tag
106115
id: image_tag
107116
run: |
@@ -238,11 +247,11 @@ jobs:
238247
# The same tag may be reused (e.g. pr-123), so ensure we have the latest image.
239248
- name: Pull current Kayobe image
240249
run: |
241-
sudo docker image pull $KAYOBE_IMAGE
250+
docker image pull $KAYOBE_IMAGE
242251
243252
- name: Run growroot
244253
run: |
245-
sudo -E docker run -t --rm \
254+
docker run -t --rm \
246255
-v $(pwd):/stack/kayobe-automation-env/src/kayobe-config \
247256
-e KAYOBE_ENVIRONMENT -e KAYOBE_VAULT_PASSWORD -e KAYOBE_AUTOMATION_SSH_PRIVATE_KEY \
248257
${{ steps.kayobe_image.outputs.kayobe_image }} \
@@ -252,7 +261,7 @@ jobs:
252261

253262
- name: Host configure
254263
run: |
255-
sudo -E docker run -t --rm \
264+
docker run -t --rm \
256265
-v $(pwd):/stack/kayobe-automation-env/src/kayobe-config \
257266
-e KAYOBE_ENVIRONMENT -e KAYOBE_VAULT_PASSWORD -e KAYOBE_AUTOMATION_SSH_PRIVATE_KEY \
258267
${{ steps.kayobe_image.outputs.kayobe_image }} \
@@ -322,7 +331,7 @@ jobs:
322331

323332
- name: Service upgrade
324333
run: |
325-
sudo -E docker run -t --rm \
334+
docker run -t --rm \
326335
-v $(pwd):/stack/kayobe-automation-env/src/kayobe-config \
327336
-e KAYOBE_ENVIRONMENT -e KAYOBE_VAULT_PASSWORD -e KAYOBE_AUTOMATION_SSH_PRIVATE_KEY \
328337
$KAYOBE_IMAGE \
@@ -334,7 +343,7 @@ jobs:
334343
- name: Tempest tests
335344
run: |
336345
mkdir -p tempest-artifacts
337-
sudo -E docker run -t --rm \
346+
docker run -t --rm \
338347
-v $(pwd):/stack/kayobe-automation-env/src/kayobe-config \
339348
-v $(pwd)/tempest-artifacts:/stack/tempest-artifacts \
340349
-e KAYOBE_ENVIRONMENT -e KAYOBE_VAULT_PASSWORD -e KAYOBE_AUTOMATION_SSH_PRIVATE_KEY \
@@ -344,7 +353,7 @@ jobs:
344353
KAYOBE_AUTOMATION_SSH_PRIVATE_KEY: ${{ steps.ssh_key.outputs.ssh_key }}
345354

346355
- name: Upload test result artifacts
347-
uses: actions/upload-artifact@v3
356+
uses: actions/upload-artifact@v4
348357
with:
349358
name: tempest-results-${{ inputs.os_distribution }}-${{ inputs.os_release }}-${{ inputs.neutron_plugin }}${{ inputs.upgrade && '-upgrade' }}
350359
path: tempest-artifacts/*
@@ -361,8 +370,3 @@ jobs:
361370
OS_APPLICATION_CREDENTIAL_ID: ${{ secrets.OS_APPLICATION_CREDENTIAL_ID }}
362371
OS_APPLICATION_CREDENTIAL_SECRET: ${{ secrets.OS_APPLICATION_CREDENTIAL_SECRET }}
363372
if: always()
364-
365-
- name: Prune Docker images over 1 week old
366-
# May fail if another prune is running
367-
run: sudo docker image prune --all --force --filter until=168h || true
368-
if: always()

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

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,20 +56,20 @@ jobs:
5656
submodules: true
5757

5858
- name: Log in to the Container registry
59-
uses: docker/login-action@v2
59+
uses: docker/login-action@v3
6060
with:
6161
registry: ${{ env.REGISTRY }}
6262
username: ${{ github.actor }}
6363
password: ${{ secrets.GITHUB_TOKEN }}
6464

6565
- name: Extract metadata (tags, labels) for Docker
6666
id: meta
67-
uses: docker/metadata-action@v4
67+
uses: docker/metadata-action@v5
6868
with:
6969
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
7070

7171
- name: Set up Docker Buildx
72-
uses: docker/setup-buildx-action@v2
72+
uses: docker/setup-buildx-action@v3
7373
with:
7474
driver-opts: |
7575
image=moby/buildkit:master
@@ -82,15 +82,19 @@ jobs:
8282
https_proxy: ${{ inputs.https_proxy }}
8383
no_proxy: ${{ inputs.no_proxy }}
8484

85+
# Setting KAYOBE_USER_UID and KAYOBE_USER_GID to 1001 to match docker's defaults
86+
# so that docker can run as a privileged user within the Kayobe image.
8587
- name: Build and push Docker image
86-
uses: docker/build-push-action@v3
88+
uses: docker/build-push-action@v4
8789
with:
8890
file: ./.automation/docker/kayobe/Dockerfile
8991
context: .
9092
build-args: |
9193
http_proxy=${{ inputs.http_proxy }}
9294
https_proxy=${{ inputs.https_proxy }}
9395
BASE_IMAGE=${{ inputs.base_image || 'rockylinux:9' }}
96+
KAYOBE_USER_UID=1001
97+
KAYOBE_USER_GID=1001
9498
push: true
9599
tags: ${{ steps.meta.outputs.tags }}
96100
labels: ${{ steps.meta.outputs.labels }}

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

Lines changed: 23 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
generate-tag:
4141
name: Generate container image tag
4242
if: github.repository == 'stackhpc/stackhpc-kayobe-config'
43-
runs-on: [self-hosted, stackhpc-kayobe-config-kolla-builder-rl9]
43+
runs-on: ubuntu-latest
4444
permissions: {}
4545
outputs:
4646
datetime_tag: ${{ steps.datetime_tag.outputs.datetime_tag }}
@@ -88,7 +88,7 @@ jobs:
8888
container-image-build:
8989
name: Build Kolla container images
9090
if: github.repository == 'stackhpc/stackhpc-kayobe-config'
91-
runs-on: [self-hosted, stackhpc-kayobe-config-kolla-builder-rl9]
91+
runs-on: arc-skc-container-image-builder-runner
9292
timeout-minutes: 720
9393
permissions: {}
9494
strategy:
@@ -97,7 +97,13 @@ jobs:
9797
needs:
9898
- generate-tag
9999
steps:
100-
- uses: actions/checkout@v4
100+
- name: Install package dependencies
101+
run: |
102+
sudo apt update
103+
sudo apt install -y build-essential git unzip nodejs python3-wheel python3-pip python3-venv
104+
105+
- name: Checkout
106+
uses: actions/checkout@v4
101107
with:
102108
path: src/kayobe-config
103109

@@ -108,20 +114,9 @@ jobs:
108114
ref: refs/heads/stackhpc/${{ needs.generate-tag.outputs.openstack_release }}
109115
path: src/kayobe
110116

111-
- name: Setup networking
117+
- name: Make sure dockerd is running and test Docker
112118
run: |
113-
if ! ip l show breth1 >/dev/null 2>&1; then
114-
sudo ip l add breth1 type bridge
115-
fi
116-
sudo ip l set breth1 up
117-
if ! ip a show breth1 | grep 192.168.33.3/24; then
118-
sudo ip a add 192.168.33.3/24 dev breth1
119-
fi
120-
if ! ip l show dummy1 >/dev/null 2>&1; then
121-
sudo ip l add dummy1 type dummy
122-
fi
123-
sudo ip l set dummy1 up
124-
sudo ip l set dummy1 master breth1
119+
docker run --rm hello-world
125120
126121
- name: Install Kayobe
127122
run: |
@@ -132,23 +127,19 @@ jobs:
132127
pip install -U pip &&
133128
pip install ../src/kayobe
134129
135-
- name: Bootstrap the control host
130+
# Required for Docker registry login. Normally installed during host configure.
131+
- name: Install Docker Python SDK
136132
run: |
137-
source venvs/kayobe/bin/activate &&
138-
source src/kayobe-config/kayobe-env --environment ci-builder &&
139-
kayobe control host bootstrap
140-
141-
- name: Configure the seed host
142-
run: |
143-
source venvs/kayobe/bin/activate &&
144-
source src/kayobe-config/kayobe-env --environment ci-builder &&
145-
kayobe seed host configure
146-
env:
147-
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD }}
133+
pip install --user docker
148134
149-
- name: Prune local Kolla container images over 1 week old
135+
- name: Configure localhost as a seed
150136
run: |
151-
sudo docker image prune --all --force --filter until=168h --filter="label=kolla_version"
137+
cat > src/kayobe-config/etc/kayobe/environments/ci-builder/inventory/hosts << EOF
138+
# A 'seed' host used for building images.
139+
# Use localhost for container image builds.
140+
[seed]
141+
localhost ansible_connection=local ansible_python_interpreter=/usr/bin/python3
142+
EOF
152143
153144
- name: Build and push kolla overcloud images
154145
run: |
@@ -183,13 +174,13 @@ jobs:
183174

184175
- name: Get built container images
185176
run: |
186-
sudo docker image ls --filter "reference=ark.stackhpc.com/stackhpc-dev/*:*${{ matrix.distro }}*${{ needs.generate-tag.outputs.datetime_tag }}" > ${{ matrix.distro }}-container-images
177+
docker image ls --filter "reference=ark.stackhpc.com/stackhpc-dev/*:*${{ matrix.distro }}*${{ needs.generate-tag.outputs.datetime_tag }}" > ${{ matrix.distro }}-container-images
187178
188179
- name: Fail if no images have been built
189180
run: if [ $(wc -l < ${{ matrix.distro }}-container-images) -le 1 ]; then exit 1; fi
190181

191182
- name: Upload container images artifact
192-
uses: actions/upload-artifact@v3
183+
uses: actions/upload-artifact@v4
193184
with:
194185
name: ${{ matrix.distro }} container images
195186
path: ${{ matrix.distro }}-container-images

.github/workflows/stackhpc-pull-request.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
uses: actions/checkout@v4
2626

2727
- name: Check changed files
28-
uses: dorny/paths-filter@v2
28+
uses: dorny/paths-filter@v3
2929
id: changes
3030
with:
3131
# Filters are defined in this file.
@@ -51,7 +51,7 @@ jobs:
5151
with:
5252
fetch-depth: 0
5353
- name: Setup Python ${{ matrix.python-version }} 🐍
54-
uses: actions/setup-python@v4
54+
uses: actions/setup-python@v5
5555
with:
5656
python-version: ${{ matrix.python-version }}
5757
- name: Install Tox 📦
@@ -98,7 +98,7 @@ jobs:
9898
os_release: jammy
9999
ssh_username: ubuntu
100100
neutron_plugin: ovs
101-
OS_CLOUD: sms-lab-release
101+
OS_CLOUD: openstack
102102
if: ${{ needs.check-changes.outputs.aio == 'true' }}
103103
secrets: inherit
104104
if: ${{ ! failure() && github.repository == 'stackhpc/stackhpc-kayobe-config' }}
@@ -115,7 +115,7 @@ jobs:
115115
os_release: jammy
116116
ssh_username: ubuntu
117117
neutron_plugin: ovn
118-
OS_CLOUD: sms-lab-release
118+
OS_CLOUD: openstack
119119
if: ${{ needs.check-changes.outputs.aio == 'true' }}
120120
secrets: inherit
121121
if: ${{ ! failure() && github.repository == 'stackhpc/stackhpc-kayobe-config' }}
@@ -132,7 +132,7 @@ jobs:
132132
os_release: "9"
133133
ssh_username: cloud-user
134134
neutron_plugin: ovs
135-
OS_CLOUD: sms-lab-release
135+
OS_CLOUD: openstack
136136
if: ${{ needs.check-changes.outputs.aio == 'true' }}
137137
secrets: inherit
138138
if: ${{ ! failure() && github.repository == 'stackhpc/stackhpc-kayobe-config' }}
@@ -149,7 +149,7 @@ jobs:
149149
os_release: "9"
150150
ssh_username: cloud-user
151151
neutron_plugin: ovn
152-
OS_CLOUD: sms-lab-release
152+
OS_CLOUD: openstack
153153
if: ${{ needs.check-changes.outputs.aio == 'true' }}
154154
secrets: inherit
155155
if: ${{ ! failure() && github.repository == 'stackhpc/stackhpc-kayobe-config' }}
@@ -168,7 +168,7 @@ jobs:
168168
os_release: jammy
169169
ssh_username: ubuntu
170170
neutron_plugin: ovs
171-
OS_CLOUD: sms-lab-release
171+
OS_CLOUD: openstack
172172
if: ${{ needs.check-changes.outputs.aio == 'true' }}
173173
upgrade: true
174174
secrets: inherit
@@ -186,7 +186,7 @@ jobs:
186186
os_release: "9"
187187
ssh_username: cloud-user
188188
neutron_plugin: ovn
189-
OS_CLOUD: sms-lab-release
189+
OS_CLOUD: openstack
190190
if: ${{ needs.check-changes.outputs.aio == 'true' }}
191191
upgrade: true
192192
secrets: inherit

etc/kayobe/apt.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,22 @@ apt_repositories: "{{ stackhpc_apt_repositories if 'overcloud' in group_names el
7575
# repository mirrors are deployed.
7676
apt_disable_sources_list: "{{ 'overcloud' in group_names }}"
7777

78+
# Apt auth configuration for accessing the package repository mirror.
79+
stackhpc_apt_auth:
80+
- machine: "{{ stackhpc_repo_mirror_url }}"
81+
login: "{{ stackhpc_repo_mirror_username }}"
82+
password: "{{ stackhpc_repo_mirror_password }}"
83+
filename: "kayobe.conf"
84+
85+
# List of Apt auth configurations. Each item is a dict with the following keys:
86+
# * machine: 'machine' entry in the auth file
87+
# * login: 'login' entry in the auth file
88+
# * password: 'password' entry in the auth file
89+
# * filename: Name of a file in which to store the auth configuration. The
90+
# extension should be '.conf'.
91+
# Default is an empty list.
92+
apt_auth: "{{ stackhpc_apt_auth if 'overcloud' in group_names and stackhpc_repo_mirror_username is truthy else [] }}"
93+
7894
###############################################################################
7995
# Dummy variable to allow Ansible to accept this file.
8096
workaround_ansible_issue_8743: yes

0 commit comments

Comments
 (0)