Skip to content

2023.1: Update to Rocky 9.3 based kolla images #910

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 34 commits into from
Feb 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
4c67cf3
CI: Add upgrade tests
markgoddard Jan 12, 2024
653c886
Move Kolla image tags to a separate file
markgoddard Sep 14, 2023
0cfa548
Add base distro version to Kolla image tag definitions
markgoddard Oct 3, 2023
fafc68a
Add kolla-images.py
markgoddard Oct 3, 2023
8d8f6e0
Remove iscsid from Pulp image list
markgoddard Oct 23, 2023
eee5481
CI: Trigger container image promotion automatically after merge
markgoddard Oct 24, 2023
d1262ba
Automatically define Kolla Ansible tag variables in globals.yml
markgoddard Oct 24, 2023
ae21932
CI: Add a job to check whether all expected images are in Test Pulp
markgoddard Oct 25, 2023
82a194a
kolla-images.py: Remove unnecessary strips, support unmaintained bran…
markgoddard Jan 29, 2024
4e90858
kolla-images.py: Check for existence of skopeo
markgoddard Jan 29, 2024
14f8eda
Merge pull request #899 from stackhpc/zed-yoga-merge
markgoddard Jan 29, 2024
0337190
zed: Update bifrost image for Ubuntu Jammy
markgoddard Jan 29, 2024
0bdc266
kolla-images.py: Fix container to image tag lookup corner case
markgoddard Jan 29, 2024
3d842a1
CI: Update to checkout action v4 in aio job
markgoddard Jan 29, 2024
85b1e3c
Merge pull request #869 from stackhpc/zed-upgrade-ci-test
markgoddard Jan 31, 2024
ee5fa79
Merge pull request #663 from stackhpc/zed-auto-tags
markgoddard Feb 2, 2024
db66fee
Merge remote-tracking branch 'origin/stackhpc/zed' into HEAD
jovial Feb 2, 2024
5466b08
Fix variable name
jovial Feb 2, 2024
62b9e2b
Fix issue with pulp sync
jovial Feb 2, 2024
d2424a9
Fix for haproxy-ssh
jovial Feb 2, 2024
189e00b
Merge remote-tracking branch 'origin/bugfix/zed/pulp-sync-fix' into HEAD
jovial Feb 2, 2024
e7a23b7
Adjust tags to container distro version
jovial Feb 2, 2024
806f838
2023.1: Update to Rocky 9.3 based kolla images
jovial Feb 2, 2024
7e44433
Update other variable
jovial Feb 2, 2024
46d126d
Another fixup
jovial Feb 2, 2024
f7b70e6
Merge remote-tracking branch 'origin/bugfix/zed/pulp-sync-fix' into s…
jovial Feb 2, 2024
793f876
Revert "Fix for haproxy-ssh"
jovial Feb 2, 2024
210d2f5
Real fix for haproxy-ssh
jovial Feb 2, 2024
95fd537
Merge remote-tracking branch 'origin/sync/zed-into-2023.1' into HEAD
jovial Feb 2, 2024
5c2aecb
Revert change to automation
jovial Feb 2, 2024
b653647
Merge remote-tracking branch 'origin/sync/zed-into-2023.1' into HEAD
jovial Feb 2, 2024
7b5f902
Update previous release
jovial Feb 5, 2024
12a24c1
Merge remote-tracking branch 'origin/sync/zed-into-2023.1' into featu…
jovial Feb 5, 2024
e9c68d4
Add letsencrypt and haproxy-ssh images
jovial Feb 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 88 additions & 8 deletions .github/workflows/stackhpc-all-in-one.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ on:
description: Whether to run the workflow (workaround for required status checks issue)
type: boolean
default: true
upgrade:
description: Whether to perform an upgrade
type: boolean
default: false
secrets:
KAYOBE_VAULT_PASSWORD:
required: true
Expand All @@ -76,10 +80,27 @@ jobs:
KAYOBE_ENVIRONMENT: ci-aio
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD }}
KAYOBE_IMAGE: ${{ inputs.kayobe_image }}
# NOTE(upgrade): Reference the PREVIOUS release here.
PREVIOUS_KAYOBE_IMAGE: ghcr.io/stackhpc/stackhpc-kayobe-config:stackhpc-zed
# NOTE(upgrade): Reference the PREVIOUS release branch here.
PREVIOUS_BRANCH: stackhpc/zed
steps:
- uses: actions/checkout@v3
# If testing upgrade, checkout previous release, otherwise checkout current branch
- name: Checkout ${{ inputs.upgrade && 'previous release' || 'current' }} config
uses: actions/checkout@v4
with:
submodules: true
ref: ${{ inputs.upgrade && env.PREVIOUS_BRANCH || github.ref }}
submodules: true

