https://github.com/ardikabs/gitlab-runner-cluster-aws
Gitlab Runner cluster on AWS
https://github.com/ardikabs/gitlab-runner-cluster-aws
autoscaling-groups aws gitlab-runner packer terraform
Last synced: about 1 month ago
JSON representation
Gitlab Runner cluster on AWS
- Host: GitHub
- URL: https://github.com/ardikabs/gitlab-runner-cluster-aws
- Owner: ardikabs
- Created: 2020-06-06T10:10:21.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2021-06-08T14:06:29.000Z (almost 5 years ago)
- Last Synced: 2025-04-02T04:27:54.331Z (about 1 year ago)
- Topics: autoscaling-groups, aws, gitlab-runner, packer, terraform
- Language: Shell
- Size: 6.84 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# gitlab-runner-aws
Simple project for spin up [gitlab-runner](https://docs.gitlab.com/runner/) cluster on AWS with some advanced configuration such as:
1. Build with customized AMI with the help of [packer](https://packer.io/)
1. Build with autoscaling setup, also added with autoscaling schedule with the help of [terraform](https://terraform.io)
# Preqrequisites
1. [Packer](https://packer.io) v1.5
1. [Terraform](https://terraform.io) v0.12.25
# How To
### Build AMI with Packer
```bash
git clone https://github.com/ardikabs/gitlab-runner-cluster-aws
cd gitlab-runner-cluster-aws
./setup.sh packer
Setting up gitlab-runner cluster on AWS
Type the Gitlab URL to be used for gitlab-runner:
gitlab.com
Type the Registration Token for Gitlab Runner to be used for gitlab-runner:
Fhurp9yJ3T46_vwZ7t92
Type VPC Id to be used for building the AMI:
vpc-0ba5b3023a58bab6c
Type Public subnet Id to be used for building the AMI:
subnet-0ed6a2cee8c75f594
Running packer to build AMI for gitlab-runner on AWS
amazon-ebs: output will be in this color
.
.
.
```
### Setup gitlab-runner cluster within autoscaling group on AWS with Terraform
```bash
cd gitlab-runner-cluster-aws
./setup.sh terraform
Setting up gitlab-runner cluster on AWS
Type the gitlab-runner AMI to be used for gitlab-runner cluster:
ami-0beaa8ab3a1274c50
Type the instance type to be used for gitlab-runner cluster (default c5.large):
Type the desired capacity for gitlab-runner instance should be run in gitlab-runner cluster (default 5):
Type the minimal gitlab-runner instance should be run in gitlab-runner cluster (default 3):
Type the maximal gitlab-runner instance should be run in gitlab-runner cluster (default 10):
Type VPC id to be used for running gitlab-runner cluster:
vpc-0ba5b3023a58bab6c
Type Network Tier to be used for running gitlab-runner cluster:
utility
Running Terraform to spin up for gitlab-runner cluster on AWS
Initializing the backend...
.
.
.
```
### Clean up
```bash
./setup.sh destroy
```