Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
e10923a
CI: Update aio jobs to run on ARC
MaxBed4d Jan 15, 2024
ee19b5b
Support credentials for custom DNF repositories
markgoddard Feb 7, 2024
e9130b9
CI: Use Ark package repositories to install packages
markgoddard Feb 7, 2024
c22bc40
CI: Switch from sms-lab-release to openstack cloud
markgoddard Feb 7, 2024
7f014ad
CI: Update aio VM flavor, network and subnet for Leafcloud
markgoddard Feb 7, 2024
e4ce4ec
Merge pull request #918 from stackhpc/zed-yoga-merge
markgoddard Feb 7, 2024
bc99a53
CI: Update GitHub action versions for node20
markgoddard Feb 7, 2024
1cd3509
Revert hashicorp/setup-terraform action to v2 due to failure
markgoddard Feb 8, 2024
cc51997
CI: Revert to ens3 interface for Leafcloud
markgoddard Feb 7, 2024
3abdf8c
Add Apt auth configuration
markgoddard Feb 8, 2024
af73161
CI: Increase flavor to en1.large - some jobs were failing Tempest jobs
markgoddard Feb 8, 2024
dbf3508
CI: Run container image build job on ARC cluster
markgoddard Jan 23, 2024
05e1995
Add package repository credentials to container image build
markgoddard Feb 8, 2024
f8947a9
Don't verify Apt repo CA initially when using HTTPS in container build
markgoddard Feb 8, 2024
693bd94
Merge pull request #917 from stackhpc/CleanAiOChanges
markgoddard Feb 9, 2024
75c38d2
Merge pull request #922 from stackhpc/yoga-container-build-on-arc
markgoddard Feb 9, 2024
3e40ffb
Merge stackhpc/yoga into stackhpc/zed
markgoddard Feb 9, 2024
e1e9f5d
CI: Fix up check-tags job for ARC
markgoddard Feb 9, 2024
8d9e620
CI: Trim down package dependencies
markgoddard Feb 9, 2024
6329f1c
CI: Add retries to TF apply in aio job
markgoddard Feb 9, 2024
eafa278
CI: Fix up aio upgrade job for ARC runner
markgoddard Feb 9, 2024
59ce72a
Merge pull request #924 from stackhpc/zed-yoga-merge
markgoddard Feb 9, 2024
0429989
Merge stackhpc/zed into stackhpc/2023.1
markgoddard Feb 9, 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
6 changes: 3 additions & 3 deletions .github/workflows/overcloud-host-image-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ jobs:
if: inputs.ubuntu-jammy && steps.build_ubuntu_jammy.outcome == 'success'

- name: Upload updated images artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: Updated images list
path: /tmp/updated_images.txt
Expand All @@ -218,7 +218,7 @@ jobs:
steps.build_ubuntu_jammy.outcome == 'success'

- name: Upload Rocky 9 build logs if build failed
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: Rocky 9 build logs
path: |
Expand All @@ -228,7 +228,7 @@ jobs:
if: steps.build_rocky_9.outcome == 'failure'

- name: Upload Ubuntu Jammy 22.04 build logs if build failed
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: Ubuntu Jammy 22.04 build logs
path: |
Expand Down
58 changes: 36 additions & 22 deletions .github/workflows/stackhpc-all-in-one.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,19 @@ on:
vm_interface:
description: Default network interface name
type: string
default: enp3s0
default: ens3
vm_flavor:
description: Flavor for the all-in-one VM
type: string
default: general.v1.medium
default: en1.large
vm_network:
description: Network for the all-in-one VM
type: string
default: stackhpc-release
default: stackhpc-ci
vm_subnet:
description: Subnet for the all-in-one VM
type: string
default: stackhpc-release-subnet
default: stackhpc-ci
OS_CLOUD:
description: Name of cloud in clouds.yaml
type: string
Expand Down Expand Up @@ -74,7 +74,7 @@ jobs:
all-in-one:
name: All in one
if: inputs.if
runs-on: [self-hosted, stackhpc-kayobe-config-aio]
runs-on: arc-skc-aio-runner
permissions: {}
env:
KAYOBE_ENVIRONMENT: ci-aio
Expand All @@ -85,6 +85,11 @@ jobs:
# NOTE(upgrade): Reference the PREVIOUS release branch here.
PREVIOUS_BRANCH: stackhpc/zed
steps:
- name: Install Package
uses: ConorMacBride/install-package@main
with:
apt: git unzip nodejs

# If testing upgrade, checkout previous release, otherwise checkout current branch
- name: Checkout ${{ inputs.upgrade && 'previous release' || 'current' }} config
uses: actions/checkout@v4
Expand All @@ -102,6 +107,10 @@ jobs:
fi
echo kayobe_image=$kayobe_image >> $GITHUB_OUTPUT

