Skip to content

Commit

Permalink
Merge pull request #2960 from mr0re1/no_cs
Browse files Browse the repository at this point in the history
SlurmGCP. Remove dependency of controller on config
  • Loading branch information
mr0re1 authored Aug 21, 2024
2 parents 0b35208 + 3aaee21 commit 45a1dda
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ module "slurm_controller_instance" {
zone = var.zone
metadata = var.metadata

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

# SECRETS: CLOUDSQL
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ module "slurm_login_instance" {
slurm_cluster_name = local.slurm_cluster_name

instance_template = module.slurm_login_template[each.key].self_link
labels = merge(each.value.labels, local.files_cs_labels)
labels = each.value.labels
num_instances = each.value.num_instances

additional_networks = each.value.additional_networks
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ locals {
tmp_cluster_name = substr(replace(lower(var.deployment_name), "/^[^a-z]*|[^a-z0-9]/", ""), 0, 10)
slurm_cluster_name = coalesce(var.slurm_cluster_name, local.tmp_cluster_name)

files_cs_labels = { slurm_files_checksum = module.slurm_files.checksum }
universe_domain = { "universe_domain" = var.universe_domain }
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ No modules.

| Name | Description |
|------|-------------|
| <a name="output_checksum"></a> [checksum](#output\_checksum) | Checksum of all files written to the bucket. |
| <a name="output_config"></a> [config](#output\_config) | Cluster configuration. |
| <a name="output_nodeset"></a> [nodeset](#output\_nodeset) | Cluster nodesets. |
| <a name="output_nodeset_dyn"></a> [nodeset\_dyn](#output\_nodeset\_dyn) | Cluster nodesets (dynamic). |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,17 +277,6 @@ data "local_file" "setup_external" {
}

locals {
checksum = md5(join("", flatten([
google_storage_bucket_object.config.md5hash,
google_storage_bucket_object.devel.md5hash,
[for k, f in google_storage_bucket_object.controller_startup_scripts : f.md5hash],
[for k, f in google_storage_bucket_object.compute_startup_scripts : f.md5hash],
[for k, f in google_storage_bucket_object.nodeset_startup_scripts : f.md5hash],
[for k, f in google_storage_bucket_object.login_startup_scripts : f.md5hash],
[for k, f in google_storage_bucket_object.prolog_scripts : f.md5hash],
[for k, f in google_storage_bucket_object.epilog_scripts : f.md5hash]
])))

external_epilog = [{
filename = "z_external_epilog.sh"
content = data.local_file.external_epilog.content
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,3 @@ output "nodeset_tpu" {
description = "Cluster nodesets (TPU)."
value = lookup(local.config, "nodeset_tpu", null)
}

output "checksum" {
description = "Checksum of all files written to the bucket."
value = local.checksum
}

0 comments on commit 45a1dda

Please sign in to comment.