File tree Expand file tree Collapse file tree 4 files changed +23
-12
lines changed
tools/kubernetes/terraform Expand file tree Collapse file tree 4 files changed +23
-12
lines changed Original file line number Diff line number Diff line change 1
1
variable "project_id" {}
2
2
variable "resource_name_prefix" {}
3
3
variable "region" {}
4
- variable "location" {}
5
4
variable "tpu_node_pools" {}
6
5
variable "maintenance_interval" {}
7
6
@@ -11,7 +10,6 @@ module "tpu-gke" {
11
10
project_id = var. project_id
12
11
resource_name_prefix = var. resource_name_prefix
13
12
region = var. region
14
- location = var. location
15
13
tpu_node_pools = var. tpu_node_pools
16
14
maintenance_interval = var. maintenance_interval
17
15
}
Original file line number Diff line number Diff line change 1
- project_id = " project-id "
1
+ project_id = " project_id "
2
2
resource_name_prefix = " tpu-v5e-test"
3
3
region = " us-east5"
4
- location = " us-east5-b"
5
4
tpu_node_pools = [{
5
+ zone = " us-east5-b"
6
+ node_count = 64
7
+ machine_type = " ct5lp-hightpu-4t"
8
+ topology = " 16x16"
9
+ policy = " sb-compact-1"
10
+ }, {
11
+ zone = " us-east5-b"
12
+ node_count = 64
13
+ machine_type = " ct5lp-hightpu-4t"
14
+ topology = " 16x16"
15
+ policy = " sb-compact-1"
16
+ }, {
17
+ zone = " us-east5-b"
18
+ node_count = 64
19
+ machine_type = " ct5lp-hightpu-4t"
20
+ topology = " 16x16"
21
+ policy = " sb-compact-1"
22
+ }, {
6
23
zone = " us-east5-b"
7
24
node_count = 64
8
25
machine_type = " ct5lp-hightpu-4t"
Original file line number Diff line number Diff line change 16
16
17
17
# GKE cluster
18
18
data "google_container_engine_versions" "gke_version" {
19
- location = var. location
19
+ location = var. region
20
20
version_prefix = " 1.27."
21
21
}
22
22
@@ -36,12 +36,12 @@ resource "google_compute_subnetwork" "subnet" {
36
36
name = " ${ var . resource_name_prefix } -subnet"
37
37
region = var. region
38
38
network = google_compute_network. vpc . name
39
- ip_cidr_range = " 10.10.0.0/24 "
39
+ ip_cidr_range = " 10.10.0.0/19 "
40
40
}
41
41
42
42
resource "google_container_cluster" "tpu_cluster" {
43
43
name = " ${ var . resource_name_prefix } -gke-cluster"
44
- location = var. location
44
+ location = var. region
45
45
46
46
# We can't create a cluster with no node pool defined, but we want to only use
47
47
# separately managed node pools. So we create the smallest possible default
@@ -70,7 +70,7 @@ resource "google_container_node_pool" "multihost_tpu" {
70
70
name = " ${ google_container_cluster . tpu_cluster . name } -${ count . index } "
71
71
provider = google- beta
72
72
project = var. project_id
73
- location = var. location
73
+ location = var. region
74
74
node_locations = [var . tpu_node_pools [count . index ]. zone ]
75
75
cluster = google_container_cluster. tpu_cluster . name
76
76
Original file line number Diff line number Diff line change @@ -22,10 +22,6 @@ variable "region" {
22
22
description = " region"
23
23
}
24
24
25
- variable "location" {
26
- description = " location"
27
- }
28
-
29
25
variable "resource_name_prefix" {
30
26
default = " "
31
27
description = " prefix for all the resouce naming"
You can’t perform that action at this time.
0 commit comments