This Terraform project allows user create a Kubernetes Cluster with GitHub Action Runner Controller installed running on any cloud provider (currently support AWS) or locally using Kubernetes-in-Docker (KIND) or Minikube.
It supports two main use cases:
- DinD (Docker in Docker): Deploying GitHub Actions Runner using Docker in Docker as the Container Mode.
- Kubernetes: Deploying GitHub Actions Runner using Kubernetes as the Container Mode.
The project currently supports running GitHub Actions Runner on the following platforms:
- AWS EKS: Deploying GitHub Actions Runner Controller on AWS EKS.
- KinD: Deploying GitHub Actions Runner Controller on KinD.
- Minikube: Deploying GitHub Actions Runner Controller on Minikube.
⚠️ Before running the Terraform commands, make sure to update theterraform.tfvars
file with the rightgithubConfigUrl
andgithub_token
.
Building for all available cloud and deployment platforms is the main goal of this project. Any user should be able to deploy the same tools and simply switch between cloud providers and runtime environments (Windows or Linux).
Currently a lot of work is been done around EKS, KinD, Minikube
This project will be supporting the following providers:
-
Bare metal (such as Hetzner)
The following tools are required for deploying GitHub Actions Runner Controller on AWS EKS (tested only on public clusters):
docker
(up and running)awscli
aws secret and access key
kubectl
eksctl
terraform
(1.0+)helm
(3.0+)make
The bootstrapping and configuration of cluster can be performed with the command:
cd aws/dind
terraform init
terraform apply -var-file=terraform.tfvars
To update the cluster, there are variables that can be changed, and it is located in the terraform.tfvars.
The bootstrapping and configuration of cluster can be performed with the command:
cd aws/k8s
terraform init
terraform apply -var-file=terraform.tfvars
To update the cluster, there are variables that can be changed, and it is located in the terraform.tfvars.
The following tools are required for deploying GitHub Actions Runner Controller on KinD:
docker
(up and running)terraform
(1.0+)helm
(3.0+)kind
make
The bootstrapping and configuration of cluster can be performed with the command:
cd kind/dind
terraform init
terraform apply -var-file=terraform.tfvars
To update the cluster, there are variables that can be changed, and it is located in the terraform.tfvars.
The bootstrapping and configuration of cluster can be performed with the command:
cd kind/k8s
terraform init
terraform apply -var-file=terraform.tfvars
To update the cluster, there are variables that can be changed, and it is located in the terraform.tfvars.
The following tools are required for deploying GitHub Actions Runner Controller on Minikube:
docker
(up and running)terraform
(1.0+)helm
(3.0+)minikube
make
The bootstrapping and configuration of cluster can be performed with the command:
cd minikube/dind
terraform init
terraform apply -var-file=terraform.tfvars
To update the cluster, there are variables that can be changed, and it is located in the terraform.tfvars.
The bootstrapping and configuration of cluster can be performed with the command:
cd minikube/k8s
terraform init
terraform apply -var-file=terraform.tfvars
To update the cluster, there are variables that can be changed, and it is located in the terraform.tfvars.
To simplify the execution of the commands, a Makefile
is available and this is used to perform the terraform
commands seamlessly. All you need to do is to type from the root folder:
make help
To create a GitHub Actions Runner on any of the platform currently supported, type:
make create-<platform>-<container_mode>
To delete the GitHub Actions Runner on any of the platform currently supported, type:
make cleanup-<platform>-<container_mode>