Skip to content

Commit 41ba86c

Browse files
committed
Add periodic builds for overcloud image builds.
1 parent 7ff4a53 commit 41ba86c

File tree

324 files changed

+11744
-3866
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

324 files changed

+11744
-3866
lines changed

.ansible-lint-ignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@ etc/kayobe/ansible/vault-generate-internal-tls.yml fqcn[action-core]
55
etc/kayobe/ansible/vault-generate-test-external-tls.yml fqcn[action-core]
66
etc/kayobe/ansible/rabbitmq-reset.yml command-instead-of-module
77
etc/kayobe/ansible/ubuntu-upgrade.yml syntax-check[missing-file]
8+
etc/kayobe/ansible/check-kayobe-version.yml command-instead-of-module
9+
etc/kayobe/ansible/check-kolla-ansible-version.yml command-instead-of-module

.automation

.github/workflows/amphora-image-build.yml

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22
name: Build Amphora image
33
on:
44
workflow_dispatch:
5+
inputs:
6+
runner_env:
7+
description: Which cloud to run on?
8+
type: choice
9+
default: SMS Lab
10+
options:
11+
- SMS Lab
12+
- Leafcloud
513
secrets:
614
KAYOBE_VAULT_PASSWORD:
715
required: true
@@ -17,10 +25,17 @@ env:
1725
KAYOBE_ENVIRONMENT: ci-builder
1826
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD }}
1927
jobs:
28+
runner-selection:
29+
uses: ./.github/workflows/runner-selector.yml
30+
with:
31+
runner_env: ${{ inputs.runner_env }}
2032
amphora-image-build:
2133
name: Build Amphora image
2234
if: github.repository == 'stackhpc/stackhpc-kayobe-config'
23-
runs-on: arc-skc-host-image-builder-runner
35+
environment: ${{ inputs.runner_env }}
36+
runs-on: ${{ needs.runner-selection.outputs.runner_name_image_build }}
37+
needs:
38+
- runner-selection
2439
permissions: {}
2540
steps:
2641

@@ -90,10 +105,10 @@ jobs:
90105
aio_vm_name = "skc-amphora-image-builder"
91106
# Must be an Ubuntu Jammy host to successfully build all images
92107
# This MUST NOT be an LVM image. It can cause confusing conficts with the built image.
93-
aio_vm_image = "Ubuntu-22.04"
94-
aio_vm_flavor = "en1.medium"
95-
aio_vm_network = "stackhpc-ci"
96-
aio_vm_subnet = "stackhpc-ci"
108+
aio_vm_image = "${{ vars.HOST_IMAGE_BUILD_IMAGE }}"
109+
aio_vm_flavor = "${{ vars.HOST_IMAGE_BUILD_FLAVOR }}"
110+
aio_vm_network = "${{ vars.HOST_IMAGE_BUILD_NETWORK }}"
111+
aio_vm_subnet = "${{ vars.HOST_IMAGE_BUILD_SUBNET }}"
97112
aio_vm_interface = "ens3"
98113
EOF
99114
working-directory: ${{ github.workspace }}/src/kayobe-config/terraform/aio
@@ -122,7 +137,7 @@ jobs:
122137
exit 1
123138
working-directory: ${{ github.workspace }}/src/kayobe-config/terraform/aio
124139
env:
125-
OS_CLOUD: "openstack"
140+
OS_CLOUD: ${{ vars.OS_CLOUD }}
126141
OS_APPLICATION_CREDENTIAL_ID: ${{ secrets.OS_APPLICATION_CREDENTIAL_ID }}
127142
OS_APPLICATION_CREDENTIAL_SECRET: ${{ secrets.OS_APPLICATION_CREDENTIAL_SECRET }}
128143

@@ -250,7 +265,7 @@ jobs:
250265
run: terraform destroy -auto-approve
251266
working-directory: ${{ github.workspace }}/src/kayobe-config/terraform/aio
252267
env:
253-
OS_CLOUD: openstack
268+
OS_CLOUD: ${{ vars.OS_CLOUD }}
254269
OS_APPLICATION_CREDENTIAL_ID: ${{ secrets.OS_APPLICATION_CREDENTIAL_ID }}
255270
OS_APPLICATION_CREDENTIAL_SECRET: ${{ secrets.OS_APPLICATION_CREDENTIAL_SECRET }}
256271
if: always()

