Skip to content

Commit

Permalink
Merge pull request #15 from adefemi171/components-update
Browse files Browse the repository at this point in the history
update componenets, remove duplicate module, fix formatting
  • Loading branch information
adefemi171 authored Sep 22, 2024
2 parents 0eaf7ad + d580771 commit 5f8d7fb
Show file tree
Hide file tree
Showing 19 changed files with 86 additions and 110 deletions.
4 changes: 0 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,4 @@

Yayyy, You are all done with the steps! Now just sit back and watch while your Pull request is reviewed and ultimately merged. 🎊





##### Thanks! again for the contribution!🙏
88 changes: 50 additions & 38 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,96 +33,108 @@ help:

.PHONY: create-aws-dind
create-aws-dind:
cd aws/dind
terraform init -upgrade
cd aws/dind && \
terraform init -upgrade && \
terraform apply -auto-approve -var-file=terraform.tfvars

.PHONY: create-aws-k8s
create-aws-k8s:
cd aws/k8s
terraform init -upgrade
cd aws/k8s && \
terraform init -upgrade && \
terraform apply -auto-approve -var-file=terraform.tfvars

.PHONY: create-kind-dind
create-kind-dind:
cd kind/dind
terraform init -upgrade
cd kind/dind && \
terraform init -upgrade && \
terraform apply -auto-approve -var-file=terraform.tfvars

.PHONY: create-kind-k8s
create-kind-k8s:
cd kind/k8s
terraform init -upgrade
cd kind/k8s && \
terraform init -upgrade && \
terraform apply -auto-approve -var-file=terraform.tfvars

.PHONY: create-minikube-dind
create-minikube-dind:
cd minikube/dind
terraform init -upgrade
cd minikube/dind && \
terraform init -upgrade && \
terraform apply -auto-approve -var-file=terraform.tfvars

.PHONY: create-minikube-k8s
create-minikube-k8s:
cd minikube/k8s
terraform init -upgrade
cd minikube/k8s && \
terraform init -upgrade && \
terraform apply -auto-approve -var-file=terraform.tfvars

.PHONY: cleanup-aws-dind
cleanup-aws-dind:
cd aws/dind
terraform destroy -auto-approve -var-file=terraform.tfvars
rm -f *-config || echo "File not found, skipping"
cd aws/dind && \
terraform destroy -auto-approve -var-file=terraform.tfvars && \
rm -f *-config || echo "Config file not found, skipping" && \
rm -f *.tfstate || echo "State file not found, skipping" && \
rm -f *.tfstate.backup || echo "State backup file not found, skipping"

.PHONY: cleanup-aws-k8s
cleanup-aws-k8s:
cd aws/k8s
terraform destroy -auto-approve -var-file=terraform.tfvars
rm -f *-config || echo "File not found, skipping"
cd aws/k8s && \
terraform destroy -auto-approve -var-file=terraform.tfvars && \
rm -f *-config || echo "Config file not found, skipping" && \
rm -f *.tfstate || echo "State file not found, skipping" && \
rm -f *.tfstate.backup || echo "State backup file not found, skipping"

.PHONY: cleanup-kind-dind
cleanup-kind-dind:
cd kind/dind
terraform destroy -auto-approve -var-file=terraform.tfvars
rm -f *-config || echo "File not found, skipping"
cd kind/dind && \
terraform destroy -auto-approve -var-file=terraform.tfvars && \
kind delete clusters --all && \
rm -f *-config || echo "Config file not found, skipping" && \
rm -f *.tfstate || echo "State file not found, skipping" && \
rm -f *.tfstate.backup || echo "State backup file not found, skipping"

.PHONY: cleanup-kind-k8s
cleanup-kind-k8s:
cd kind/k8s
terraform destroy -auto-approve -var-file=terraform.tfvars
rm -f *-config || echo "File not found, skipping"
cd kind/k8s && \
terraform destroy -auto-approve -var-file=terraform.tfvars && \
kind delete clusters --all && \
rm -f *-config || echo "Config file not found, skipping" && \
rm -f *.tfstate || echo "State file not found, skipping" && \
rm -f *.tfstate.backup || echo "State backup file not found, skipping"

.PHONY: cleanup-minikube-dind
cleanup-minikube-dind:
cd minikube/dind
terraform destroy -auto-approve -var-file=terraform.tfvars
rm -f *-config || echo "File not found, skipping"
minikube delete --all && \
cd minikube/dind && \
rm -f *.tfstate || echo "State file not found, skipping" && \
rm -f *.tfstate.backup || echo "State backup file not found, skipping"

