Skip to content

Commit

Permalink
Merge branch 'improvement/change-ci-runners' into tmp/octopus/w/127.0…
Browse files Browse the repository at this point in the history
…/improvement/change-ci-runners
  • Loading branch information
bert-e committed Jan 10, 2024
2 parents 31d7a34 + efd21a5 commit 1e06d1c
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 19 deletions.
6 changes: 3 additions & 3 deletions .github/actions/destroy-cluster/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ inputs:
TERRAFORM_VERSION:
description: "Terraform version to use"
required: false
default: "1.3.6"
default: "1.5.2"
TERRAFORM_SNAPSHOT_TAG:
description: "Tag to checkout for the scality/terraform-snapshot repository"
required: false
default: "0.9.0"
default: "0.12.0"

# Cloud configuration
CLOUD:
Expand Down Expand Up @@ -56,7 +56,7 @@ runs:
- name: Install tools
if: inputs.ARTIFACTS_URL
shell: bash
run: sudo yum install -y unzip
run: sudo apt-get update && sudo apt-get install -y unzip
- name: Install node
if: inputs.ARTIFACTS_URL
uses: actions/setup-node@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/generate-snapshots/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ runs:
- name: Install dependencies for Openstack
if: contains('ovh', inputs.cloud)
run: |
sudo yum install -y python36-pip jq
sudo apt-get update && sudo apt-get install -y python3-pip jq
pip3 install --user --upgrade pip
pip3 install --user python-openstackclient~=5.8.0 openstacksdk~=1.4.0
shell: bash
Expand Down
11 changes: 8 additions & 3 deletions .github/actions/spawn-cluster/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ inputs:
TERRAFORM_VERSION:
description: "Terraform version to use"
required: false
default: "1.3.6"
default: "1.5.2"
TERRAFORM_SNAPSHOT_TAG:
description: "Tag to checkout for the scality/terraform-snapshot repository"
required: false
default: "0.9.0"
default: "0.12.0"

# Cloud configuration
CLOUD:
Expand Down Expand Up @@ -55,6 +55,10 @@ inputs:
description: "The RHSM password to use (only needed on RedHat)"
required: false
default: ""
AUTHORIZED_CIDRS:
description: "List of CIDRs to allow SSH and ICMP ingress from"
required: false
default: '["0.0.0.0/0"]'

args:
description: Specific arguments to add to the apply command
Expand Down Expand Up @@ -98,7 +102,7 @@ runs:
- name: Install tools
if: inputs.skip-prepare == 'false'
shell: bash
run: sudo yum install -y unzip tar
run: sudo apt-get update && sudo apt-get install -y unzip
- name: Install node
if: inputs.skip-prepare == 'false'
uses: actions/setup-node@v3
Expand Down Expand Up @@ -129,6 +133,7 @@ runs:
TF_VAR_restore_env: "${{ inputs.RESTORE_ENV }}"
TF_VAR_rhsm_username: "${{ inputs.rhsm-username }}"
TF_VAR_rhsm_password: "${{ inputs.rhsm-password }}"
TF_VAR_ingress_remote_ip_prefix: "${{ inputs.AUTHORIZED_CIDRS }}"
MAX_RETRIES: "3"
TFVARS_DIR: "${{ github.workspace }}/.github/spawn/tfvars"
run: |
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/downgrade-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,16 @@ env:

