Skip to content

Commit 59ce72a

Browse files
authored
Merge pull request #924 from stackhpc/zed-yoga-merge
zed: yoga merge
2 parents e4ce4ec + eafa278 commit 59ce72a

12 files changed

+163
-83
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: 36 additions & 22 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: git unzip nodejs
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: |
@@ -168,7 +177,17 @@ jobs:
168177
OS_APPLICATION_CREDENTIAL_SECRET: ${{ secrets.OS_APPLICATION_CREDENTIAL_SECRET }}
169178

170179
- name: Terraform Apply
171-
run: terraform apply -auto-approve
180+
run: |
181+
for attempt in $(seq 5); do
182+
if terraform apply -auto-approve; then
183+
echo "Created infrastructure on attempt $attempt"
184+
break
185+
fi
186+
echo "Failed to create infrastructure on attempt $attempt"
187+
sleep 10
188+
terraform destroy -auto-approve
189+
sleep 60
190+
done
172191
working-directory: ${{ github.workspace }}/terraform/aio
173192
env:
174193
OS_CLOUD: ${{ inputs.OS_CLOUD }}
@@ -232,17 +251,17 @@ jobs:
232251
# The same tag may be reused (e.g. stackhpc/yoga), so ensure we have the latest image.
233252
- name: Pull previous Kayobe image
234253
run: |
235-
sudo docker image pull ${{ steps.kayobe_image.outputs.kayobe_image }}
254+
docker image pull ${{ steps.kayobe_image.outputs.kayobe_image }}
236255
if: inputs.upgrade
237256

238257
# The same tag may be reused (e.g. pr-123), so ensure we have the latest image.
239258
- name: Pull current Kayobe image
240259
run: |
241-
sudo docker image pull $KAYOBE_IMAGE
260+
docker image pull $KAYOBE_IMAGE
242261
243262
- name: Run growroot
244263
run: |
245-
sudo -E docker run -t --rm \
264+
docker run -t --rm \
246265
-v $(pwd):/stack/kayobe-automation-env/src/kayobe-config \
247266
-e KAYOBE_ENVIRONMENT -e KAYOBE_VAULT_PASSWORD -e KAYOBE_AUTOMATION_SSH_PRIVATE_KEY \
248267
${{ steps.kayobe_image.outputs.kayobe_image }} \
@@ -252,7 +271,7 @@ jobs:
252271

253272
- name: Host configure
254273
run: |
255-
sudo -E docker run -t --rm \
274+
docker run -t --rm \
256275
-v $(pwd):/stack/kayobe-automation-env/src/kayobe-config \
257276
-e KAYOBE_ENVIRONMENT -e KAYOBE_VAULT_PASSWORD -e KAYOBE_AUTOMATION_SSH_PRIVATE_KEY \
258277
${{ steps.kayobe_image.outputs.kayobe_image }} \
@@ -262,7 +281,7 @@ jobs:
262281

263282
- name: Service deploy
264283
run: |
265-
sudo -E docker run -t --rm \
284+
docker run -t --rm \
266285
-v $(pwd):/stack/kayobe-automation-env/src/kayobe-config \
267286
-e KAYOBE_ENVIRONMENT -e KAYOBE_VAULT_PASSWORD -e KAYOBE_AUTOMATION_SSH_PRIVATE_KEY \
268287
${{ steps.kayobe_image.outputs.kayobe_image }} \
@@ -272,7 +291,7 @@ jobs:
272291

273292
- name: Configure aio resources
274293
run: |
275-
sudo -E docker run -t --rm \
294+
docker run -t --rm \
276295
-v $(pwd):/stack/kayobe-automation-env/src/kayobe-config \
277296
-e KAYOBE_ENVIRONMENT -e KAYOBE_VAULT_PASSWORD -e KAYOBE_AUTOMATION_SSH_PRIVATE_KEY \
278297
${{ steps.kayobe_image.outputs.kayobe_image }} \
@@ -300,7 +319,7 @@ jobs:
300319
# Now begin upgrade
301320
- name: Host upgrade
302321
run: |
303-
sudo -E docker run -t --rm \
322+
docker run -t --rm \
304323
-v $(pwd):/stack/kayobe-automation-env/src/kayobe-config \
305324
-e KAYOBE_ENVIRONMENT -e KAYOBE_VAULT_PASSWORD -e KAYOBE_AUTOMATION_SSH_PRIVATE_KEY \
306325
$KAYOBE_IMAGE \
@@ -311,7 +330,7 @@ jobs:
311330