.PHONY: cleanup-minikube-k8s
cleanup-minikube-k8s:
cd minikube/k8s
terraform destroy -auto-approve -var-file=terraform.tfvars
rm -f *-config || echo "File not found, skipping"
minikube delete --all && \
cd minikube/k8s && \
rm -f *.tfstate || echo "State file not found, skipping" && \
rm -f *.tfstate.backup || echo "State backup file not found, skipping"

.PHONY: plan-kind-dind
plan-kind-dind:
cd kind/dind
terraform init -upgrade
cd kind/dind && \
terraform init -upgrade && \
terraform plan -var-file=terraform.tfvars

.PHONY: plan-kind-k8s
plan-kind-k8s:
cd kind/k8s
terraform init -upgrade
cd kind/k8s && \
terraform init -upgrade && \
terraform plan -var-file=terraform.tfvars

.PHONY: plan-minikube-dind
plan-minikube-dind:
cd minikube/dind
terraform init -upgrade
cd minikube/dind && \
terraform init -upgrade && \
terraform plan -var-file=terraform.tfvars

.PHONY: plan-minikube-k8s
plan-minikube-k8s:
cd minikube/k8s
terraform init -upgrade
cd minikube/k8s && \
terraform init -upgrade && \
terraform plan -var-file=terraform.tfvars
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ The project currently supports running GitHub Actions Runner on the following pl
1. **KinD:** Deploying GitHub Actions Runner Controller on KinD.
1. **Minikube:** Deploying GitHub Actions Runner Controller on Minikube.

> ⚠️ **Before running the Terraform commands, make sure to update the `terraform.tfvars` file with the right `githubConfigUrl` and `github_token`.**
> [!IMPORTANT]
> Before running the Terraform commands, make sure to update the `terraform.tfvars` file with the right `githubConfigUrl` and `github_token`. Lastly, if you will be using GitHub ARC images, make sure to login to the GitHub Container Registry (GHCR) using the `docker login ghcr.io -u username -p accesstoken` command.
## Supported Providers

Expand Down Expand Up @@ -178,3 +179,13 @@ To delete the GitHub Actions Runner on any of the platform currently supported,
```sh
make cleanup-<platform>-<container_mode>
```

### Usage

Once the cluster is up and running, you can use the github actions runner in your workflow by changing the `runs-on` in your workflow file to the name of the runner you created.

```yaml
jobs:
build:
runs-on: self-hosted
```
File renamed without changes.
File renamed without changes.
29 changes: 0 additions & 29 deletions actions-arc-k8s-chart/main.tf

This file was deleted.

14 changes: 0 additions & 14 deletions actions-arc-k8s-chart/variables.tf

This file was deleted.

2 changes: 1 addition & 1 deletion aws/dind/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ module "actions_role" {
}