- name: Output Kayobe image
id: kayobe_image
run: |
if ${{ inputs.upgrade }}; then
kayobe_image=$PREVIOUS_KAYOBE_IMAGE
else
kayobe_image=$KAYOBE_IMAGE
fi
echo kayobe_image=$kayobe_image >> $GITHUB_OUTPUT

- name: Output image tag
id: image_tag
Expand Down Expand Up @@ -125,6 +146,7 @@ jobs:
aio_vm_flavor = "${{ env.VM_FLAVOR }}"
aio_vm_network = "${{ env.VM_NETWORK }}"
aio_vm_subnet = "${{ env.VM_SUBNET }}"
aio_vm_volume_size = "${{ env.VM_VOLUME_SIZE }}"
EOF
working-directory: ${{ github.workspace }}/terraform/aio
env:
Expand All @@ -135,6 +157,7 @@ jobs:
VM_NETWORK: ${{ inputs.vm_network }}
VM_SUBNET: ${{ inputs.vm_subnet }}
VM_INTERFACE: ${{ inputs.vm_interface }}
VM_VOLUME_SIZE: ${{ inputs.upgrade && '45' || '35' }}

- name: Terraform Plan
run: terraform plan
Expand Down Expand Up @@ -206,8 +229,14 @@ jobs:
cat terraform/aio/id_rsa >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT

# The same tag may be reused (e.g. stackhpc/yoga), so ensure we have the latest image.
- name: Pull previous Kayobe image
run: |
sudo docker image pull ${{ steps.kayobe_image.outputs.kayobe_image }}
if: inputs.upgrade

# The same tag may be reused (e.g. pr-123), so ensure we have the latest image.
- name: Pull latest Kayobe image
- name: Pull current Kayobe image
run: |
sudo docker image pull $KAYOBE_IMAGE

Expand All @@ -216,7 +245,7 @@ jobs:
sudo -E docker run -t --rm \
-v $(pwd):/stack/kayobe-automation-env/src/kayobe-config \
-e KAYOBE_ENVIRONMENT -e KAYOBE_VAULT_PASSWORD -e KAYOBE_AUTOMATION_SSH_PRIVATE_KEY \
$KAYOBE_IMAGE \
${{ steps.kayobe_image.outputs.kayobe_image }} \
/stack/kayobe-automation-env/src/kayobe-config/.automation/pipeline/playbook-run.sh '$KAYOBE_CONFIG_PATH/ansible/growroot.yml'
env:
KAYOBE_AUTOMATION_SSH_PRIVATE_KEY: ${{ steps.ssh_key.outputs.ssh_key }}
Expand All @@ -226,7 +255,7 @@ jobs:
sudo -E docker run -t --rm \
-v $(pwd):/stack/kayobe-automation-env/src/kayobe-config \
-e KAYOBE_ENVIRONMENT -e KAYOBE_VAULT_PASSWORD -e KAYOBE_AUTOMATION_SSH_PRIVATE_KEY \
$KAYOBE_IMAGE \
${{ steps.kayobe_image.outputs.kayobe_image }} \
/stack/kayobe-automation-env/src/kayobe-config/.automation/pipeline/overcloud-host-configure.sh
env:
KAYOBE_AUTOMATION_SSH_PRIVATE_KEY: ${{ steps.ssh_key.outputs.ssh_key }}
Expand All @@ -236,7 +265,7 @@ jobs:
sudo -E docker run -t --rm \
-v $(pwd):/stack/kayobe-automation-env/src/kayobe-config \
-e KAYOBE_ENVIRONMENT -e KAYOBE_VAULT_PASSWORD -e KAYOBE_AUTOMATION_SSH_PRIVATE_KEY \
$KAYOBE_IMAGE \
${{ steps.kayobe_image.outputs.kayobe_image }} \
/stack/kayobe-automation-env/src/kayobe-config/.automation/pipeline/overcloud-service-deploy.sh
env:
KAYOBE_AUTOMATION_SSH_PRIVATE_KEY: ${{ steps.ssh_key.outputs.ssh_key }}
Expand All @@ -246,11 +275,62 @@ jobs:
sudo -E docker run -t --rm \
-v $(pwd):/stack/kayobe-automation-env/src/kayobe-config \
-e KAYOBE_ENVIRONMENT -e KAYOBE_VAULT_PASSWORD -e KAYOBE_AUTOMATION_SSH_PRIVATE_KEY \
$KAYOBE_IMAGE \
${{ steps.kayobe_image.outputs.kayobe_image }} \
/stack/kayobe-automation-env/src/kayobe-config/.automation/pipeline/playbook-run.sh etc/kayobe/ansible/configure-aio-resources.yml
env:
KAYOBE_AUTOMATION_SSH_PRIVATE_KEY: ${{ steps.ssh_key.outputs.ssh_key }}