.github/workflows/ipa-image-build.yml

Lines changed: 19 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ on:
77
description: Build Rocky Linux 9
88
type: boolean
99
default: true
10-
ubuntu-jammy:
11-
description: Build Ubuntu 22.04 Jammy
10+
ubuntu-noble:
11+
description: Build Ubuntu 24.04 Noble
1212
type: boolean
1313
default: true
1414
runner_env:
@@ -212,20 +212,20 @@ jobs:
212212
env:
213213
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD }}
214214

215-
- name: Build a Ubuntu 22.04 Jammy IPA image
216-
id: build_ubuntu_jammy_ipa
215+
- name: Build a Ubuntu 24.04 Noble IPA image
216+
id: build_ubuntu_noble_ipa
217217
continue-on-error: true
218218
run: |
219219
source venvs/kayobe/bin/activate &&
220220
source src/kayobe-config/kayobe-env --environment ci-builder &&
221221
kayobe overcloud deployment image build --force-rebuild \
222222
-e os_distribution="ubuntu" \
223-
-e os_release="jammy" \
223+
-e os_release="noble" \
224224
-e ipa_ci_builder_distribution="ubuntu" \
225-
-e ipa_ci_builder_release="jammy"
225+
-e ipa_ci_builder_release="noble"
226226
env:
227227
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD }}
228-
if: inputs.ubuntu-jammy
228+
if: inputs.ubuntu-noble
229229

230230
- name: Show last error logs
231231
continue-on-error: true
@@ -235,9 +235,9 @@ jobs:
235235
kayobe seed host command run --command "tail -200 /opt/kayobe/images/ipa/ipa.stdout" --show-output
236236
env:
237237
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD }}
238-
if: steps.build_ubuntu_jammy_ipa.outcome == 'failure'
238+
if: steps.build_ubuntu_noble_ipa.outcome == 'failure'
239239

240-
- name: Upload Ubuntu 22.04 Jammy IPA kernel image to Ark
240+
- name: Upload Ubuntu 24.04 Noble IPA kernel image to Ark
241241
run: |
242242
source venvs/kayobe/bin/activate &&
243243
source src/kayobe-config/kayobe-env --environment ci-builder &&
@@ -247,14 +247,13 @@ jobs:
247247
-e artifact_type=ipa-images \
248248
-e artifact_tag=${{ steps.ipa_image_tag.outputs.ipa_image_tag }} \
249249
-e os_distribution="ubuntu" \
250-
-e os_release="jammy" \
251-
-e file_regex='*.kernel' \
252-
-e upload_checksum=true
250+
-e os_release="noble" \
251+
-e file_regex='*.kernel'
253252
env:
254253
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD }}
255-
if: inputs.ubuntu-jammy && steps.build_ubuntu_jammy_ipa.outcome == 'success'
254+
if: inputs.ubuntu-noble && steps.build_ubuntu_noble_ipa.outcome == 'success'
256255

257-
- name: Upload Ubuntu 22.04 Jammy IPA ramdisk image to Ark
256+
- name: Upload Ubuntu 24.04 Noble IPA ramdisk image to Ark
258257
run: |
259258
source venvs/kayobe/bin/activate &&
260259
source src/kayobe-config/kayobe-env --environment ci-builder &&
@@ -264,12 +263,11 @@ jobs:
264263
-e artifact_type=ipa-images \
265264
-e artifact_tag=${{ steps.ipa_image_tag.outputs.ipa_image_tag }} \
266265
-e os_distribution="ubuntu" \
267-
-e os_release="jammy" \
268-
-e file_regex='*.initramfs' \
269-
-e upload_checksum=true
266+
-e os_release="noble" \
267+
-e file_regex='*.initramfs'
270268
env:
271269
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD }}
272-
if: inputs.ubuntu-jammy && steps.build_ubuntu_jammy_ipa.outcome == 'success'
270+
if: inputs.ubuntu-noble && steps.build_ubuntu_noble_ipa.outcome == 'success'
273271