module "actions_actions_arc_chart" {
source = "../../actions-arc-dind-chart"
source = "../../actions-arc-chart"
arc_controller_namespace = var.arc_controller_namespace
arc_controller_chart_version = var.arc_controller_chart_version

Expand Down
6 changes: 3 additions & 3 deletions aws/dind/terraform.tfvars
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Cluster Config Variables
cluster_name = "actions-cluster"
cluster_version = "1.29"
cluster_version = "1.30"
cluster_endpoint_public_access = true
managed_node_groups_name = "actions-node-group"
node_group_defaults_instance_types = ["t2.medium", "t3a.medium", "t3.xlarge"]
Expand Down Expand Up @@ -28,10 +28,10 @@ ebs_service_account_name = "ebs-controller-sa"

#ARC Chart Variables
arc_controller_namespace = "arc-systems"
arc_controller_chart_version = "0.7.0"
arc_controller_chart_version = "0.9.3"

arc_runner_namespace = "arc-runners"
arc_runner_chart_version = "0.7.0"
arc_runner_chart_version = "0.9.3"
arc_runner_config = [{
name = "githubConfigUrl"
value = "https://github.com/" # This is a dummy repo
Expand Down
2 changes: 1 addition & 1 deletion aws/k8s/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ module "actions_ebs_chart" {
}

module "actions_actions_arc_chart" {
source = "../../actions-arc-k8s-chart"
source = "../../actions-arc-chart"
arc_controller_namespace = var.arc_controller_namespace
arc_controller_chart_version = var.arc_controller_chart_version

Expand Down
6 changes: 3 additions & 3 deletions aws/k8s/terraform.tfvars
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Cluster Config Variables
cluster_name = "actions-cluster"
cluster_version = "1.29"
cluster_version = "1.30"
cluster_endpoint_public_access = true
managed_node_groups_name = "actions-node-group"
node_group_defaults_instance_types = ["t2.medium", "t3a.medium", "t3.xlarge"]
Expand Down Expand Up @@ -32,10 +32,10 @@ open_ebs_namespace = "openebs"

#ARC Chart Variables
arc_controller_namespace = "arc-systems"
arc_controller_chart_version = "0.7.0"
arc_controller_chart_version = "0.9.3"

arc_runner_namespace = "arc-runners"
arc_runner_chart_version = "0.7.0"
arc_runner_chart_version = "0.9.3"
arc_runner_config = [{
name = "githubConfigUrl"
value = "https://github.com/" # This is a dummy repo
Expand Down
2 changes: 1 addition & 1 deletion kind/dind/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module "action_cluster" {


module "actions_actions_arc_chart" {
source = "../../actions-arc-dind-chart"
source = "../../actions-arc-chart"
arc_controller_namespace = var.arc_controller_namespace
arc_controller_chart_version = var.arc_controller_chart_version

Expand Down
6 changes: 3 additions & 3 deletions kind/dind/terraform.tfvars
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Cluster Config Variables
cluster_name = "actions-cluster"
kubernetes_version = "v1.29.1"
kubernetes_version = "v1.30.4"
kind = "Cluster"
api_version = "kind.x-k8s.io/v1alpha4"

#ARC Chart Variables
arc_controller_namespace = "arc-systems"
arc_controller_chart_version = "0.7.0"
arc_controller_chart_version = "0.9.3"

arc_runner_namespace = "arc-runners"
arc_runner_chart_version = "0.7.0"
arc_runner_chart_version = "0.9.3"
arc_runner_config = [{
name = "githubConfigUrl"
value = "https://github.com/" # This is a dummy repo
Expand Down
2 changes: 1 addition & 1 deletion kind/k8s/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module "actions_ebs_chart" {
}

module "actions_actions_arc_chart" {
source = "../../actions-arc-k8s-chart"
source = "../../actions-arc-chart"
arc_controller_namespace = var.arc_controller_namespace
arc_controller_chart_version = var.arc_controller_chart_version

Expand Down
6 changes: 3 additions & 3 deletions kind/k8s/terraform.tfvars
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Cluster Config Variables
cluster_name = "actions-cluster"
kubernetes_version = "v1.29.1"
kubernetes_version = "v1.30.4"
kind = "Cluster"
api_version = "kind.x-k8s.io/v1alpha4"

Expand All @@ -11,10 +11,10 @@ open_ebs_namespace = "openebs"

#ARC Chart Variables
arc_controller_namespace = "arc-systems"
arc_controller_chart_version = "0.7.0"
arc_controller_chart_version = "0.9.3"

arc_runner_namespace = "arc-runners"
arc_runner_chart_version = "0.7.0"
arc_runner_chart_version = "0.9.3"
arc_runner_config = [{
name = "githubConfigUrl"
value = "https://github.com/" # This is a dummy repo
Expand Down
2 changes: 1 addition & 1 deletion minikube/dind/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module "action_cluster" {
}

module "actions_actions_arc_chart" {
source = "../../actions-arc-dind-chart"
source = "../../actions-arc-chart"
arc_controller_namespace = var.arc_controller_namespace
arc_controller_chart_version = var.arc_controller_chart_version

Expand Down
6 changes: 3 additions & 3 deletions minikube/dind/terraform.tfvars
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Cluster Config Variables
minikube_driver = "docker"
cluster_name = "actions-cluster"
kubernetes_version = "v1.28.3"
kubernetes_version = "v1.30.0"
cluster_addons = [
"ingress",
"metrics-server",
Expand All @@ -16,10 +16,10 @@ cluster_nodes = "3"

#ARC Chart Variables
arc_controller_namespace = "arc-systems"
arc_controller_chart_version = "0.7.0"
arc_controller_chart_version = "0.9.3"

arc_runner_namespace = "arc-runners"
arc_runner_chart_version = "0.7.0"
arc_runner_chart_version = "0.9.3"

arc_runner_config = [{
name = "githubConfigUrl"
Expand Down
2 changes: 1 addition & 1 deletion minikube/k8s/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module "actions_ebs_chart" {
}

module "actions_actions_arc_chart" {
source = "../../actions-arc-k8s-chart"
source = "../../actions-arc-chart"
arc_controller_namespace = var.arc_controller_namespace
arc_controller_chart_version = var.arc_controller_chart_version

Expand Down
Loading

0 comments on commit 5f8d7fb

Please sign in to comment.