diff --git a/.github/workflows/overcloud-host-image-build.yml b/.github/workflows/overcloud-host-image-build.yml index e8584ef7e..02c9c9e23 100644 --- a/.github/workflows/overcloud-host-image-build.yml +++ b/.github/workflows/overcloud-host-image-build.yml @@ -27,10 +27,16 @@ jobs: overcloud-host-image-build: name: Build overcloud host images if: github.repository == 'stackhpc/stackhpc-kayobe-config' - runs-on: [self-hosted, stackhpc-kayobe-config-kolla-builder-rl9] + runs-on: arc-skc-aio-runner permissions: {} 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 @@ -55,30 +61,15 @@ jobs: rm -f /tmp/updated_images.txt - name: Clone StackHPC Kayobe repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: stackhpc/kayobe ref: refs/heads/stackhpc/${{ steps.openstack_release.outputs.openstack_release }} path: src/kayobe - - name: Install dependencies - run: | - sudo dnf -y install zstd debootstrap - - - name: Setup networking + - name: Install image build dependencies 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 + sudo apt -y install zstd debootstrap - name: Install Kayobe run: | @@ -93,20 +84,12 @@ jobs: 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 }} + kayobe control host bootstrap --skip-tags bootstrap - name: Create bifrost_httpboot Docker volume run: | - if [[ $(sudo docker volume ls -f Name=bifrost_httpboot -q | wc -l) = 0 ]]; then - sudo docker volume create bifrost_httpboot + if [[ $(docker volume ls -f Name=bifrost_httpboot -q | wc -l) = 0 ]]; then + docker volume create bifrost_httpboot fi - name: Generate clouds.yaml diff --git a/.github/workflows/stackhpc-container-image-build.yml b/.github/workflows/stackhpc-container-image-build.yml index 7cd09b585..15dce8bd1 100644 --- a/.github/workflows/stackhpc-container-image-build.yml +++ b/.github/workflows/stackhpc-container-image-build.yml @@ -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: arc-skc-aio-runner permissions: {} outputs: datetime_tag: ${{ steps.datetime_tag.outputs.datetime_tag }} @@ -48,7 +48,7 @@ jobs: openstack_release: ${{ steps.openstack_release.outputs.openstack_release }} steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Determine OpenStack release id: openstack_release @@ -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-aio-runner timeout-minutes: 720 permissions: {} strategy: @@ -97,32 +97,23 @@ jobs: needs: - generate-tag steps: - - uses: actions/checkout@v3 + - 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 - name: Clone StackHPC Kayobe repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: stackhpc/kayobe ref: refs/heads/stackhpc/${{ needs.generate-tag.outputs.openstack_release }} path: src/kayobe - - name: Setup networking - 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 - - name: Install Kayobe run: | mkdir -p venvs && @@ -132,23 +123,14 @@ 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 run: | - sudo docker image prune --all --force --filter until=168h --filter="label=kolla_version" + docker image prune --all --force --filter until=168h --filter="label=kolla_version" - name: Build and push kolla overcloud images run: | @@ -183,7 +165,7 @@ 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 diff --git a/etc/kayobe/environments/ci-builder/inventory/groups b/etc/kayobe/environments/ci-builder/inventory/groups index 155f353e2..d5fe93e74 100644 --- a/etc/kayobe/environments/ci-builder/inventory/groups +++ b/etc/kayobe/environments/ci-builder/inventory/groups @@ -1,8 +1,5 @@ [seed] -[container-image-builders:children] -seed - [network] [docker:children] diff --git a/etc/kayobe/environments/ci-builder/inventory/hosts b/etc/kayobe/environments/ci-builder/inventory/hosts index 33fda8b73..3706e9301 100644 --- a/etc/kayobe/environments/ci-builder/inventory/hosts +++ b/etc/kayobe/environments/ci-builder/inventory/hosts @@ -1,3 +1,3 @@ -# A 'seed' host used for building images. +# Use localhost for container and disk image builds. [seed] -builder +localhost ansible_connection=local ansible_python_interpreter=/usr/bin/python3