Skip to content
Autoscaling EC2 GitLab Runners Spawned by Fargate
Dockerfile Shell
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/ISSUE_TEMPLATE Update issue templates Feb 14, 2020
.gitlab-ci.yml
Dockerfile creates a security group to protect docker socket Feb 19, 2020
LICENSE Create LICENSE Feb 9, 2020
diagram.png make progress on #4 Feb 21, 2020
entrypoint.sh creates a security group to protect docker socket Feb 19, 2020
gitlab-runner-template.yml add/template validator Feb 22, 2020
readme.md make progress on #4 Feb 21, 2020

readme.md

Autoscaling EC2 GitLab Runners Spawned by Fargate

The purpose of the CloudFormation template is to create a Fargate Service that manages and autoscales EC2 instances to run Gitlab CI jobs. This allows for private GitLab Runners without managing, patching or maintaing servers.

Launch CloudFormation

Diagram

Parameters

  • VpcId - Select a VPC that allows instances access to the Internet
  • SubnetID - Select subnets - Must be in the selected VPC!
  • GitLabURL - The Gitlab URL, change if self-hosted
  • GitLabRegistrationToken - The Gitlab runer registration token
  • AdditionalRegisterParams - Any additional parameters you want to pass to gitlab-runner register
  • InstanceType - The instance type of the runners
  • RootVolumeSize -The size of the root volume on the runners
  • CacheExpirationInDays - Select how long to store a jobs cache output in S3
  • CPU - Set the number of CPUs for the spawner (1 CPU = 1024)
  • Memory - Set the amount of RAM in KB for the spawner
  • DockerImage - The default docker image if not provided in a gitlab-ci.yml file

Resource Created

  • IAM User - Used to connect to S3
  • IAM Roles for ECS
  • S3 Bucket for runner cache
  • ECS Cluster, Service & Task Definition
  • CloudWatch Logs Groups that streams to logs for the spawner
You can’t perform that action at this time.