Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
9 changes: 6 additions & 3 deletions .github/workflows/create-gh-action-runners.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
description: "Number of Runners to Deploy"
required: true
default: 5
type: number

runner_flavor:
description: "The Flavor of VM to create. l3.nano (More Runners, Less Power) | l3.micro (Middle Ground) | l3.tiny (Less Runners, More Power)"
Expand All @@ -23,8 +24,8 @@ jobs:
env:
OS_CLIENT_CONFIG_FILE: ${{ github.workspace }}/clouds.yaml
FLAVOR_NAME: l3.nano
TF_VAR_runner_count: ${{ github.events.inputs.runner_count }}
TF_VAR_flavor_name: ${{ github.events.inputs.runner_flavor }}
TF_VAR_runner_count: ${{ inputs.runner_count }}
TF_VAR_flavor_name: ${{ inputs.runner_flavor }}
TF_VAR_floating_ip: ${{ secrets.UA_FLOATING_IP }}
steps:
- name: Checkout repo
Expand All @@ -49,7 +50,9 @@ jobs:
run: terraform init

- name: Terraform plan
run: terraform plan -out=tfplan 1> /dev/null
run: |
echo "$TF_VAR_runner_count"
terraform plan -out=tfplan 1> /dev/null

- name: Terraform apply
run: terraform apply -auto-approve tfplan 1> /dev/null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
name: ubuntu
groups: docker
append: yes

- name: Extract Runner
ansible.builtin.unarchive:
src: https://github.com/actions/runner/releases/download/v{{RUNNER_VERSION}}/actions-runner-linux-x64-{{RUNNER_VERSION}}.tar.gz
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@ sudo apt-get install -y ansible

ansible --version

sudo apt-get install -y apt-transport-https ca-certificates curl gnupg
curl -fsSL https://pkgs.k8s.io/core:/stable:/v1.36/deb/Release.key | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg
sudo chmod 644 /etc/apt/keyrings/kubernetes-apt-keyring.gpg
echo 'deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v1.36/deb/ /' | sudo tee /etc/apt/sources.list.d/kubernetes.list
sudo chmod 644 /etc/apt/sources.list.d/kubernetes.list

sudo apt-get update
sudo apt-get install -y kubectl

sudo chmod +x ~/runner-scripts/job_started.sh
sudo chmod +x ~/runner-scripts/job_completed.sh
sudo chown ubuntu:ubuntu ~/runner-scripts/job_started.sh
Expand Down
Loading