terraform-aws-gitlab-runner
terraform-aws-gitlab-runner copied to clipboard
Spot instances over multiple AWS Availability Zones
Hi!
Is there any option to configure the same GitLab Runner agent to use multiple AWS AZ on spot instances?
Thanks
Yes, just provide a subnet for each zone, instances should be started (guess random) over your zones.
In which module attribute should be defined?
The attribute subnet_id_runners is only for one subnet.
I don't think this is possible at the moment: https://docs.gitlab.com/runner/configuration/runner_autoscale_aws/#:~:text=If%20not%20specified%2C%20the%20availability%20zone%20is%20a%2C%20it%20needs%20to%20be%20set%20to%20the%20same%20availability%20zone%20as%20the%20specified%20subnet%2C%20for%20example%20when%20the%20zone%20is%20eu-west-1b%20it%20has%20to%20be%20amazonec2-zone%3Db
As a workaround you could spin up runners in different AZs. It's almost the same.
I guess it is not a good idea to have one agent feeding runners in different AZs. What if the agent fails? You won't have access to the runners any longer. So better spin up one agent + runners per AZ. Thus deploy this module several times and change the subnet id in the import parameters.
We use this setup and if one AZ fails your runners in the other AZs are still available.
Also having 2 deployments
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 15 days.
This issue was closed because it has been stalled for 15 days with no activity.