Skip to content

dazzag24/gitlab-runner-aws-autoscaler

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 

Repository files navigation

gitlab runner aws autoscaler with ec2 spot instance

alt text

EC2 Spot Instance Price as a runner/agent

alt text

iam-policy

ec2 gitlat runner manager only can delete EC2 with ec2 profile gitlab-runner-agent

{
           "Action": [
               "ec2:TerminateInstances"
           ],
           "Effect": "Allow",
           "Resource": "arn:aws:ec2::<AWS_ACCOUNT_ID>:instance/*",
           "Condition": {
               "StringEquals": {
                   "ec2:InstanceProfile": "arn:aws:iam::<AWS_ACCOUNT_ID>:instance-profile/gitlab-runner-agent"
               }
           }
       },

One Gitlab runner use by multiple project

Disable lock runner in primary project

alt text

in other project enable runner in aws

alt text

MachineOptions for AWS

https://docs.docker.com/machine/drivers/aws/

MachineOption for GCE

https://docs.docker.com/machine/drivers/gce/

example for gce with preemptible

https://verkoyen.eu/blog/2018/08/scaling-gitlab-runner-on-google-cloud-platform

About

config gitlab runner/agent manager for aws with ec2 spot instance

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published