Create tags on spot instance after instance creation
What critical bug this MR is fixing?
fixes #112 (closed)
How to test
By following the steps described here, I was able to create spot intances and the name could be seen in the AWS Console
- GitLab Runner: https://gitlab-runner-downloads.s3.amazonaws.com/v15.11.0/binaries/gitlab-runner-darwin-arm64
- Docker Machine (Generated from the MR): https://gitlab.com/gitlab-org/ci-cd/docker-machine/-/jobs/4871963747/artifacts/file/bin/docker-machine-Darwin-x86_64
config.toml
concurrent = 10
check_interval = 0
[[runners]]
name = "gitlab-aws-autoscaler"
url = "https://gitlab.com"
token = "REDACTED"
executor = "docker+machine"
limit = 20
[runners.docker]
image = "alpine"
privileged = true
disable_cache = true
[runners.cache]
Type = "s3"
Shared = true
[runners.cache.s3]
ServerAddress = "s3.amazonaws.com"
AccessKey = "XXX"
SecretKey = "XXX"
BucketName = "touni-test-bucket"
BucketLocation = "us-east-1"
[runners.machine]
IdleCount = 1
IdleTime = 1800
MaxBuilds = 100
MachineDriver = "amazonec2"
MachineName = "gitlab-docker-machine-%s"
MachineOptions = [
"amazonec2-access-key=XXX",
"amazonec2-secret-key=XXX",
"amazonec2-region=us-east-1",
"amazonec2-zone=d",
"amazonec2-vpc-id=vpc-XXX",
"amazonec2-subnet-id=subnet-XXX",
"amazonec2-use-private-address=true",
"amazonec2-tags=runner-manager-name,gitlab-aws-autoscaler,gitlab,true,gitlab-runner-autoscale,true",
"amazonec2-security-group=XXX",
"amazonec2-instance-type=t2.micro",
"amazonec2-request-spot-instance=true",
"amazonec2-spot-price=15",
]
[[runners.machine.autoscaling]]
Periods = ["* * 9-17 * * mon-fri *"]
IdleCount = 50
IdleTime = 3600
Timezone = "UTC"
[[runners.machine.autoscaling]]
Periods = ["* * * * * sat,sun *"]
IdleCount = 5
IdleTime = 60
Timezone = "UTC"
Tags and Instance name can now be seen
How does this change help reduce cost of usage? What scale of cost reduction is it?
In what scenarios is this change usable with GitLab Runner's docker+machine executor?
Edited by Romuald Atchadé