274272
- name: Build a Rocky 9 IPA image
275273
id: build_rocky_9_ipa
@@ -307,8 +305,7 @@ jobs:
307305
-e artifact_tag=${{ steps.ipa_image_tag.outputs.ipa_image_tag }} \
308306
-e os_distribution="rocky" \
309307
-e os_release="9" \
310-
-e file_regex='*.kernel' \
311-
-e upload_checksum=true
308+
-e file_regex='*.kernel'
312309
env:
313310
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD }}
314311
if: inputs.rocky9 && steps.build_rocky_9_ipa.outcome == 'success'
@@ -324,8 +321,7 @@ jobs:
324321
-e artifact_tag=${{ steps.ipa_image_tag.outputs.ipa_image_tag }} \
325322
-e os_distribution="rocky" \
326323
-e os_release="9" \
327-
-e file_regex='*.initramfs' \
328-
-e upload_checksum=true
324+
-e file_regex='*.initramfs'
329325
env:
330326
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD }}
331327
if: inputs.rocky9 && steps.build_rocky_9_ipa.outcome == 'success'
@@ -348,7 +344,7 @@ jobs:
348344
echo "Builds failed. See workflow artifacts for details." &&
349345
exit 1
350346
if: steps.build_rocky_9_ipa.outcome == 'failure' ||
351-
steps.build_ubuntu_jammy_ipa.outcome == 'failure'
347+
steps.build_ubuntu_noble_ipa.outcome == 'failure'
352348

353349
- name: Destroy
354350
run: terraform destroy -auto-approve

.github/workflows/ipa-image-promote.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ on:
77
description: Promote Rocky Linux 9
88
type: boolean
99
default: true
10-
ubuntu-jammy:
11-
description: Promote Ubuntu 22.04 Jammy
10+
ubuntu-noble:
11+
description: Promote Ubuntu 24.04 Noble
1212
type: boolean
1313
default: true
1414
image_tag:
@@ -21,11 +21,11 @@ jobs:
2121
ipa-image-promote:
2222
name: Promote IPA image
2323
if: github.repository == 'stackhpc/stackhpc-kayobe-config'
24-
runs-on: ubuntu-22.04
24+
runs-on: ubuntu-latest
2525
steps:
2626
- name: Validate inputs
2727
run: |
28-
if [[ ${{ inputs.rocky9 }} == 'false' && ${{ inputs.ubuntu-jammy }} == 'false' ]]; then
28+
if [[ ${{ inputs.rocky9 }} == 'false' && ${{ inputs.ubuntu-noble }} == 'false' ]]; then
2929
echo "At least one distribution must be selected"
3030
exit 1
3131
fi
@@ -85,16 +85,16 @@ jobs:
8585
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD }}
8686
if: inputs.rocky9
8787

88-
- name: Promote Ubuntu Jammy 22.04 IPA image artifact
88+
- name: Promote Ubuntu Noble 24.04 IPA image artifact
8989
run: |
9090
source venvs/kayobe/bin/activate &&
9191
source src/kayobe-config/kayobe-env --environment ci-builder &&
9292
kayobe playbook run \
9393
src/kayobe-config/etc/kayobe/ansible/pulp-artifact-promote.yml \
9494
-e artifact_type="ipa-images" \
9595
-e os_distribution='ubuntu' \
96-
-e os_release='jammy'
96+
-e os_release='noble'
9797
env:
9898
ARTIFACT_TAG: ${{ inputs.image_tag }}
9999
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD }}
100-
if: inputs.ubuntu-jammy
100+
if: inputs.ubuntu-noble

.github/workflows/multinode-inputs.py

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ class OSRelease:
1717
@dataclass
1818
class OpenStackRelease:
1919
version: str
20-
previous_version: str
2120
os_releases: t.List[OSRelease]
2221

2322

@@ -31,12 +30,15 @@ class Scenario:
3130