# If testing upgrade, checkout the current release branch
# Stash changes to tracked files, and set clean=false to avoid removing untracked files.
- name: Stash config changes
run: git stash
if: inputs.upgrade

- name: Checkout current release config
uses: actions/checkout@v4
with:
submodules: true
clean: false
if: inputs.upgrade

- name: Pop stashed config changes
run: git stash pop
if: inputs.upgrade

# Now begin upgrade
- name: Host upgrade
run: |
sudo -E docker run -t --rm \
-v $(pwd):/stack/kayobe-automation-env/src/kayobe-config \
-e KAYOBE_ENVIRONMENT -e KAYOBE_VAULT_PASSWORD -e KAYOBE_AUTOMATION_SSH_PRIVATE_KEY \
$KAYOBE_IMAGE \
/stack/kayobe-automation-env/src/kayobe-config/.automation/pipeline/overcloud-host-upgrade.sh
env:
KAYOBE_AUTOMATION_SSH_PRIVATE_KEY: ${{ steps.ssh_key.outputs.ssh_key }}
if: inputs.upgrade

- name: Host configure
run: |
sudo -E docker run -t --rm \
-v $(pwd):/stack/kayobe-automation-env/src/kayobe-config \
-e KAYOBE_ENVIRONMENT -e KAYOBE_VAULT_PASSWORD -e KAYOBE_AUTOMATION_SSH_PRIVATE_KEY \
$KAYOBE_IMAGE \
/stack/kayobe-automation-env/src/kayobe-config/.automation/pipeline/overcloud-host-configure.sh
env:
KAYOBE_AUTOMATION_SSH_PRIVATE_KEY: ${{ steps.ssh_key.outputs.ssh_key }}
if: inputs.upgrade

- name: Service upgrade
run: |
sudo -E docker run -t --rm \
-v $(pwd):/stack/kayobe-automation-env/src/kayobe-config \
-e KAYOBE_ENVIRONMENT -e KAYOBE_VAULT_PASSWORD -e KAYOBE_AUTOMATION_SSH_PRIVATE_KEY \
$KAYOBE_IMAGE \
/stack/kayobe-automation-env/src/kayobe-config/.automation/pipeline/overcloud-service-upgrade.sh
env:
KAYOBE_AUTOMATION_SSH_PRIVATE_KEY: ${{ steps.ssh_key.outputs.ssh_key }}
if: inputs.upgrade

