diff --git a/.github/workflows/arc2-poddebug.yml b/.github/workflows/arc2-poddebug.yml index 182d0d9..d8ffc37 100644 --- a/.github/workflows/arc2-poddebug.yml +++ b/.github/workflows/arc2-poddebug.yml @@ -24,7 +24,7 @@ jobs: echo "GID: $(id -g)" echo "GROUPS: $(id -G)" echo "GROUPS: $(groups)" - - name: Hello world + - name: "Idle for an hour" + shell: bash run: | - echo "Hello world" sleep 3600 diff --git a/.github/workflows/arc2-sleep.yml b/.github/workflows/arc2-sleep.yml index 765fbf9..f1b67fb 100644 --- a/.github/workflows/arc2-sleep.yml +++ b/.github/workflows/arc2-sleep.yml @@ -1,4 +1,4 @@ -name: 🐿️ ARC-2 sleep +name: 🐿️ ARC-2 container sleep on: workflow_dispatch: diff --git a/.github/workflows/arc2-test.yml b/.github/workflows/arc2-test.yml index 71bba6f..ae9b64b 100644 --- a/.github/workflows/arc2-test.yml +++ b/.github/workflows/arc2-test.yml @@ -1,4 +1,4 @@ -name: 🐿️ ARC-2 test +name: 🐿️ ARC-2 simple scaling test on: workflow_dispatch: diff --git a/.github/workflows/arc2-test2.yml b/.github/workflows/arc2-test2.yml index a645019..bfeb026 100644 --- a/.github/workflows/arc2-test2.yml +++ b/.github/workflows/arc2-test2.yml @@ -1,4 +1,4 @@ -name: 🐿️ ARC-2 container job test +name: 🐿️ ARC-2 container job scaling test on: workflow_dispatch: diff --git a/.github/workflows/baremetal-deploy.yml b/.github/workflows/baremetal-deploy.yml deleted file mode 100644 index 2a7d8c5..0000000 --- a/.github/workflows/baremetal-deploy.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: GHES - deploy runners (bare metal) - -on: - workflow_dispatch: # deploy on demand - -jobs: - deploy: - runs-on: ubuntu-latest # use the GitHub hosted runners to deploy the self-hosted runners in GHEC - # If using GHES or GHAE, use another deployment, such as having CentOS redeploy Ubuntu and vice versa - environment: bare-metal - - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Write out the kubeconfig info - run: | - echo ${{ secrets.DEPLOY_ACCOUNT }} | base64 -d > /tmp/config - - - name: Update deployment - run: | - kubectl apply -f deployments/ghes/podman.yml --insecure-skip-tls-verify - kubectl apply -f deployments/ghes/ubuntu-focal.yml --insecure-skip-tls-verify - kubectl apply -f deployments/ghes/rootless-ubuntu-focal.yml --insecure-skip-tls-verify - kubectl apply -f deployments/ghes/ubuntu-jammy.yml --insecure-skip-tls-verify - env: - KUBECONFIG: /tmp/config - - - name: Remove kubeconfig info - run: rm -f /tmp/config diff --git a/.github/workflows/baremetal-remove.yml b/.github/workflows/baremetal-remove.yml deleted file mode 100644 index 02f45c8..0000000 --- a/.github/workflows/baremetal-remove.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: GHES - remove runners (bare metal) - -on: - workflow_dispatch: # deploy on demand - -jobs: - deploy: - runs-on: ubuntu-latest # use the GitHub hosted runners to deploy the self-hosted runners in GHEC - # If using GHES or GHAE, use another deployment, such as having CentOS redeploy Ubuntu and vice versa - environment: bare-metal - - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Write out the kubeconfig info - run: | - echo ${{ secrets.DEPLOY_ACCOUNT }} | base64 -d > /tmp/config - - - name: Update deployment - run: | - kubectl delete -f deployments/ghes/podman.yml --insecure-skip-tls-verify - kubectl delete -f deployments/ghes/ubuntu-focal.yml --insecure-skip-tls-verify - kubectl delete -f deployments/ghes/rootless-ubuntu-focal.yml --insecure-skip-tls-verify - kubectl delete -f deployments/ghes/ubuntu-jammy.yml --insecure-skip-tls-verify - env: - KUBECONFIG: /tmp/config - - - name: Remove kubeconfig info - run: rm -f /tmp/config diff --git a/.github/workflows/manual-deploy.yml b/.github/workflows/manual-deploy.yml new file mode 100644 index 0000000..f512c30 --- /dev/null +++ b/.github/workflows/manual-deploy.yml @@ -0,0 +1,49 @@ +name: 🐝 Manually deploy runners + +on: + workflow_dispatch: # deploy on demand + inputs: + target_scale_set: + description: "Which scale set to deploy?" + type: string + required: true + environment_name: + description: "Which environment to deploy to?" + type: string + required: true + default: "bare-metal" + runner_namespace: + description: "Which namespace to deploy to?" + type: string + required: true + default: "runners" + +jobs: + deploy: + runs-on: ubuntu-latest # use the GitHub hosted runners to deploy the self-hosted runners in GHEC + # If using GHES or GHAE, use another deployment, such as having CentOS redeploy Ubuntu and vice versa + environment: ${{ github.event.inputs.environment_name }} + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Write out the kubeconfig info + run: | + echo ${{ secrets.DEPLOY_ACCOUNT }} | base64 -d > /tmp/config + + - name: Update deployment + run: | + helm install ${{ github.event.inputs.target_scale_set }} \ + --namespace "${{ github.event.inputs.runner_namespace }}" \ + --set githubConfigSecret.github_app_id="${{ vars.ARC_APP_ID }}" \ + --set githubConfigSecret.github_app_installation_id="${{ vars.ARC_INSTALL_ID }}" \ + --set githubConfigSecret.github_app_private_key="${{ secrets.ARC_APP_PRIVATE_KEY }}" \ + -f helm-${{ github.event.inputs.target_scale_set }}.yml \ + oci://ghcr.io/actions/actions-runner-controller-charts/auto-scaling-runner-set + + env: + KUBECONFIG: /tmp/config + + - name: Remove kubeconfig info + run: rm -f /tmp/config diff --git a/.github/workflows/manual-remove.yml b/.github/workflows/manual-remove.yml new file mode 100644 index 0000000..74e2c21 --- /dev/null +++ b/.github/workflows/manual-remove.yml @@ -0,0 +1,44 @@ +name: 🐝 Manually remove runner deployment + +on: + workflow_dispatch: # remove on demand + inputs: + target_scale_set: + description: "Which scale set to remove?" + type: string + required: true + environment_name: + description: "Which environment to remove from?" + type: string + required: true + default: "bare-metal" + runner_namespace: + description: "Which namespace to remove from?" + type: string + required: true + default: "runners" + +jobs: + remove: + runs-on: ubuntu-latest # use the GitHub hosted runners to deploy the self-hosted runners in GHEC + # If using GHES or GHAE, use another deployment, such as having CentOS redeploy Ubuntu and vice versa + environment: ${{ github.event.inputs.environment_name }} + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Write out the kubeconfig info + run: | + echo ${{ secrets.DEPLOY_ACCOUNT }} | base64 -d > /tmp/config + + - name: Update deployment + run: | + helm uninstall ${{ github.event.inputs.target_scale_set }} \ + --namespace "${{ github.event.inputs.runner_namespace }}" + + env: + KUBECONFIG: /tmp/config + + - name: Remove kubeconfig info + run: rm -f /tmp/config