ROSA Cluster - Create #127
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ROSA Cluster - Create | |
on: | |
workflow_dispatch: | |
inputs: | |
clusterName: | |
description: 'Name of the cluster' | |
type: string | |
computeMachineType: | |
description: 'Instance type for the compute nodes' | |
required: true | |
default: m5.xlarge | |
type: string | |
multiAz: | |
description: 'Deploy to multiple availability zones in the region' | |
required: true | |
default: false | |
type: boolean | |
availabilityZones: | |
description: 'Availability zones to deploy to' | |
required: false | |
default: '' | |
type: string | |
replicas: | |
description: 'Number of worker nodes to provision' | |
required: true | |
default: '2' | |
type: string | |
region: | |
description: 'The AWS region to create the cluster in. Defaults to "vars.AWS_DEFAULT_REGION" if omitted.' | |
type: string | |
concurrency: cluster_${{ github.event.inputs.clusterName || format('gh-{0}', github.repository_owner) }} | |
env: | |
OPENSHIFT_VERSION: 4.13.10 | |
REGION: ${{ github.event.inputs.region || vars.AWS_DEFAULT_REGION }} | |
jobs: | |
checkout: | |
name: Create ROSA cluster | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup ROSA CLI | |
uses: ./.github/actions/rosa-cli-setup | |
with: | |
aws-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-default-region: ${{ vars.AWS_DEFAULT_REGION }} | |
rosa-token: ${{ secrets.ROSA_TOKEN }} | |
- name: Create ROSA Cluster | |
run: ./rosa_create_cluster.sh | |
working-directory: provision/aws | |
env: | |
VERSION: ${{ env.OPENSHIFT_VERSION }} | |
CLUSTER_NAME: ${{ inputs.clusterName || format('gh-{0}', github.repository_owner) }} | |
COMPUTE_MACHINE_TYPE: ${{ inputs.computeMachineType }} | |
MULTI_AZ: ${{ inputs.multiAz }} | |
AVAILABILITY_ZONES: ${{ inputs.availabilityZones }} | |
REPLICAS: ${{ inputs.replicas }} | |
- name: Archive ROSA logs | |
uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: rosa-logs | |
path: provision/aws/logs | |
retention-days: 5 |