Skip to content

Commit 693bd94

Browse files
authored
Merge pull request #917 from stackhpc/CleanAiOChanges
CI: Use ARC runners for aio jobs, move CI to Leafcloud
2 parents 0dfbb94 + af73161 commit 693bd94

File tree

10 files changed

+119
-44
lines changed

10 files changed

+119
-44
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ jobs:
362362
if: inputs.ubuntu-jammy && steps.build_ubuntu_jammy.outcome == 'success'
363363

364364
- name: Upload updated images artifact
365-
uses: actions/upload-artifact@v3
365+
uses: actions/upload-artifact@v4
366366
with:
367367
name: Updated images list
368368
path: /tmp/updated_images.txt
@@ -374,7 +374,7 @@ jobs:
374374
steps.build_ubuntu_jammy.outcome == 'success'
375375

376376
- name: Upload CentOS build logs if build failed
377-
uses: actions/upload-artifact@v3
377+
uses: actions/upload-artifact@v4
378378
with:
379379
name: CentOS build logs
380380
path: |
@@ -384,7 +384,7 @@ jobs:
384384
if: steps.build_centos_stream_8.outcome == 'failure'
385385

386386
- name: Upload Rocky 8 build logs if build failed
387-
uses: actions/upload-artifact@v3
387+
uses: actions/upload-artifact@v4
388388
with:
389389
name: Rocky 8 build logs
390390
path: |
@@ -394,7 +394,7 @@ jobs:
394394
if: steps.build_rocky_8.outcome == 'failure'
395395

396396
- name: Upload Rocky 9 build logs if build failed
397-
uses: actions/upload-artifact@v3
397+
uses: actions/upload-artifact@v4
398398
with:
399399
name: Rocky 9 build logs
400400
path: |
@@ -404,7 +404,7 @@ jobs:
404404
if: steps.build_rocky_9.outcome == 'failure'
405405

406406
- name: Upload Ubuntu Focal 20.04 build logs if build failed
407-
uses: actions/upload-artifact@v3
407+
uses: actions/upload-artifact@v4
408408
with:
409409
name: Ubuntu Focal 20.04 build logs
410410
path: |
@@ -414,7 +414,7 @@ jobs:
414414
if: steps.build_ubuntu_focal.outcome == 'failure'
415415

416416
- name: Upload Ubuntu Jammy 22.04 build logs if build failed
417-
uses: actions/upload-artifact@v3
417+
uses: actions/upload-artifact@v4
418418
with:
419419
name: Ubuntu Jammy 22.04 build logs
420420
path: |

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

Lines changed: 22 additions & 13 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
@@ -70,17 +70,26 @@ jobs:
7070
all-in-one:
7171
name: All in one
7272
if: inputs.if
73-
runs-on: [self-hosted, stackhpc-kayobe-config-aio]
73+
runs-on: arc-skc-aio-runner
7474
permissions: {}
7575
env:
7676
KAYOBE_ENVIRONMENT: ci-aio
7777
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD }}
7878
KAYOBE_IMAGE: ${{ inputs.kayobe_image }}
7979
steps:
80+
- name: Install Package
81+
uses: ConorMacBride/install-package@main
82+
with:
83+
apt: build-essential git unzip nodejs python3 python3-pip python3-wheel python-is-python3
84+
8085
- uses: actions/checkout@v4
8186
with:
8287
submodules: true
8388

89+
- name: Make sure dockerd is running and test Docker.
90+
run: |
91+
docker run --rm hello-world
92+
8493
- name: Output image tag
8594
id: image_tag
8695
run: |
@@ -209,11 +218,11 @@ jobs:
209218
# The same tag may be reused (e.g. pr-123), so ensure we have the latest image.
210219
- name: Pull latest Kayobe image
211220
run: |
212-
sudo docker image pull $KAYOBE_IMAGE
221+
docker image pull $KAYOBE_IMAGE
213222
214223
- name: Run growroot
215224
run: |
216-
sudo -E docker run -t --rm \
225+
docker run -t --rm \
217226
-v $(pwd):/stack/kayobe-automation-env/src/kayobe-config \
218227
-e KAYOBE_ENVIRONMENT -e KAYOBE_VAULT_PASSWORD -e KAYOBE_AUTOMATION_SSH_PRIVATE_KEY \
219228
$KAYOBE_IMAGE \
@@ -223,7 +232,7 @@ jobs:
223232

