Skip to content

Commit ea41c66

Browse files
committed
add example in usage.md
1 parent a9bc89b commit ea41c66

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

docs/usage.md

+31
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,37 @@ module "runner" {
144144
}
145145
```
146146

147+
### Scenario: Use of Docker autoscaler
148+
149+
As docker machine is no longer maintained by docker, gitlab recently developed docker_autoscaler to replace docker machine (still in beta). An option is available to test it out. It reuses the arguments int he docker-machine block arguments and create an autoscaling groupthat will be supplied to docker-autoscaler.
150+
151+
#### Configuration example
152+
153+
```hcl
154+
module "runner" {
155+
# https://registry.terraform.io/modules/cattle-ops/gitlab-runner/aws/
156+
source = "cattle-ops/gitlab-runner/aws"
157+
158+
vpc_id = module.vpc.vpc_id
159+
subnet_id = element(module.vpc.private_subnets, 0)
160+
161+
runner_gitlab = {
162+
url = "https://gitlab.com"
163+
preregistered_runner_token_ssm_parameter_name = "my-gitlab-runner-token-ssm-parameter-name"
164+
}
165+
166+
runner_worker = {
167+
type = "docker_autoscaler"
168+
}
169+
170+
runner_worker_docker_machine_instance = {
171+
subnet_ids = vpc.private_subnet_ids
172+
types = ["t3a.medium", "t3.medium"]
173+
}
174+
175+
}
176+
```
177+
147178
## Examples
148179

149180
A few [examples](https://github.com/cattle-ops/terraform-aws-gitlab-runner/tree/main/examples/) are provided. Use the

0 commit comments

Comments
 (0)