312331
- name: Host configure
313332
run: |
314-
sudo -E docker run -t --rm \
333+
docker run -t --rm \
315334
-v $(pwd):/stack/kayobe-automation-env/src/kayobe-config \
316335
-e KAYOBE_ENVIRONMENT -e KAYOBE_VAULT_PASSWORD -e KAYOBE_AUTOMATION_SSH_PRIVATE_KEY \
317336
$KAYOBE_IMAGE \
@@ -322,7 +341,7 @@ jobs:
322341

323342
- name: Service upgrade
324343
run: |
325-
sudo -E docker run -t --rm \
344+
docker run -t --rm \
326345
-v $(pwd):/stack/kayobe-automation-env/src/kayobe-config \
327346
-e KAYOBE_ENVIRONMENT -e KAYOBE_VAULT_PASSWORD -e KAYOBE_AUTOMATION_SSH_PRIVATE_KEY \
328347
$KAYOBE_IMAGE \
@@ -334,7 +353,7 @@ jobs:
334353
- name: Tempest tests
335354
run: |
336355
mkdir -p tempest-artifacts
337-
sudo -E docker run -t --rm \
356+
docker run -t --rm \
338357
-v $(pwd):/stack/kayobe-automation-env/src/kayobe-config \
339358
-v $(pwd)/tempest-artifacts:/stack/tempest-artifacts \
340359
-e KAYOBE_ENVIRONMENT -e KAYOBE_VAULT_PASSWORD -e KAYOBE_AUTOMATION_SSH_PRIVATE_KEY \
@@ -344,7 +363,7 @@ jobs:
344363
KAYOBE_AUTOMATION_SSH_PRIVATE_KEY: ${{ steps.ssh_key.outputs.ssh_key }}
345364

346365
- name: Upload test result artifacts
347-
uses: actions/upload-artifact@v3
366+
uses: actions/upload-artifact@v4
348367
with:
349368
name: tempest-results-${{ inputs.os_distribution }}-${{ inputs.os_release }}-${{ inputs.neutron_plugin }}${{ inputs.upgrade && '-upgrade' }}
350369
path: tempest-artifacts/*
@@ -361,8 +380,3 @@ jobs:
361380
OS_APPLICATION_CREDENTIAL_ID: ${{ secrets.OS_APPLICATION_CREDENTIAL_ID }}
362381
OS_APPLICATION_CREDENTIAL_SECRET: ${{ secrets.OS_APPLICATION_CREDENTIAL_SECRET }}
363382
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-check-tags.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,29 +20,33 @@ jobs:
2020
check-tags:
2121
name: Check container image tags
2222
if: github.repository == 'stackhpc/stackhpc-kayobe-config'
23-
runs-on: [self-hosted, stackhpc-kayobe-config-aio]
23+
runs-on: arc-skc-aio-runner
2424
permissions: {}
2525
env:
2626
KAYOBE_ENVIRONMENT: ci-aio
2727
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD }}
2828
KAYOBE_IMAGE: ${{ inputs.kayobe_image }}
2929
steps:
30-
- uses: actions/checkout@v4
30+
- name: Install package dependencies
31+
run: |
32+
sudo apt update
33+
sudo apt install -y git unzip nodejs
34+
35+
- name: Checkout
36+
uses: actions/checkout@v4
3137
with:
3238
submodules: true
3339

3440
# The same tag may be reused (e.g. pr-123), so ensure we have the latest image.
3541
- name: Pull latest Kayobe image
3642
run: |
37-
sudo docker image pull $KAYOBE_IMAGE
43+
docker image pull $KAYOBE_IMAGE
3844
3945
- name: Check container image tags
4046
run: |
41-
sudo -E docker run -t --rm \
47+
docker run -t --rm \
4248
-v $(pwd):/stack/kayobe-automation-env/src/kayobe-config \
4349
-e KAYOBE_ENVIRONMENT -e KAYOBE_VAULT_PASSWORD -e KAYOBE_AUTOMATION_SSH_PRIVATE_KEY \
4450
$KAYOBE_IMAGE \
4551
/stack/kayobe-automation-env/src/kayobe-config/.automation/pipeline/playbook-run.sh \
4652
'$KAYOBE_CONFIG_PATH/ansible/check-tags.yml'
47-
#env:
48-
#KAYOBE_AUTOMATION_SSH_PRIVATE_KEY: ${{ steps.ssh_key.outputs.ssh_key }}

.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

0 commit comments

Comments
 (0)