224233
- name: Host configure
225234
run: |
226-
sudo -E docker run -t --rm \
235+
docker run -t --rm \
227236
-v $(pwd):/stack/kayobe-automation-env/src/kayobe-config \
228237
-e KAYOBE_ENVIRONMENT -e KAYOBE_VAULT_PASSWORD -e KAYOBE_AUTOMATION_SSH_PRIVATE_KEY \
229238
$KAYOBE_IMAGE \
@@ -233,7 +242,7 @@ jobs:
233242

234243
- name: Service deploy
235244
run: |
236-
sudo -E docker run -t --rm \
245+
docker run -t --rm \
237246
-v $(pwd):/stack/kayobe-automation-env/src/kayobe-config \
238247
-e KAYOBE_ENVIRONMENT -e KAYOBE_VAULT_PASSWORD -e KAYOBE_AUTOMATION_SSH_PRIVATE_KEY \
239248
$KAYOBE_IMAGE \
@@ -243,7 +252,7 @@ jobs:
243252

244253
- name: Configure aio resources
245254
run: |
246-
sudo -E docker run -t --rm \
255+
docker run -t --rm \
247256
-v $(pwd):/stack/kayobe-automation-env/src/kayobe-config \
248257
-e KAYOBE_ENVIRONMENT -e KAYOBE_VAULT_PASSWORD -e KAYOBE_AUTOMATION_SSH_PRIVATE_KEY \
249258
$KAYOBE_IMAGE \
@@ -254,7 +263,7 @@ jobs:
254263
- name: Tempest tests
255264
run: |
256265
mkdir -p tempest-artifacts
257-
sudo -E docker run -t --rm \
266+
docker run -t --rm \
258267
-v $(pwd):/stack/kayobe-automation-env/src/kayobe-config \
259268
-v $(pwd)/tempest-artifacts:/stack/tempest-artifacts \
260269
-e KAYOBE_ENVIRONMENT -e KAYOBE_VAULT_PASSWORD -e KAYOBE_AUTOMATION_SSH_PRIVATE_KEY \
@@ -264,7 +273,7 @@ jobs:
264273
KAYOBE_AUTOMATION_SSH_PRIVATE_KEY: ${{ steps.ssh_key.outputs.ssh_key }}
265274