- name: Make sure dockerd is running and test Docker.
run: |
docker run --rm hello-world

- name: Output image tag
id: image_tag
run: |
Expand Down Expand Up @@ -168,7 +177,17 @@ jobs:
OS_APPLICATION_CREDENTIAL_SECRET: ${{ secrets.OS_APPLICATION_CREDENTIAL_SECRET }}

- name: Terraform Apply
run: terraform apply -auto-approve
run: |
for attempt in $(seq 5); do
if terraform apply -auto-approve; then
echo "Created infrastructure on attempt $attempt"
break
fi
echo "Failed to create infrastructure on attempt $attempt"
sleep 10
terraform destroy -auto-approve
sleep 60
done
working-directory: ${{ github.workspace }}/terraform/aio
env:
OS_CLOUD: ${{ inputs.OS_CLOUD }}
Expand Down Expand Up @@ -232,17 +251,17 @@ jobs:
# 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 }}
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 current Kayobe image
run: |
sudo docker image pull $KAYOBE_IMAGE
docker image pull $KAYOBE_IMAGE

- name: Run growroot
run: |
sudo -E docker run -t --rm \
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 \
${{ steps.kayobe_image.outputs.kayobe_image }} \
Expand All @@ -252,7 +271,7 @@ jobs:

- name: Host configure
run: |
sudo -E docker run -t --rm \
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 \
${{ steps.kayobe_image.outputs.kayobe_image }} \
Expand All @@ -262,7 +281,7 @@ jobs:

- name: Service deploy
run: |
sudo -E docker run -t --rm \
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 \
${{ steps.kayobe_image.outputs.kayobe_image }} \
Expand All @@ -272,7 +291,7 @@ jobs:

- name: Configure aio resources
run: |
sudo -E docker run -t --rm \
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 \
${{ steps.kayobe_image.outputs.kayobe_image }} \
Expand Down Expand Up @@ -300,7 +319,7 @@ jobs:
# Now begin upgrade
- name: Host upgrade
run: |
sudo -E docker run -t --rm \
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 \
Expand All @@ -311,7 +330,7 @@ jobs:

- name: Host configure
run: |
sudo -E docker run -t --rm \
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 \
Expand All @@ -322,7 +341,7 @@ jobs:

- name: Service upgrade
run: |
sudo -E docker run -t --rm \
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 \
Expand All @@ -334,7 +353,7 @@ jobs:
- name: Tempest tests
run: |
mkdir -p tempest-artifacts
sudo -E docker run -t --rm \
docker run -t --rm \
-v $(pwd):/stack/kayobe-automation-env/src/kayobe-config \
-v $(pwd)/tempest-artifacts:/stack/tempest-artifacts \
-e KAYOBE_ENVIRONMENT -e KAYOBE_VAULT_PASSWORD -e KAYOBE_AUTOMATION_SSH_PRIVATE_KEY \
Expand All @@ -344,7 +363,7 @@ jobs:
KAYOBE_AUTOMATION_SSH_PRIVATE_KEY: ${{ steps.ssh_key.outputs.ssh_key }}