jobs:
downgrade:
runs-on: [self-hosted, centos7, large]
# We need to use a large runner so that we have known runner IPs
# It allows us to filter authorized IPs on the machines we spawn
runs-on: ubuntu-22.04-4core
env:
NAME: downgrade-${{ inputs.type }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install deps
run: sudo yum install -y isomd5sum
run: sudo apt-get update && sudo apt-get install -y isomd5sum

## Spawn {{{
- name: Export environment variables for accessing the cloud
Expand All @@ -52,6 +54,7 @@ jobs:
GIT_ACCESS_TOKEN: ${{ secrets.GIT_ACCESS_TOKEN }}
ARTIFACTS_USER: ${{ secrets.ARTIFACTS_USER }}
ARTIFACTS_PASSWORD: ${{ secrets.ARTIFACTS_PASSWORD }}
AUTHORIZED_CIDRS: ${{ vars.AUTHORIZED_CIDRS }}
- name: Save Terraform context
if: always()
uses: ./.github/actions/save-terraform-context
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/lifecycle-promoted.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ env:

jobs:
snapshot-upgrade:
runs-on: [self-hosted, centos7, large]
# We need to use a large runner so that we have known runner IPs
# It allows us to filter authorized IPs on the machines we spawn
runs-on: ubuntu-22.04-4core
strategy:
fail-fast: false
matrix:
Expand All @@ -37,7 +39,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
- name: Install deps
run: sudo yum install -y isomd5sum
run: sudo apt-get update && sudo apt-get install -y isomd5sum

## Spawn {{{
- name: Export environment variables for accessing the cloud
Expand All @@ -60,6 +62,7 @@ jobs:
GIT_ACCESS_TOKEN: ${{ secrets.GIT_ACCESS_TOKEN }}
ARTIFACTS_USER: ${{ secrets.ARTIFACTS_USER }}
ARTIFACTS_PASSWORD: ${{ secrets.ARTIFACTS_PASSWORD }}
AUTHORIZED_CIDRS: ${{ vars.AUTHORIZED_CIDRS }}
- name: Save Terraform context
if: always()
uses: ./.github/actions/save-terraform-context
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/multi-node-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,17 @@ env:

jobs:
multi-node:
runs-on: [self-hosted, centos7, large]
# We need to use a large runner so that we have known runner IPs
# It allows us to filter authorized IPs on the machines we spawn
runs-on: ubuntu-22.04-4core
env:
SSH_PRIVATE_KEY: "~/.ssh/terraform"
NODES_COUNT: ${{ inputs.nodes-count }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install deps
run: sudo yum install -y isomd5sum jq
run: sudo apt-get update && sudo apt-get install -y isomd5sum jq
- name: Retrieve product.txt from artifacts
run: >
curl --fail -LO -u ${{ secrets.ARTIFACTS_USER }}:${{ secrets.ARTIFACTS_PASSWORD }}
Expand Down Expand Up @@ -118,6 +120,7 @@ jobs:
GIT_ACCESS_TOKEN: ${{ secrets.GIT_ACCESS_TOKEN }}
ARTIFACTS_USER: ${{ secrets.ARTIFACTS_USER }}
ARTIFACTS_PASSWORD: ${{ secrets.ARTIFACTS_PASSWORD }}
AUTHORIZED_CIDRS: ${{ vars.AUTHORIZED_CIDRS }}
- name: Save Terraform context
if: always()
uses: ./.github/actions/save-terraform-context
Expand Down Expand Up @@ -371,7 +374,9 @@ jobs:
destroy-multi-node-cluster:
needs:
- multi-node
runs-on: [self-hosted, centos7, large]
# We need to use a large runner so that we have known runner IPs
# It allows us to filter authorized IPs on the machines we spawn
runs-on: ubuntu-22.04-4core
if: always()
steps:
- name: Checkout
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/single-node-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,16 @@ env:

jobs:
single-node:
runs-on: [self-hosted, centos7, large]
# We need to use a large runner so that we have known runner IPs
# It allows us to filter authorized IPs on the machines we spawn
runs-on: ubuntu-22.04-4core
env:
SSH_PRIVATE_KEY: "~/.ssh/terraform"
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install deps
run: sudo yum install -y isomd5sum
run: sudo apt-get update && sudo apt-get install -y isomd5sum
- name: Retrieve product.txt from artifacts
run: >
curl --fail -LO -u ${{ secrets.ARTIFACTS_USER }}:${{ secrets.ARTIFACTS_PASSWORD }}
Expand Down Expand Up @@ -115,6 +117,7 @@ jobs:
ARTIFACTS_PASSWORD: ${{ secrets.ARTIFACTS_PASSWORD }}
rhsm-username: ${{ secrets.RHSM_USERNAME }}
rhsm-password: ${{ secrets.RHSM_PASSWORD }}
AUTHORIZED_CIDRS: ${{ vars.AUTHORIZED_CIDRS }}
- name: Save Terraform context
if: always()
uses: ./.github/actions/save-terraform-context
Expand Down Expand Up @@ -267,7 +270,7 @@ jobs:
destroy-single-node-cluster:
needs:
- single-node
runs-on: [self-hosted, centos7, large]
runs-on: ubuntu-22.04-4core
if: always()
steps:
- name: Checkout
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/upgrade-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,16 @@ env:

jobs:
upgrade:
runs-on: [self-hosted, centos7, large]
# We need to use a large runner so that we have known runner IPs
# It allows us to filter authorized IPs on the machines we spawn
runs-on: ubuntu-22.04-4core
env:
NAME: upgrade-${{ inputs.type }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install deps
run: sudo yum install -y isomd5sum
run: sudo apt-get update && sudo apt-get install -y isomd5sum

## Spawn {{{
- name: Export environment variables for accessing the cloud
Expand All @@ -52,6 +54,7 @@ jobs:
GIT_ACCESS_TOKEN: ${{ secrets.GIT_ACCESS_TOKEN }}
ARTIFACTS_USER: ${{ secrets.ARTIFACTS_USER }}
ARTIFACTS_PASSWORD: ${{ secrets.ARTIFACTS_PASSWORD }}
AUTHORIZED_CIDRS: ${{ vars.AUTHORIZED_CIDRS }}
- name: Save Terraform context
if: always()
uses: ./.github/actions/save-terraform-context
Expand Down

0 comments on commit 1e06d1c

Please sign in to comment.