Skip to content

This repository contains workflows for idempotantly creating & updating Actions Runner Controller (ARC) scale sets for GitHub self-hosted runners. This uses the open source ARC for GitHub and Azure Kubernetes Service. Additionally, Azure Container Registry can be used to provide a custom container image for runners.

License

Notifications You must be signed in to change notification settings

samueljmello/arc-continuous-deployment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ARC

This repository contains workflows for idempotantly creating & updating Actions Runner Controller (ARC) scale sets for GitHub self-hosted runners. This uses the open source ARC for GitHub and Azure Kubernetes Service. Additionally, Azure Container Registry can be used to provide a custom container image for runners.

Work In Progress

Future updates planned:

  • Hashing & caching of scale-set value files to determine if configuration has changed and requires a helm upgrade or not (to prevent tear-down & rebuild every workflow execution)

Prerequisites

Infrastructure

  • Azure Kubernetes Cluster (AKS)
  • Azure Container Registry (ACR) and
  • Azure Service Principal connection information
  • GitHub App installed on organizations, or a PAT with appropriate access (see documentation)
    • GitHub Apps are preferred over PAT because of the higher API rate limit and lack of tie-back to user identities, but can't be used with enterprise level runners.

Secrets On Repository

secret key description
APP_ID GitHub App ID
APP_INSTALL_ID GitHub App Installation ID (different for each org)
APP_PRIVATE_KEY The private key file (.pem) created for the app
AZURE_CLIENT_ID Azure Service Principal Client ID
AZURE_CLIENT_SECRET Azure Service Principal Client Secret
AZURE_SUBSCRIPTION_ID Azure Service Principal Subscription ID
AZURE_TENANT_ID Azure Service Principal Tenant ID
CUSTOM_PAT A custom GitHub Personal Access Token to use when NOT using the GitHub App (required for enterprise level runners)
REGISTRY_LOGIN_SERVER ACR registry host name

Installation Steps

  1. Complete Prerequisites
  2. Move all GitHub Actions YAML files in ./workflows to ./.github/workflows (I have them here so that my repo doesn't attempt to run them)
  3. Run controller.yaml to make sure the ARC controller is present
  4. Modify ./.github/workflows/scale-sets.yaml to fit your needs, and be sure to add the corresponding values config YAML file overrides to the ./scale-sets/ directory (two included).
  5. If using a custom image in ACR, make sure to update & run your ./Dockerfile and /customer-runner-image.yaml workflow accordingly. Additionally, any values override files that use the image will need the corrected values (see ./scale-sets/enterprise.yaml for example).

Supportive Documentation

About

This repository contains workflows for idempotantly creating & updating Actions Runner Controller (ARC) scale sets for GitHub self-hosted runners. This uses the open source ARC for GitHub and Azure Kubernetes Service. Additionally, Azure Container Registry can be used to provide a custom container image for runners.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published