- name: Upload test result artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: tempest-results-${{ inputs.os_distribution }}-${{ inputs.os_release }}-${{ inputs.neutron_plugin }}${{ inputs.upgrade && '-upgrade' }}
path: tempest-artifacts/*
Expand All @@ -361,8 +380,3 @@ jobs:
OS_APPLICATION_CREDENTIAL_ID: ${{ secrets.OS_APPLICATION_CREDENTIAL_ID }}
OS_APPLICATION_CREDENTIAL_SECRET: ${{ secrets.OS_APPLICATION_CREDENTIAL_SECRET }}
if: always()

- name: Prune Docker images over 1 week old
# May fail if another prune is running
run: sudo docker image prune --all --force --filter until=168h || true
if: always()
12 changes: 8 additions & 4 deletions .github/workflows/stackhpc-build-kayobe-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,20 +56,20 @@ jobs:
submodules: true

- name: Log in to the Container registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

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

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
with:
driver-opts: |
image=moby/buildkit:master
Expand All @@ -82,15 +82,19 @@ jobs:
https_proxy: ${{ inputs.https_proxy }}
no_proxy: ${{ inputs.no_proxy }}

# Setting KAYOBE_USER_UID and KAYOBE_USER_GID to 1001 to match docker's defaults
# so that docker can run as a privileged user within the Kayobe image.
- name: Build and push Docker image
uses: docker/build-push-action@v3
uses: docker/build-push-action@v4
with:
file: ./.automation/docker/kayobe/Dockerfile
context: .
build-args: |
http_proxy=${{ inputs.http_proxy }}
https_proxy=${{ inputs.https_proxy }}
BASE_IMAGE=${{ inputs.base_image || 'rockylinux:9' }}
KAYOBE_USER_UID=1001
KAYOBE_USER_GID=1001
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
16 changes: 10 additions & 6 deletions .github/workflows/stackhpc-check-tags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,29 +20,33 @@ jobs:
check-tags:
name: Check container image tags
if: github.repository == 'stackhpc/stackhpc-kayobe-config'
runs-on: [self-hosted, stackhpc-kayobe-config-aio]
runs-on: arc-skc-aio-runner
permissions: {}
env:
KAYOBE_ENVIRONMENT: ci-aio
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD }}
KAYOBE_IMAGE: ${{ inputs.kayobe_image }}
steps:
- uses: actions/checkout@v4
- name: Install package dependencies
run: |
sudo apt update
sudo apt install -y git unzip nodejs

- name: Checkout
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
docker image pull $KAYOBE_IMAGE

- name: Check container image tags
run: |
sudo -E docker run -t --rm \
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 }}
55 changes: 23 additions & 32 deletions .github/workflows/stackhpc-container-image-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
generate-tag:
name: Generate container image tag
if: github.repository == 'stackhpc/stackhpc-kayobe-config'
runs-on: [self-hosted, stackhpc-kayobe-config-kolla-builder-rl9]
runs-on: ubuntu-latest
permissions: {}
outputs:
datetime_tag: ${{ steps.datetime_tag.outputs.datetime_tag }}
Expand Down Expand Up @@ -88,7 +88,7 @@ jobs:
container-image-build:
name: Build Kolla container images
if: github.repository == 'stackhpc/stackhpc-kayobe-config'
runs-on: [self-hosted, stackhpc-kayobe-config-kolla-builder-rl9]
runs-on: arc-skc-container-image-builder-runner
timeout-minutes: 720
permissions: {}
strategy:
Expand All @@ -97,7 +97,13 @@ jobs:
needs:
- generate-tag
steps:
- uses: actions/checkout@v4
- name: Install package dependencies
run: |
sudo apt update
sudo apt install -y build-essential git unzip nodejs python3-wheel python3-pip python3-venv

- name: Checkout
uses: actions/checkout@v4
with:
path: src/kayobe-config

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

- name: Setup networking
- name: Make sure dockerd is running and test Docker
run: |
if ! ip l show breth1 >/dev/null 2>&1; then
sudo ip l add breth1 type bridge
fi
sudo ip l set breth1 up
if ! ip a show breth1 | grep 192.168.33.3/24; then
sudo ip a add 192.168.33.3/24 dev breth1
fi
if ! ip l show dummy1 >/dev/null 2>&1; then
sudo ip l add dummy1 type dummy
fi
sudo ip l set dummy1 up
sudo ip l set dummy1 master breth1
docker run --rm hello-world

- name: Install Kayobe
run: |
Expand All @@ -132,23 +127,19 @@ jobs:
pip install -U pip &&
pip install ../src/kayobe

- name: Bootstrap the control host
# Required for Docker registry login. Normally installed during host configure.
- name: Install Docker Python SDK
run: |
source venvs/kayobe/bin/activate &&
source src/kayobe-config/kayobe-env --environment ci-builder &&
kayobe control host bootstrap

- name: Configure the seed host
run: |
source venvs/kayobe/bin/activate &&
source src/kayobe-config/kayobe-env --environment ci-builder &&
kayobe seed host configure
env:
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD }}
pip install --user docker

- name: Prune local Kolla container images over 1 week old
- name: Configure localhost as a seed
run: |
sudo docker image prune --all --force --filter until=168h --filter="label=kolla_version"
cat > src/kayobe-config/etc/kayobe/environments/ci-builder/inventory/hosts << EOF
# A 'seed' host used for building images.
# Use localhost for container image builds.
[seed]
localhost ansible_connection=local ansible_python_interpreter=/usr/bin/python3
EOF

- name: Build and push kolla overcloud images
run: |
Expand Down Expand Up @@ -183,13 +174,13 @@ jobs:

- name: Get built container images
run: |
sudo docker image ls --filter "reference=ark.stackhpc.com/stackhpc-dev/*:*${{ matrix.distro }}*${{ needs.generate-tag.outputs.datetime_tag }}" > ${{ matrix.distro }}-container-images
docker image ls --filter "reference=ark.stackhpc.com/stackhpc-dev/*:*${{ matrix.distro }}*${{ needs.generate-tag.outputs.datetime_tag }}" > ${{ matrix.distro }}-container-images

- name: Fail if no images have been built
run: if [ $(wc -l < ${{ matrix.distro }}-container-images) -le 1 ]; then exit 1; fi

- name: Upload container images artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.distro }} container images
path: ${{ matrix.distro }}-container-images
Expand Down
Loading