Skip to content

Instantly share code, notes, and snippets.

@yish91
Created March 12, 2020 08:18
Show Gist options
  • Save yish91/f953bf110460d1dcfbc604ab53ab63e1 to your computer and use it in GitHub Desktop.
Save yish91/f953bf110460d1dcfbc604ab53ab63e1 to your computer and use it in GitHub Desktop.
Autoscaler Runner Config
concurrent = 10
check_interval = 0
[[runners]]
name = "gitlab-aws-autoscaler"
url = "https://gitlab.com/"
token = "<INSERT GITLAB_AUTH_TOKEN HERE>"
executor = "docker+machine"
limit = 20
environment = ["DOCKER_TLS_CERTDIR="]
[runners.docker]
tls_verify = false
image = "alpine:latest"
privileged = true
disable_cache = true
[runners.cache]
Type = "s3"
Shared = true
[runners.cache.s3]
ServerAddress = "s3.amazonaws.com"
AccessKey = "<INSERT_AWS_ACCESS_KEY>"
SecretKey = "<INSERT_AWS_SECRET_KEY>"
BucketName = "<INSERT_BUCKET_NAME>"
BucketLocation = "<INSERT_BUCKET_REGION>"
[runners.machine]
IdleCount = 0
IdleTime = 1800
MaxBuilds = 100
OffPeakPeriods = [
"* * 0-9,18-23 * * mon-fri *",
"* * * * * sat,sun *"
]
OffPeakIdleCount = 0
OffPeakIdleTime = 1200
MachineDriver = "amazonec2"
MachineName = "gitlab-docker-machine-%s"
MachineOptions = [
"amazonec2-access-key=<INSERT_AWS_ACCESS_KEY>",
"amazonec2-secret-key=<INSERT_AWS_SECRET_KEY>",
"amazonec2-region=<INSERT_VPC_REGION>",
"amazonec2-zone=<INSERT_VPC_ZONE>",
"amazonec2-vpc-id=<INSERT_VPC_ID>",
"amazonec2-subnet-id=<INSERT_SUBNET_ID>",
"amazonec2-use-private-address=true",
"amazonec2-tags=runner-manager-name,gitlab-aws-autoscaler,gitlab,true,gitlab-runner-autoscale,true",
"amazonec2-security-group=default",
"amazonec2-instance-type=t3a.small",
"amazonec2-request-spot-instance=true",
"amazonec2-spot-price=",
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment