diff --git a/resources/devnet/main.tf b/resources/devnet/main.tf index 17e1ced8..e15ad043 100644 --- a/resources/devnet/main.tf +++ b/resources/devnet/main.tf @@ -73,7 +73,7 @@ module "devnet" { instance-count = var.instance_count["domain"] docker-org = "subspace" docker-tag = "snapshot-2024-jan-23-2" - domain-prefix = "domain" + domain-prefix = ["nova", "auto"] reserved-only = false prune = false node-dsn-port = 30434 diff --git a/resources/gemini-3h/main.tf b/resources/gemini-3h/main.tf index ca4345f4..db6d085b 100644 --- a/resources/gemini-3h/main.tf +++ b/resources/gemini-3h/main.tf @@ -72,7 +72,7 @@ module "gemini-3h" { instance-count = var.instance_count["domain"] docker-org = "subspace" docker-tag = "gemini-3h-2024-mar-29" - domain-prefix = "nova" + domain-prefix = ["nova"] reserved-only = false prune = false node-dsn-port = 30433 diff --git a/templates/scripts/create_domain_node_compose_file.sh b/templates/scripts/create_domain_node_compose_file.sh index 9e2ae4c2..37069930 100755 --- a/templates/scripts/create_domain_node_compose_file.sh +++ b/templates/scripts/create_domain_node_compose_file.sh @@ -89,12 +89,12 @@ services: labels: - "traefik.enable=true" - "traefik.http.services.archival-node.loadbalancer.server.port=8944" - - "traefik.http.routers.archival-node.rule=Host(\`\${DOMAIN_PREFIX}-\${DOMAIN_ID_EVM}.\${DOMAIN_LABEL_EVM}.\${NETWORK_NAME}.subspace.network\`) && Path(\`/ws\`)" + - "traefik.http.routers.archival-node.rule=Host(\`\${DOMAIN_PREFIX_EVM}-\${DOMAIN_ID_EVM}.\${NETWORK_NAME}.subspace.network\`) && Path(\`/ws\`)" - "traefik.http.routers.archival-node.tls=true" - "traefik.http.routers.archival-node.tls.certresolver=le" - "traefik.http.routers.archival-node.entrypoints=websecure" - "traefik.http.routers.archival-node.middlewares=redirect-https" - - "traefik.http.routers.archival-node-auto.rule=Host(\`\${DOMAIN_PREFIX}-\${DOMAIN_ID_AUTO}.\${DOMAIN_LABEL_AUTO}.\${NETWORK_NAME}.subspace.network\`) && Path(\`/ws\`)" + - "traefik.http.routers.archival-node-auto.rule=Host(\`\${DOMAIN_PREFIX_AUTO}-\${DOMAIN_ID_AUTO}.\${NETWORK_NAME}.subspace.network\`) && Path(\`/ws\`)" - "traefik.http.routers.archival-node-auto.tls=true" - "traefik.http.routers.archival-node-auto.tls.certresolver=le" - "traefik.http.routers.archival-node-auto.entrypoints=websecure" diff --git a/templates/terraform/hetzner/domain_node_provisioner.tf b/templates/terraform/hetzner/domain_node_provisioner.tf index 3b190cea..65cee7d8 100644 --- a/templates/terraform/hetzner/domain_node_provisioner.tf +++ b/templates/terraform/hetzner/domain_node_provisioner.tf @@ -153,7 +153,8 @@ resource "null_resource" "start-domain-nodes" { "echo REPO_ORG=${var.domain-node-config.repo-org} > /root/subspace/.env", "echo NODE_TAG=${var.domain-node-config.node-tag} >> /root/subspace/.env", "echo NETWORK_NAME=${var.network_name} >> /root/subspace/.env", - "echo DOMAIN_PREFIX=${var.domain-node-config.domain-prefix} >> /root/subspace/.env", + "echo DOMAIN_PREFIX_EVM=${var.domain-node-config.domain-prefix[0]} >> /home/${var.ssh_user}/subspace/.env", + "echo DOMAIN_PREFIX_AUTO=${var.domain-node-config.domain-prefix[1]} >> /home/${var.ssh_user}/subspace/.env", "echo DOMAIN_LABEL_EVM=${var.domain-node-config.domain-labels[0]} >> /home/${var.ssh_user}/subspace/.env", "echo DOMAIN_ID_EVM=${var.domain-node-config.domain-id[0]} >> /home/${var.ssh_user}/subspace/.env", "echo DOMAIN_LABEL_AUTO=${var.domain-node-config.domain-labels[1]} >> /home/${var.ssh_user}/subspace/.env", diff --git a/templates/terraform/hetzner/variables.tf b/templates/terraform/hetzner/variables.tf index cce6bea7..32a71573 100644 --- a/templates/terraform/hetzner/variables.tf +++ b/templates/terraform/hetzner/variables.tf @@ -36,7 +36,7 @@ variable "domain-node-config" { repo-org = string node-tag = string additional-node-ips = list(string) - domain-prefix = string + domain-prefix = list(string) reserved-only = bool prune = bool node-dsn-port = number diff --git a/templates/terraform/network-primitives/domain_node_provisioner.tf b/templates/terraform/network-primitives/domain_node_provisioner.tf index 88b29845..a3cc7014 100644 --- a/templates/terraform/network-primitives/domain_node_provisioner.tf +++ b/templates/terraform/network-primitives/domain_node_provisioner.tf @@ -170,7 +170,8 @@ resource "null_resource" "start-domain-nodes" { "echo NODE_ORG=${var.domain-node-config.docker-org} > /home/${var.ssh_user}/subspace/.env", "echo NODE_TAG=${var.domain-node-config.docker-tag} >> /home/${var.ssh_user}/subspace/.env", "echo NETWORK_NAME=${var.network_name} >> /home/${var.ssh_user}/subspace/.env", - "echo DOMAIN_PREFIX=${var.domain-node-config.domain-prefix} >> /home/${var.ssh_user}/subspace/.env", + "echo DOMAIN_PREFIX_EVM=${var.domain-node-config.domain-prefix[0]} >> /home/${var.ssh_user}/subspace/.env", + "echo DOMAIN_PREFIX_AUTO=${var.domain-node-config.domain-prefix[1]} >> /home/${var.ssh_user}/subspace/.env", # //todo use a map for domain id and labels "echo DOMAIN_LABEL_EVM=${var.domain-node-config.domain-labels[0]} >> /home/${var.ssh_user}/subspace/.env", "echo DOMAIN_ID_EVM=${var.domain-node-config.domain-id[0]} >> /home/${var.ssh_user}/subspace/.env", diff --git a/templates/terraform/network-primitives/variables.tf b/templates/terraform/network-primitives/variables.tf index 8ca2a4df..f22fb900 100644 --- a/templates/terraform/network-primitives/variables.tf +++ b/templates/terraform/network-primitives/variables.tf @@ -13,7 +13,7 @@ variable "cloudflare_email" { variable "cloudflare_api_token" { type = string description = "cloudflare api token" - sensitive = true + sensitive = true } variable "instance_type" { @@ -142,7 +142,7 @@ variable "domain-node-config" { instance-count = number docker-org = string docker-tag = string - domain-prefix = string + domain-prefix = list(string) reserved-only = bool prune = bool node-dsn-port = number