In this scenario the runner agent is running on a single EC2 node and runners are created by docker machine using spot instances. Runners will scale automatically based on configuration. The module creates by default a S3 cache that is shared cross runners (spot instances).
This examples shows:
- Usages of public / private VPC
- You can log into the instance via SSM (Session Manager).
- Registration via GitLab token.
- Auto scaling using
docker+machine
executor. - Additional security groups that are allowed access to the runner agent
- Use of
runners.docker.services
to configure docker registry mirror (commented out - uncomment to apply)
Multi region deployment is, of course, possible. Just instantiate the module multiple times with different AWS providers. In case you use the cache, make sure to have one cache per region.
The Terraform version is managed using tfenv. If you are not using tfenv
please
check .terraform-version
for the tested version.
Name | Version |
---|---|
terraform | >= 1.3 |
aws | 5.47.0 |
local | 2.5.1 |
null | 3.2.2 |
random | 3.6.1 |
tls | 4.0.5 |
Name | Version |
---|---|
aws | 5.47.0 |
Name | Source | Version |
---|---|---|
runner | ../../ | n/a |
vpc | terraform-aws-modules/vpc/aws | 5.8.1 |
vpc_endpoints | terraform-aws-modules/vpc/aws//modules/vpc-endpoints | 5.8.1 |
Name | Type |
---|---|
aws_availability_zones.available | data source |
aws_security_group.default | data source |
Name | Description | Type | Default | Required |
---|---|---|---|---|
aws_region | AWS region. | string |
"eu-west-1" |
no |
environment | A name that identifies the environment, will used as prefix and for tagging. | string |
"runners-default" |
no |
gitlab_url | URL of the gitlab instance to connect to. | string |
"https://gitlab.com" |
no |
preregistered_runner_token_ssm_parameter_name | The name of the SSM parameter to read the preregistered GitLab Runner token from. | string |
n/a | yes |
runner_name | Name of the runner, will be used in the runner config.toml | string |
"default-auto" |
no |
timezone | Name of the timezone that the runner will be used in. | string |
"Europe/Amsterdam" |
no |
No outputs.