Skip to content

Commit

Permalink
add auto
Browse files Browse the repository at this point in the history
  • Loading branch information
DaMandal0rian committed May 7, 2024
1 parent 3d73464 commit 79ed2eb
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion resources/devnet/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion resources/gemini-3h/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions templates/scripts/create_domain_node_compose_file.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 2 additions & 1 deletion templates/terraform/hetzner/domain_node_provisioner.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion templates/terraform/hetzner/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions templates/terraform/network-primitives/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ variable "cloudflare_email" {
variable "cloudflare_api_token" {
type = string
description = "cloudflare api token"
sensitive = true
sensitive = true
}

variable "instance_type" {
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 79ed2eb

Please sign in to comment.