3231
ROCKY_9 = OSRelease("rocky", "9", "cloud-user")
3332
UBUNTU_JAMMY = OSRelease("ubuntu", "jammy", "ubuntu")
33+
UBUNTU_NOBLE = OSRelease("ubuntu", "noble", "ubuntu")
3434
# NOTE(upgrade): Add supported releases here.
3535
OPENSTACK_RELEASES = [
36-
OpenStackRelease("2024.1", "2023.1", [ROCKY_9, UBUNTU_JAMMY]),
37-
OpenStackRelease("2023.1", "zed", [ROCKY_9, UBUNTU_JAMMY]),
36+
OpenStackRelease("2023.1", [ROCKY_9, UBUNTU_JAMMY]),
37+
OpenStackRelease("2024.1", [ROCKY_9, UBUNTU_JAMMY]),
38+
OpenStackRelease("2025.1", [ROCKY_9, UBUNTU_NOBLE]),
3839
]
3940
NEUTRON_PLUGINS = ["ovs", "ovn"]
41+
VERSION_HIERARCHY = ["zed", "2023.1", "2024.1", "2025.1"]
4042

4143

4244
def main() -> None:
@@ -50,13 +52,20 @@ def random_scenario() -> Scenario:
5052
openstack_release = random.choice(OPENSTACK_RELEASES)
5153
os_release = random.choice(openstack_release.os_releases)
5254
neutron_plugin = random.choice(NEUTRON_PLUGINS)
53-
upgrade = 'major' if random.random() > 0.6 else 'none'
55+
upgrade = "major" if random.random() > 0.6 else "none"
5456
return Scenario(openstack_release, os_release, neutron_plugin, upgrade)
5557

5658

5759
def generate_inputs(scenario: Scenario) -> t.Dict[str, str]:
5860
branch = get_branch(scenario.openstack_release.version)
59-
previous_branch = get_branch(scenario.openstack_release.previous_version)
61+
previous_branch = get_branch(
62+
VERSION_HIERARCHY[
63+
VERSION_HIERARCHY.index(scenario.openstack_release.version) - 1
64+
]
65+
)
66+
terraform_kayobe_multinode_version = get_tkm_version(
67+
scenario.openstack_release.version
68+
)
6069
inputs = {
6170
"os_distribution": scenario.os_release.distribution,
6271
"os_release": scenario.os_release.release,
@@ -65,6 +74,7 @@ def generate_inputs(scenario: Scenario) -> t.Dict[str, str]:
6574
"upgrade": scenario.upgrade,
6675
"stackhpc_kayobe_config_version": branch,
6776
"stackhpc_kayobe_config_previous_version": previous_branch,
77+
"terraform_kayobe_multinode_version": terraform_kayobe_multinode_version,
6878
}
6979
return inputs
7080

@@ -73,6 +83,13 @@ def get_branch(version: str) -> str:
7383
return f"stackhpc/{version}"
7484

7585

86+
def get_tkm_version(version: str) -> str:
87+
if version in ["zed", "2023.1"]:
88+
return "ea61ea1730e179e05e8f0e58b759267664c555e7"
89+
else:
90+
return "main"
91+
92+
7693
def write_output(name: str, value: str) -> None:
7794
print(f"{name}={value}")
7895

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
name: Periodic overcloud host images build
3+
on:
4+
schedule:
5+
# Runs every Monday at 3:30 AM ("30 3 * * 1").
6+
- cron: "30 3 * * 1"
7+
8+
jobs:
9+
x86-overcloud-host-image-build:
10+
name: Build x86_64 overcloud host images
11+
uses: ./.github/workflows/overcloud-host-image-build.yml
12+
with:
13+
runner_env: "SMS Lab"
14+
cpu-platform-architecture: "x86_64"
15+
rocky9: true
16+
ubuntu-noble: true
17+
ubuntu-jammy: true
18+
secrets: inherit
19+
if: github.repository == 'stackhpc/stackhpc-kayobe-config'
20+
21+
aarch64-overcloud-host-image-build:
22+
name: Build aarch64 overcloud host images
23+
uses: ./.github/workflows/overcloud-host-image-build.yml
24+
with:
25+
runner_env: "SMS Lab"
26+
cpu-platform-architecture: "aarch64"
27+
rocky9: true
28+
ubuntu-noble: true
29+
ubuntu-jammy: true
30+
secrets: inherit
31+
if: github.repository == 'stackhpc/stackhpc-kayobe-config'

0 commit comments

Comments
 (0)