Skip to content

Commit bff273f

Browse files
committed
fix CI
1 parent e58d2c9 commit bff273f

File tree

3 files changed

+38
-32
lines changed

3 files changed

+38
-32
lines changed

.cspell.json

+6
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,22 @@
1010
"awscli",
1111
"boto",
1212
"botocore",
13+
"buildx",
1314
"certdir",
1415
"checkmarx",
1516
"concat",
17+
"containerd",
1618
"devskim",
1719
"dind",
20+
"dpkg",
1821
"endfor",
1922
"filesha",
2023
"formatlist",
2124
"glrt",
2225
"glrunners",
2326
"hmarr",
2427
"instancelifecycle",
28+
"keyrings",
2529
"kics",
2630
"joho",
2731
"jsonencode",
@@ -56,6 +60,7 @@
5660
"tmpfs",
5761
"tonumber",
5862
"trivy",
63+
"usermod",
5964
"userns",
6065
"xanzy",
6166
"xvda"
@@ -66,6 +71,7 @@
6671
"autoscaler",
6772
"backports",
6873
"blockquotes",
74+
"bluegreen",
6975
"codeowners",
7076
"cpu",
7177
"cpus",

docs/usage.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ module "runner" {
146146

147147
### Scenario: Use of Docker autoscaler
148148

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.
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.
150150

151151
Tested with amazon-linux-2-x86 as runner manager and ubuntu-server-22-lts-x86 for runner worker. The following commands have been added to the original AMI for the runner worker for the docker-autoscaler to work correctly:
152152

@@ -201,19 +201,19 @@ module "runner" {
201201
runner_worker_docker_autoscaler_asg = {
202202
on_demand_percentage_above_base_capacity = 0
203203
enable_mixed_instances_policy = true
204+
idle_time = 600
205+
subnet_ids = vpc.private_subnets_ids
206+
types = ["t3a.medium", "t3.medium"]
207+
volume_type = "gp3"
208+
private_address_only = true
209+
ebs_optimized = true
210+
root_size = 40
204211
}
205212
206213
runner_worker_docker_autoscaler = {
207214
connector_config_user = "ubuntu"
208215
}
209216
210-
runner_worker_docker_machine_instance = {
211-
idle_time = 600
212-
subnet_ids = vpc.private_subnets_ids
213-
types = ["t3a.medium", "t3.medium"]
214-
volume_type = "gp3"
215-
}
216-
217217
}
218218
```
219219

main.tf

+24-24
Original file line numberDiff line numberDiff line change
@@ -141,30 +141,30 @@ locals {
141141
for key, value in config :
142142
# Convert key from snake_case to PascalCase which is the casing for this section.
143143
join("", [for subkey in split("_", key) : title(subkey)]) => jsonencode(value) if value != null
144-
}]
145-
runners_name = var.runner_instance.name
146-
runners_token = var.runner_gitlab.registration_token
147-
runners_executor = var.runner_worker.type
148-
runners_limit = var.runner_worker.max_jobs
149-
runners_concurrent = var.runner_manager.maximum_concurrent_jobs
150-
runners_environment_vars = jsonencode(var.runner_worker.environment_variables)
151-
runners_pre_build_script = var.runner_worker_gitlab_pipeline.pre_build_script
152-
runners_post_build_script = var.runner_worker_gitlab_pipeline.post_build_script
153-
runners_pre_clone_script = var.runner_worker_gitlab_pipeline.pre_clone_script
154-
runners_request_concurrency = var.runner_worker.request_concurrency
155-
runners_output_limit = var.runner_worker.output_limit
156-
runners_check_interval = var.runner_manager.gitlab_check_interval
157-
runners_volumes_tmpfs = join("\n", [for v in var.runner_worker_docker_volumes_tmpfs : format("\"%s\" = \"%s\"", v.volume, v.options)])
158-
runners_services_volumes_tmpfs = join("\n", [for v in var.runner_worker_docker_services_volumes_tmpfs : format("\"%s\" = \"%s\"", v.volume, v.options)])
159-
runners_docker_services = local.runners_docker_services
160-
runners_docker_options = local.runners_docker_options_toml
161-
bucket_name = local.bucket_name
162-
shared_cache = var.runner_worker_cache.shared
163-
sentry_dsn = var.runner_manager.sentry_dsn
164-
prometheus_listen_address = var.runner_manager.prometheus_listen_address
165-
auth_type = var.runner_worker_cache.authentication_type
166-
runners_docker_autoscaler = var.runner_worker.type == "docker-autoscaler" ? local.template_runner_docker_autoscaler : ""
167-
runners_docker_machine = var.runner_worker.type == "docker+machine" ? local.template_runner_docker_machine : ""
144+
}]
145+
runners_name = var.runner_instance.name
146+
runners_token = var.runner_gitlab.registration_token
147+
runners_executor = var.runner_worker.type
148+
runners_limit = var.runner_worker.max_jobs
149+
runners_concurrent = var.runner_manager.maximum_concurrent_jobs
150+
runners_environment_vars = jsonencode(var.runner_worker.environment_variables)
151+
runners_pre_build_script = var.runner_worker_gitlab_pipeline.pre_build_script
152+
runners_post_build_script = var.runner_worker_gitlab_pipeline.post_build_script
153+
runners_pre_clone_script = var.runner_worker_gitlab_pipeline.pre_clone_script
154+
runners_request_concurrency = var.runner_worker.request_concurrency
155+
runners_output_limit = var.runner_worker.output_limit
156+
runners_check_interval = var.runner_manager.gitlab_check_interval
157+
runners_volumes_tmpfs = join("\n", [for v in var.runner_worker_docker_volumes_tmpfs : format("\"%s\" = \"%s\"", v.volume, v.options)])
158+
runners_services_volumes_tmpfs = join("\n", [for v in var.runner_worker_docker_services_volumes_tmpfs : format("\"%s\" = \"%s\"", v.volume, v.options)])
159+
runners_docker_services = local.runners_docker_services
160+
runners_docker_options = local.runners_docker_options_toml
161+
bucket_name = local.bucket_name
162+
shared_cache = var.runner_worker_cache.shared
163+
sentry_dsn = var.runner_manager.sentry_dsn
164+
prometheus_listen_address = var.runner_manager.prometheus_listen_address
165+
auth_type = var.runner_worker_cache.authentication_type
166+
runners_docker_autoscaler = var.runner_worker.type == "docker-autoscaler" ? local.template_runner_docker_autoscaler : ""
167+
runners_docker_machine = var.runner_worker.type == "docker+machine" ? local.template_runner_docker_machine : ""
168168
}
169169
)
170170
}

0 commit comments

Comments
 (0)