266275
- name: Upload test result artifacts
267-
uses: actions/upload-artifact@v3
276+
uses: actions/upload-artifact@v4
268277
with:
269278
name: tempest-results-${{ inputs.os_distribution }}-${{ inputs.os_release }}-${{ inputs.neutron_plugin }}
270279
path: tempest-artifacts/*
@@ -284,5 +293,5 @@ jobs:
284293

285294
- name: Prune Docker images over 1 week old
286295
# May fail if another prune is running
287-
run: sudo docker image prune --all --force --filter until=168h || true
296+
run: docker image prune --all --force --filter until=168h || true
288297
if: always()

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

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,20 +52,20 @@ jobs:
5252
submodules: true
5353

5454
- name: Log in to the Container registry
55-
uses: docker/login-action@v2
55+
uses: docker/login-action@v3
5656
with:
5757
registry: ${{ env.REGISTRY }}
5858
username: ${{ github.actor }}
5959
password: ${{ secrets.GITHUB_TOKEN }}
6060

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

6767
- name: Set up Docker Buildx
68-
uses: docker/setup-buildx-action@v2
68+
uses: docker/setup-buildx-action@v3
6969
with:
7070
driver-opts: |
7171
image=moby/buildkit:master
@@ -78,14 +78,18 @@ jobs:
7878
https_proxy: ${{ inputs.https_proxy }}
7979
no_proxy: ${{ inputs.no_proxy }}
8080

81+
# Setting KAYOBE_USER_UID and KAYOBE_USER_GID to 1001 to match docker's defaults
82+
# so that docker can run as a privileged user within the Kayobe image.
8183
- name: Build and push Docker image
82-
uses: docker/build-push-action@v3
84+
uses: docker/build-push-action@v4
8385
with:
8486
file: ./.automation/docker/kayobe/Dockerfile
8587
context: .
8688
build-args: |
8789
http_proxy=${{ inputs.http_proxy }}
8890
https_proxy=${{ inputs.https_proxy }}
91+
KAYOBE_USER_UID=1001
92+
KAYOBE_USER_GID=1001
8993
push: true
9094
tags: ${{ steps.meta.outputs.tags }}
9195
labels: ${{ steps.meta.outputs.labels }}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ jobs:
209209
run: if [ $(wc -l < ${{ matrix.distro }}-container-images) -le 1 ]; then exit 1; fi
210210

211211
- name: Upload container images artifact
212-
uses: actions/upload-artifact@v3
212+
uses: actions/upload-artifact@v4
213213
with:
214214
name: ${{ matrix.distro }} container images
215215
path: ${{ matrix.distro }}-container-images

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

Lines changed: 12 additions & 12 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 📦
@@ -85,7 +85,7 @@ jobs:
8585
with:
8686
kayobe_image: ${{ needs.build-kayobe-image.outputs.kayobe_image }}
8787
neutron_plugin: ovs
88-
OS_CLOUD: sms-lab-release
88+
OS_CLOUD: openstack
8989
if: ${{ needs.check-changes.outputs.aio == 'true' }}
9090
secrets: inherit
9191
if: ${{ ! failure() && github.repository == 'stackhpc/stackhpc-kayobe-config' }}
@@ -99,7 +99,7 @@ jobs:
9999
with:
100100
kayobe_image: ${{ needs.build-kayobe-image.outputs.kayobe_image }}
101101
neutron_plugin: ovn
102-
OS_CLOUD: sms-lab-release
102+
OS_CLOUD: openstack
103103
if: ${{ needs.check-changes.outputs.aio == 'true' }}
104104
secrets: inherit
105105
if: ${{ ! failure() && github.repository == 'stackhpc/stackhpc-kayobe-config' }}
@@ -115,7 +115,7 @@ jobs:
115115
os_distribution: rocky
116116
os_release: "8"
117117
neutron_plugin: ovs
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' }}
@@ -131,7 +131,7 @@ jobs:
131131
os_distribution: rocky
132132
os_release: "8"
133133
neutron_plugin: ovn
134-
OS_CLOUD: sms-lab-release
134+
OS_CLOUD: openstack
135135
if: ${{ needs.check-changes.outputs.aio == 'true' }}
136136
secrets: inherit
137137
if: ${{ ! failure() && github.repository == 'stackhpc/stackhpc-kayobe-config' }}
@@ -148,7 +148,7 @@ jobs:
148148
os_release: focal
149149
ssh_username: ubuntu
150150
neutron_plugin: ovs
151-
OS_CLOUD: sms-lab-release
151+
OS_CLOUD: openstack
152152
if: ${{ needs.check-changes.outputs.aio == 'true' }}
153153
secrets: inherit
154154
if: ${{ ! failure() && github.repository == 'stackhpc/stackhpc-kayobe-config' }}
@@ -165,7 +165,7 @@ jobs:
165165
os_release: focal
166166
ssh_username: ubuntu
167167
neutron_plugin: ovn
168-
OS_CLOUD: sms-lab-release
168+
OS_CLOUD: openstack
169169
if: ${{ needs.check-changes.outputs.aio == 'true' }}
170170
secrets: inherit
171171
if: ${{ ! failure() && github.repository == 'stackhpc/stackhpc-kayobe-config' }}
@@ -182,7 +182,7 @@ jobs:
182182
os_release: jammy
183183
ssh_username: ubuntu
184184
neutron_plugin: ovs
185-
OS_CLOUD: sms-lab-release
185+
OS_CLOUD: openstack
186186
if: ${{ needs.check-changes.outputs.aio == 'true' }}
187187
secrets: inherit
188188
if: ${{ ! failure() && github.repository == 'stackhpc/stackhpc-kayobe-config' }}
@@ -199,7 +199,7 @@ jobs:
199199
os_release: jammy
200200
ssh_username: ubuntu
201201
neutron_plugin: ovn
202-
OS_CLOUD: sms-lab-release
202+
OS_CLOUD: openstack
203203
if: ${{ needs.check-changes.outputs.aio == 'true' }}
204204
secrets: inherit
205205
if: ${{ ! failure() && github.repository == 'stackhpc/stackhpc-kayobe-config' }}
@@ -216,7 +216,7 @@ jobs:
216216
os_release: "9"
217217
ssh_username: cloud-user
218218
neutron_plugin: ovs
219-
OS_CLOUD: sms-lab-release
219+
OS_CLOUD: openstack
220220
if: ${{ needs.check-changes.outputs.aio == 'true' }}
221221
secrets: inherit
222222
if: ${{ ! failure() && github.repository == 'stackhpc/stackhpc-kayobe-config' }}
@@ -233,7 +233,7 @@ jobs:
233233
os_release: "9"
234234
ssh_username: cloud-user
235235
neutron_plugin: ovn
236-
OS_CLOUD: sms-lab-release
236+
OS_CLOUD: openstack
237237
if: ${{ needs.check-changes.outputs.aio == 'true' }}
238238
secrets: inherit
239239
if: ${{ ! failure() && github.repository == 'stackhpc/stackhpc-kayobe-config' }}

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)