- name: Tempest tests
run: |
mkdir -p tempest-artifacts
Expand All @@ -266,7 +346,7 @@ jobs:
- name: Upload test result artifacts
uses: actions/upload-artifact@v3
with:
name: tempest-results-${{ inputs.os_distribution }}-${{ inputs.os_release }}-${{ inputs.neutron_plugin }}
name: tempest-results-${{ inputs.os_distribution }}-${{ inputs.os_release }}-${{ inputs.neutron_plugin }}${{ inputs.upgrade && '-upgrade' }}
path: tempest-artifacts/*

- name: Fail if any Tempest tests failed
Expand Down
48 changes: 48 additions & 0 deletions .github/workflows/stackhpc-check-tags.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
# This workflow queries the Test Pulp server to check that all image tags
# specified in kolla_image_tags are present.

name: Check container image tags
on:
workflow_call:
inputs:
kayobe_image:
description: Kayobe container image
type: string
required: true
secrets:
KAYOBE_VAULT_PASSWORD:
required: true

env:
ANSIBLE_FORCE_COLOR: True
jobs:
check-tags:
name: Check container image tags
if: github.repository == 'stackhpc/stackhpc-kayobe-config'
runs-on: [self-hosted, stackhpc-kayobe-config-aio]
permissions: {}
env:
KAYOBE_ENVIRONMENT: ci-aio
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD }}
KAYOBE_IMAGE: ${{ inputs.kayobe_image }}
steps:
- uses: actions/checkout@v4
with:
submodules: true

# The same tag may be reused (e.g. pr-123), so ensure we have the latest image.
- name: Pull latest Kayobe image
run: |
sudo docker image pull $KAYOBE_IMAGE

- name: Check container image tags
run: |
sudo -E docker run -t --rm \
-v $(pwd):/stack/kayobe-automation-env/src/kayobe-config \
-e KAYOBE_ENVIRONMENT -e KAYOBE_VAULT_PASSWORD -e KAYOBE_AUTOMATION_SSH_PRIVATE_KEY \
$KAYOBE_IMAGE \
/stack/kayobe-automation-env/src/kayobe-config/.automation/pipeline/playbook-run.sh \
'$KAYOBE_CONFIG_PATH/ansible/check-tags.yml'
#env:
#KAYOBE_AUTOMATION_SSH_PRIVATE_KEY: ${{ steps.ssh_key.outputs.ssh_key }}
20 changes: 18 additions & 2 deletions .github/workflows/stackhpc-promote.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
name: Promote package repositories
name: Promote Pulp repositories
on:
push:
branches:
# NOTE(upgrade): Reference only the current release branch here.
- stackhpc/2023.1
jobs:
promote:
name: Trigger package repository promotion
name: Trigger Pulp promotion workflows
if: github.repository == 'stackhpc/stackhpc-kayobe-config'
runs-on: ubuntu-latest
permissions: {}
Expand All @@ -27,3 +27,19 @@ jobs:
- name: Display link to package repository promotion workflows
run: |
echo "::notice Package repository promote workflow: https://github.com/stackhpc/stackhpc-release-train/actions/workflows/package-promote.yml"

# NOTE(mgoddard): Trigger another CI workflow in the
# stackhpc-release-train repository.
- name: Trigger container image promotion
run: |
gh workflow run \
container-promote.yml \
--repo stackhpc/stackhpc-release-train \
--ref main \
-f kayobe_config_branch=${{ github.ref_name }}
env:
GITHUB_TOKEN: ${{ secrets.STACKHPC_RELEASE_TRAIN_TOKEN }}

- name: Display link to container image promotion workflows
run: |
echo "::notice Container image promote workflow: https://github.com/stackhpc/stackhpc-release-train/actions/workflows/container-promote.yml"
48 changes: 48 additions & 0 deletions .github/workflows/stackhpc-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,16 @@ jobs:
if: ${{ needs.check-changes.outputs.aio == 'true' }}
if: github.repository == 'stackhpc/stackhpc-kayobe-config'

check-tags:
name: Check container image tags
needs:
- build-kayobe-image
uses: ./.github/workflows/stackhpc-check-tags.yml
with:
kayobe_image: ${{ needs.build-kayobe-image.outputs.kayobe_image }}
secrets: inherit
if: github.repository == 'stackhpc/stackhpc-kayobe-config'

all-in-one-ubuntu-jammy-ovs:
name: aio (Ubuntu Jammy OVS)
needs:
Expand Down Expand Up @@ -143,3 +153,41 @@ jobs:
if: ${{ needs.check-changes.outputs.aio == 'true' }}
secrets: inherit
if: ${{ ! failure() && github.repository == 'stackhpc/stackhpc-kayobe-config' }}

# Test two upgrade scenarios: Ubuntu Jammy OVS and Rocky 9 OVN.

all-in-one-upgrade-ubuntu-jammy-ovs:
name: aio upgrade (Ubuntu Jammy OVS)
needs:
- check-changes
- build-kayobe-image
uses: ./.github/workflows/stackhpc-all-in-one.yml
with:
kayobe_image: ${{ needs.build-kayobe-image.outputs.kayobe_image }}
os_distribution: ubuntu
os_release: jammy
ssh_username: ubuntu
neutron_plugin: ovs
OS_CLOUD: sms-lab-release
if: ${{ needs.check-changes.outputs.aio == 'true' }}
upgrade: true
secrets: inherit
if: ${{ ! failure() && github.repository == 'stackhpc/stackhpc-kayobe-config' }}

all-in-one-upgrade-rocky-9-ovn:
name: aio upgrade (Rocky 9 OVN)
needs:
- check-changes
- build-kayobe-image
uses: ./.github/workflows/stackhpc-all-in-one.yml
with:
kayobe_image: ${{ needs.build-kayobe-image.outputs.kayobe_image }}
os_distribution: rocky
os_release: "9"
ssh_username: cloud-user
neutron_plugin: ovn
OS_CLOUD: sms-lab-release
if: ${{ needs.check-changes.outputs.aio == 'true' }}
upgrade: true
secrets: inherit
if: ${{ ! failure() && github.repository == 'stackhpc/stackhpc-kayobe-config' }}
39 changes: 39 additions & 0 deletions etc/kayobe/ansible/check-tags.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
# This playbook queries the Pulp server to check that all image tags specified
# in kolla_image_tags are present.

- name: Check whether tags exist in Pulp container registry
hosts: localhost
tasks:
- name: Query images and tags
command:
cmd: >-
{{ kayobe_config_path }}/../../tools/kolla-images.py list-tags
register: kolla_images_result
changed_when: false

- name: Set a fact about images and tags
set_fact:
kolla_images: "{{ kolla_images_result.stdout | from_yaml }}"

- name: Set a fact about the Pulp URL
set_fact:
pulp_url: "{{ stackhpc_repo_mirror_url }}"

# Use state=read and allow_missing=false to check for missing tags in test pulp.
- import_role:
name: stackhpc.pulp.pulp_container_content
vars:
pulp_container_content: >-
{%- set contents = [] -%}
{%- for image, tags in kolla_images.items() -%}
{%- set repository = kolla_docker_namespace ~ "/" ~ image -%}
{%- set content = {
"allow_missing": False,
"repository": repository,
"state": "read",
"tags": tags,
} -%}
{%- set _ = contents.append(content) -%}
{%- endfor -%}
{{ contents }}
2 changes: 1 addition & 1 deletion etc/kayobe/ansible/requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ collections:
- name: pulp.squeezer
version: 0.0.13
- name: stackhpc.pulp
version: 0.5.2
version: 0.5.4
- name: stackhpc.hashicorp
version: 2.4.0
- name: stackhpc.kayobe_workflows
Expand Down
6 changes: 6 additions & 0 deletions etc/kayobe/environments/ci-aio/stackhpc-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,9 @@ stackhpc_docker_registry_password: !vault |
38333133393730633666613965653364316162353337313330346164303631313731646461363461
3963323635373866630a633533376339363734626664333765313665623662613764363038383735
38646138376438643533376161376634653439386230353365316239613430363338

# Override Pulp credentials to allow querying container image tags in the
# check-tags.yml custom playbook.
pulp_url: "{{ stackhpc_repo_mirror_url }}"
pulp_username: "{{ stackhpc_docker_registry_username }}"
pulp_password: "{{ stackhpc_docker_registry_password }}"
Loading