Skip to content

Commit d30f44b

Browse files
committed
add doc for worker pool
1 parent 53951c3 commit d30f44b

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

1-bootstrap/README.md

+25
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,31 @@ To proceed with Gitlab as your git provider you will need:
182182
}
183183
```
184184

185+
### Worker Pool Requirements
186+
187+
A worker pool must be defined to run within a VPC-SC Perimeter. You can find an example Worker Pool without external IP that peers a Gitlab Instance Internal IP on `test/setup` directory.
188+
189+
```terraform
190+
resource "google_cloudbuild_worker_pool" "pool" {
191+
name = "cb-pool"
192+
project = module.gitlab_project.project_id
193+
location = "us-central1"
194+
worker_config {
195+
disk_size_gb = 100
196+
machine_type = "e2-standard-4"
197+
no_external_ip = true
198+
}
199+
network_config {
200+
peered_network = local.gitlab_network_id_without_location
201+
peered_network_ip_range = "/24"
202+
}
203+
204+
depends_on = [google_service_networking_connection.gitlab_worker_pool_conn]
205+
}
206+
```
207+
208+
The code above creates the Worker Pool. The peered VPC is a VPC that contains a Git Instance and a NAT VM. You can also find the necessary firewall rules, peerings and configurations to make the Private Worker Pool work. See [gitlab_vm.tf](../test/setup/gitlab_vm.tf) file and [nat_proxy_vm.tf](../test/setup/nat_proxy_vm.tf) file for more information. The same pool can be utilized in multiple steps. Reserving a wider IP range allows more concurrent builds. A /24 range allows 254 hosts.
209+
185210
### Deploying with Cloud Build
186211

187212
#### Deploying on Enterprise Foundation blueprint

0 commit comments

Comments
 (0)