Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change subnetwork to subnetwork_self_link for gcp-slurm-v6 #2876

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,11 @@ limitations under the License.
|------|--------|---------|
| <a name="module_bucket"></a> [bucket](#module\_bucket) | terraform-google-modules/cloud-storage/google | ~> 5.0 |
| <a name="module_daos_network_storage_scripts"></a> [daos\_network\_storage\_scripts](#module\_daos\_network\_storage\_scripts) | github.com/GoogleCloudPlatform/hpc-toolkit//modules/scripts/startup-script | v1.36.0&depth=1 |
| <a name="module_slurm_controller_instance"></a> [slurm\_controller\_instance](#module\_slurm\_controller\_instance) | github.com/GoogleCloudPlatform/slurm-gcp.git//terraform/slurm_cluster/modules/_slurm_instance | 6.6.0 |
| <a name="module_slurm_controller_template"></a> [slurm\_controller\_template](#module\_slurm\_controller\_template) | github.com/GoogleCloudPlatform/slurm-gcp.git//terraform/slurm_cluster/modules/slurm_instance_template | 6.6.0 |
| <a name="module_slurm_controller_instance"></a> [slurm\_controller\_instance](#module\_slurm\_controller\_instance) | github.com/wiktorn/slurm-gcp.git//terraform/slurm_cluster/modules/_slurm_instance | reserve_ip_addresses |
| <a name="module_slurm_controller_template"></a> [slurm\_controller\_template](#module\_slurm\_controller\_template) | github.com/wiktorn/slurm-gcp.git//terraform/slurm_cluster/modules/slurm_instance_template | reserve_ip_addresses |
| <a name="module_slurm_files"></a> [slurm\_files](#module\_slurm\_files) | ./modules/slurm_files | n/a |
| <a name="module_slurm_login_instance"></a> [slurm\_login\_instance](#module\_slurm\_login\_instance) | github.com/GoogleCloudPlatform/slurm-gcp.git//terraform/slurm_cluster/modules/_slurm_instance | 6.6.0 |
| <a name="module_slurm_login_template"></a> [slurm\_login\_template](#module\_slurm\_login\_template) | github.com/GoogleCloudPlatform/slurm-gcp.git//terraform/slurm_cluster/modules/slurm_instance_template | 6.6.0 |
| <a name="module_slurm_login_instance"></a> [slurm\_login\_instance](#module\_slurm\_login\_instance) | github.com/wiktorn/slurm-gcp.git//terraform/slurm_cluster/modules/_slurm_instance | reserve_ip_addresses |
| <a name="module_slurm_login_template"></a> [slurm\_login\_template](#module\_slurm\_login\_template) | github.com/wiktorn/slurm-gcp.git//terraform/slurm_cluster/modules/slurm_instance_template | reserve_ip_addresses |
| <a name="module_slurm_nodeset_template"></a> [slurm\_nodeset\_template](#module\_slurm\_nodeset\_template) | github.com/GoogleCloudPlatform/slurm-gcp.git//terraform/slurm_cluster/modules/slurm_instance_template | 6.6.0 |
| <a name="module_slurm_nodeset_tpu"></a> [slurm\_nodeset\_tpu](#module\_slurm\_nodeset\_tpu) | github.com/GoogleCloudPlatform/slurm-gcp.git//terraform/slurm_cluster/modules/slurm_nodeset_tpu | 6.6.0 |

Expand Down Expand Up @@ -265,7 +265,7 @@ limitations under the License.
| <a name="input_instance_template"></a> [instance\_template](#input\_instance\_template) | DEPRECATED: Instance template can not be specified for controller. | `string` | `null` | no |
| <a name="input_labels"></a> [labels](#input\_labels) | Labels, provided as a map. | `map(string)` | `{}` | no |
| <a name="input_login_network_storage"></a> [login\_network\_storage](#input\_login\_network\_storage) | An array of network attached storage mounts to be configured on all login nodes. | <pre>list(object({<br> server_ip = string,<br> remote_mount = string,<br> local_mount = string,<br> fs_type = string,<br> mount_options = string,<br> }))</pre> | `[]` | no |
| <a name="input_login_nodes"></a> [login\_nodes](#input\_login\_nodes) | List of slurm login instance definitions. | <pre>list(object({<br> name_prefix = string<br> access_config = optional(list(object({<br> nat_ip = string<br> network_tier = string<br> })))<br> additional_disks = optional(list(object({<br> disk_name = optional(string)<br> device_name = optional(string)<br> disk_size_gb = optional(number)<br> disk_type = optional(string)<br> disk_labels = optional(map(string), {})<br> auto_delete = optional(bool, true)<br> boot = optional(bool, false)<br> })), [])<br> additional_networks = optional(list(object({<br> access_config = optional(list(object({<br> nat_ip = string<br> network_tier = string<br> })), [])<br> alias_ip_range = optional(list(object({<br> ip_cidr_range = string<br> subnetwork_range_name = string<br> })), [])<br> ipv6_access_config = optional(list(object({<br> network_tier = string<br> })), [])<br> network = optional(string)<br> network_ip = optional(string, "")<br> nic_type = optional(string)<br> queue_count = optional(number)<br> stack_type = optional(string)<br> subnetwork = optional(string)<br> subnetwork_project = optional(string)<br> })), [])<br> bandwidth_tier = optional(string, "platform_default")<br> can_ip_forward = optional(bool, false)<br> disable_smt = optional(bool, false)<br> disk_auto_delete = optional(bool, true)<br> disk_labels = optional(map(string), {})<br> disk_size_gb = optional(number)<br> disk_type = optional(string, "n1-standard-1")<br> enable_confidential_vm = optional(bool, false)<br> enable_oslogin = optional(bool, true)<br> enable_shielded_vm = optional(bool, false)<br> gpu = optional(object({<br> count = number<br> type = string<br> }))<br> labels = optional(map(string), {})<br> machine_type = optional(string)<br> metadata = optional(map(string), {})<br> min_cpu_platform = optional(string)<br> num_instances = optional(number, 1)<br> on_host_maintenance = optional(string)<br> preemptible = optional(bool, false)<br> region = optional(string)<br> service_account = optional(object({<br> email = optional(string)<br> scopes = optional(list(string), ["https://www.googleapis.com/auth/cloud-platform"])<br> }))<br> shielded_instance_config = optional(object({<br> enable_integrity_monitoring = optional(bool, true)<br> enable_secure_boot = optional(bool, true)<br> enable_vtpm = optional(bool, true)<br> }))<br> source_image_family = optional(string)<br> source_image_project = optional(string)<br> source_image = optional(string)<br> static_ips = optional(list(string), [])<br> subnetwork = string<br> spot = optional(bool, false)<br> tags = optional(list(string), [])<br> zone = optional(string)<br> termination_action = optional(string)<br> }))</pre> | `[]` | no |
| <a name="input_login_nodes"></a> [login\_nodes](#input\_login\_nodes) | List of slurm login instance definitions. | <pre>list(object({<br> name_prefix = string<br> access_config = optional(list(object({<br> nat_ip = string<br> network_tier = string<br> })))<br> additional_disks = optional(list(object({<br> disk_name = optional(string)<br> device_name = optional(string)<br> disk_size_gb = optional(number)<br> disk_type = optional(string)<br> disk_labels = optional(map(string), {})<br> auto_delete = optional(bool, true)<br> boot = optional(bool, false)<br> })), [])<br> additional_networks = optional(list(object({<br> access_config = optional(list(object({<br> nat_ip = string<br> network_tier = string<br> })), [])<br> alias_ip_range = optional(list(object({<br> ip_cidr_range = string<br> subnetwork_range_name = string<br> })), [])<br> ipv6_access_config = optional(list(object({<br> network_tier = string<br> })), [])<br> network = optional(string)<br> network_ip = optional(string, "")<br> nic_type = optional(string)<br> queue_count = optional(number)<br> stack_type = optional(string)<br> subnetwork_self_link = optional(string)<br> })), [])<br> bandwidth_tier = optional(string, "platform_default")<br> can_ip_forward = optional(bool, false)<br> disable_smt = optional(bool, false)<br> disk_auto_delete = optional(bool, true)<br> disk_labels = optional(map(string), {})<br> disk_size_gb = optional(number)<br> disk_type = optional(string, "n1-standard-1")<br> enable_confidential_vm = optional(bool, false)<br> enable_oslogin = optional(bool, true)<br> enable_shielded_vm = optional(bool, false)<br> gpu = optional(object({<br> count = number<br> type = string<br> }))<br> labels = optional(map(string), {})<br> machine_type = optional(string)<br> metadata = optional(map(string), {})<br> min_cpu_platform = optional(string)<br> num_instances = optional(number, 1)<br> on_host_maintenance = optional(string)<br> preemptible = optional(bool, false)<br> region = optional(string)<br> service_account = optional(object({<br> email = optional(string)<br> scopes = optional(list(string), ["https://www.googleapis.com/auth/cloud-platform"])<br> }))<br> shielded_instance_config = optional(object({<br> enable_integrity_monitoring = optional(bool, true)<br> enable_secure_boot = optional(bool, true)<br> enable_vtpm = optional(bool, true)<br> }))<br> source_image_family = optional(string)<br> source_image_project = optional(string)<br> source_image = optional(string)<br> static_ips = optional(list(string), [])<br> subnetwork_self_link = string<br> spot = optional(bool, false)<br> tags = optional(list(string), [])<br> zone = optional(string)<br> termination_action = optional(string)<br> }))</pre> | `[]` | no |
| <a name="input_login_startup_script"></a> [login\_startup\_script](#input\_login\_startup\_script) | Startup script used by the login VMs. | `string` | `"# no-op"` | no |
| <a name="input_login_startup_scripts_timeout"></a> [login\_startup\_scripts\_timeout](#input\_login\_startup\_scripts\_timeout) | The timeout (seconds) applied to each script in login\_startup\_scripts. If<br>any script exceeds this timeout, then the instance setup process is considered<br>failed and handled accordingly.<br><br>NOTE: When set to 0, the timeout is considered infinite and thus disabled. | `number` | `300` | no |
| <a name="input_machine_type"></a> [machine\_type](#input\_machine\_type) | Machine type to create. | `string` | `"c2-standard-4"` | no |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ locals {

# INSTANCE TEMPLATE
module "slurm_controller_template" {
source = "github.com/GoogleCloudPlatform/slurm-gcp.git//terraform/slurm_cluster/modules/slurm_instance_template?ref=6.6.0"
# source = "github.com/GoogleCloudPlatform/slurm-gcp.git//terraform/slurm_cluster/modules/slurm_instance_template?ref=6.6.0"
source = "github.com/wiktorn/slurm-gcp.git//terraform/slurm_cluster/modules/slurm_instance_template?ref=reserve_ip_addresses"

project_id = var.project_id
region = var.region
Expand Down Expand Up @@ -76,7 +77,7 @@ module "slurm_controller_template" {
source_image = local.source_image # requires source_image_logic.tf

# spot = TODO: add support for spot (?)
subnetwork = var.subnetwork_self_link
subnetwork_self_link = var.subnetwork_self_link

tags = concat([local.slurm_cluster_name], var.tags)
# termination_action = TODO: add support for termination_action (?)
Expand All @@ -92,21 +93,22 @@ locals {
}

module "slurm_controller_instance" {
source = "github.com/GoogleCloudPlatform/slurm-gcp.git//terraform/slurm_cluster/modules/_slurm_instance?ref=6.6.0"
# source = "github.com/GoogleCloudPlatform/slurm-gcp.git//terraform/slurm_cluster/modules/_slurm_instance?ref=6.6.0"
source = "github.com/wiktorn/slurm-gcp.git//terraform/slurm_cluster/modules/_slurm_instance?ref=reserve_ip_addresses"

access_config = var.enable_controller_public_ips ? [local.access_config] : []
add_hostname_suffix = false
hostname = "${local.slurm_cluster_name}-controller"
instance_template = module.slurm_controller_template.self_link

project_id = var.project_id
region = var.region
slurm_cluster_name = local.slurm_cluster_name
slurm_instance_role = "controller"
static_ips = var.static_ips
subnetwork = var.subnetwork_self_link
zone = var.zone
metadata = var.metadata
project_id = var.project_id
region = var.region
slurm_cluster_name = local.slurm_cluster_name
slurm_instance_role = "controller"
static_ips = var.static_ips
subnetwork_self_link = var.subnetwork_self_link
zone = var.zone
metadata = var.metadata

labels = merge(local.labels, local.files_cs_labels)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@

# TEMPLATE
module "slurm_login_template" {
source = "github.com/GoogleCloudPlatform/slurm-gcp.git//terraform/slurm_cluster/modules/slurm_instance_template?ref=6.6.0"
# source = "github.com/GoogleCloudPlatform/slurm-gcp.git//terraform/slurm_cluster/modules/slurm_instance_template?ref=6.6.0"
source = "github.com/wiktorn/slurm-gcp.git//terraform/slurm_cluster/modules/slurm_instance_template?ref=reserve_ip_addresses"

for_each = { for x in var.login_nodes : x.name_prefix => x }

Expand Down Expand Up @@ -50,14 +51,15 @@ module "slurm_login_template" {
source_image_project = each.value.source_image_project
source_image = each.value.source_image
spot = each.value.spot
subnetwork = each.value.subnetwork
subnetwork_self_link = each.value.subnetwork_self_link
tags = concat([local.slurm_cluster_name], each.value.tags)
termination_action = each.value.termination_action
}

# INSTANCE
module "slurm_login_instance" {
source = "github.com/GoogleCloudPlatform/slurm-gcp.git//terraform/slurm_cluster/modules/_slurm_instance?ref=6.6.0"
# source = "github.com/GoogleCloudPlatform/slurm-gcp.git//terraform/slurm_cluster/modules/_slurm_instance?ref=6.6.0"
source = "github.com/wiktorn/slurm-gcp.git//terraform/slurm_cluster/modules/_slurm_instance?ref=reserve_ip_addresses"
for_each = { for x in var.login_nodes : x.name_prefix => x }

access_config = each.value.access_config
Expand All @@ -72,10 +74,10 @@ module "slurm_login_instance" {
labels = merge(each.value.labels, local.files_cs_labels)
num_instances = each.value.num_instances

region = each.value.region
static_ips = each.value.static_ips
subnetwork = each.value.subnetwork
zone = each.value.zone
region = each.value.region
static_ips = each.value.static_ips
subnetwork_self_link = each.value.subnetwork_self_link
zone = each.value.zone

# trigger replacement of login nodes when the controller instance is replaced
replace_trigger = module.slurm_controller_instance.instances_self_links[0]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,12 @@ variable "login_nodes" {
ipv6_access_config = optional(list(object({
network_tier = string
})), [])
network = optional(string)
network_ip = optional(string, "")
nic_type = optional(string)
queue_count = optional(number)
stack_type = optional(string)
subnetwork = optional(string)
subnetwork_project = optional(string)
network = optional(string)
network_ip = optional(string, "")
nic_type = optional(string)
queue_count = optional(number)
stack_type = optional(string)
subnetwork_self_link = optional(string)
})), [])
bandwidth_tier = optional(string, "platform_default")
can_ip_forward = optional(bool, false)
Expand Down Expand Up @@ -163,7 +162,7 @@ variable "login_nodes" {
source_image_project = optional(string)
source_image = optional(string)
static_ips = optional(list(string), [])
subnetwork = string
subnetwork_self_link = string
spot = optional(bool, false)
tags = optional(list(string), [])
zone = optional(string)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ locals {
static_ips = var.static_ips
bandwidth_tier = var.bandwidth_tier

subnetwork = var.subnetwork_self_link
tags = var.tags
subnetwork_self_link = var.subnetwork_self_link
tags = var.tags
}
}

Expand Down