Skip to content

Commit

Permalink
mainnet prelaunch infra (#371)
Browse files Browse the repository at this point in the history
  • Loading branch information
DaMandal0rian authored Nov 6, 2024
1 parent 82d7505 commit a7296c2
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 60 deletions.
52 changes: 17 additions & 35 deletions resources/mainnet/main.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module "gemini-3h" {
module "mainnet" {
source = "../../templates/terraform/network-primitives"
path_to_scripts = "../../templates/scripts"
path_to_configs = "../../templates/configs"
Expand All @@ -10,10 +10,10 @@ module "gemini-3h" {
regions = var.aws_region
instance-count = var.instance_count["bootstrap"]
docker-org = "autonomys"
docker-tag = "gemini-3h-2024-sep-03"
docker-tag = "mainnet-release-test-2"
reserved-only = false
prune = false
genesis-hash = "0c121c75f4ef450f40619e1fca9d1e8e7fbabc42c895bc4790801e85d5a91c34"
genesis-hash = "b256e3ca1d3ef43c1e52799df670aa307671b9e468c500def1f5b6b77173b5d4"
dsn-listen-port = 30533
node-dsn-port = 30433
disk-volume-size = var.disk_volume_size
Expand All @@ -26,10 +26,10 @@ module "gemini-3h" {
regions = var.aws_region
instance-count = var.instance_count["evm_bootstrap"]
docker-org = "autonomys"
docker-tag = "gemini-3h-2024-sep-03"
docker-tag = "mainnet-release-test-2"
reserved-only = false
prune = false
genesis-hash = "0c121c75f4ef450f40619e1fca9d1e8e7fbabc42c895bc4790801e85d5a91c34"
genesis-hash = "b256e3ca1d3ef43c1e52799df670aa307671b9e468c500def1f5b6b77173b5d4"
dsn-listen-port = 30533
node-dsn-port = 30433
operator-port = 30334
Expand All @@ -43,10 +43,10 @@ module "gemini-3h" {
regions = var.aws_region
instance-count = var.instance_count["autoid_bootstrap"]
docker-org = "autonomys"
docker-tag = "gemini-3h-2024-sep-03"
docker-tag = "mainnet-release-test-2"
reserved-only = false
prune = false
genesis-hash = "0c121c75f4ef450f40619e1fca9d1e8e7fbabc42c895bc4790801e85d5a91c34"
genesis-hash = "b256e3ca1d3ef43c1e52799df670aa307671b9e468c500def1f5b6b77173b5d4"
dsn-listen-port = 30533
node-dsn-port = 30433
operator-port = 30334
Expand All @@ -60,7 +60,7 @@ module "gemini-3h" {
regions = var.aws_region
instance-count = var.instance_count["rpc-indexer"]
docker-org = "autonomys"
docker-tag = "gemini-3h-2024-jul-16"
docker-tag = "mainnet-release-test-2"
domain-prefix = "rpc-indexer"
reserved-only = false
prune = false
Expand All @@ -75,7 +75,7 @@ module "gemini-3h" {
regions = var.aws_region
instance-count = var.instance_count["nova-indexer"]
docker-org = "autonomys"
docker-tag = "gemini-3h-2024-jul-16"
docker-tag = "mainnet-release-test-2"
domain-prefix = "nova-indexer"
reserved-only = false
prune = false
Expand All @@ -93,7 +93,7 @@ module "gemini-3h" {
regions = var.aws_region
instance-count = var.instance_count["rpc"]
docker-org = "autonomys"
docker-tag = "gemini-3h-2024-sep-03"
docker-tag = "mainnet-release-test-2"
domain-prefix = "rpc"
reserved-only = false
prune = false
Expand All @@ -102,14 +102,14 @@ module "gemini-3h" {
disk-volume-type = var.disk_volume_type
}

evm-node-config = {
domain-node-config = {
instance-type = var.instance_type["domain"]
deployment-version = 0
regions = var.aws_region
instance-count = var.instance_count["domain"]
docker-org = "autonomys"
docker-tag = "gemini-3h-2024-sep-03"
domain-prefix = "nova"
docker-tag = "mainnet-release-test-2"
domain-prefix = ["nova", "autoid"]
reserved-only = false
prune = false
node-dsn-port = 30433
Expand All @@ -120,37 +120,19 @@ module "gemini-3h" {
disk-volume-type = var.disk_volume_type
}

autoid-node-config = {
instance-type = var.instance_type["autoid"]
deployment-version = 0
regions = var.aws_region
instance-count = var.instance_count["autoid"]
docker-org = "subspace"
docker-tag = "gemini-3h-2024-may-06"
domain-prefix = ["autoid"]
reserved-only = false
prune = false
node-dsn-port = 30434
enable-domains = true
domain-id = var.domain_id
domain-labels = var.domain_labels
disk-volume-size = var.disk_volume_size
disk-volume-type = var.disk_volume_type
}

farmer-node-config = {
instance-type = var.instance_type["farmer"]
deployment-version = 0
regions = var.aws_region
instance-count = var.instance_count["farmer"]
docker-org = "autonomys"
docker-tag = "gemini-3h-2024-sep-03"
docker-tag = "mainnet-release-test-2"
reserved-only = false
prune = false
plot-size = "20G"
cache-percentage = var.cache_percentage
thread_pool_size = var.thread_pool_size
plot-size = "10G"
reward-address = var.farmer_reward_address
cache-percentage = var.cache_percentage
thread-pool-size = var.thread_pool_size
force-block-production = true
node-dsn-port = 30433
disk-volume-size = var.disk_volume_size
Expand Down
6 changes: 3 additions & 3 deletions resources/mainnet/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
//output
output "rpc-indexer-node-ipv4-addresses" {
value = module.mainnet.rpc-indexer_node_public_ip
value = module.mainnet.rpc_indexer_node_public_ip
description = "RPC indexer node IPv4 Addresses"
}

output "nova-indexer-node-ipv4-addresses" {
value = module.mainnet.nova-indexer_node_public_ip
value = module.mainnet.nova_indexer_node_public_ip
description = "Nova indexer node IPv4 Addresses"
}

Expand All @@ -30,7 +30,7 @@ output "bootstrap-node-autoid-ipv4-addresses" {
}

output "evm-node-ipv4-addresses" {
value = module.mainnet.domain_node_public_ip
value = module.mainnet.evm_node_public_ip
description = "Domain node IPv4 Addresses"
}

Expand Down
34 changes: 17 additions & 17 deletions resources/mainnet/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,19 @@ variable "domain_id" {
variable "domain_labels" {
description = "Tag of the domain to run"
type = list(string)
default = ["nova, "autoid"]
default = ["nova", "autoid"]
}

variable "instance_type" {
type = map(string)
default = {
bootstrap = "c7a.2xlarge"
rpc = "m6a.2xlarge"
domain = "m6a.2xlarge"
rpc-indexer = "c7a.2xlarge"
nova-indexer = "c7a.2xlarge"
farmer = "c7a.2xlarge"
evm_bootstrap = "c7a.xlarge"
bootstrap = "c7a.2xlarge"
rpc = "m7a.2xlarge"
domain = "m7a.2xlarge"
rpc-indexer = "c7a.4xlarge"
nova-indexer = "c7a.4xlarge"
farmer = "c7a.2xlarge"
evm_bootstrap = "c7a.xlarge"
autoid_bootstrap = "c7a.xlarge"
}
}
Expand All @@ -49,20 +49,20 @@ variable "vpc_cidr_block" {
variable "azs" {
type = string
description = "Availability Zones"
default = "us-east-1b"
default = "us-east-1a"
}

variable "instance_count" {
type = map(number)
default = {
bootstrap = 2
rpc = 2
domain = 0
autoid = 0
rpc-indexer = 1
nova-indexer = 0
farmer = 0
evm_bootstrap = 1
bootstrap = 2
rpc = 2
domain = 0
autoid = 0
rpc-indexer = 1
nova-indexer = 0
farmer = 1
evm_bootstrap = 0
autoid_bootstrap = 0
}
}
Expand Down
2 changes: 1 addition & 1 deletion resources/taurus/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ output "bootstrap-node-autoid-ipv4-addresses" {
description = "AutoID Bootstrap node IPv4 Addresses"
}

output "domain-node-ipv4-addresses" {
output "evm-node-ipv4-addresses" {
value = module.taurus.evm_node_public_ip
description = "Domain node IPv4 Addresses"
}
Expand Down
8 changes: 4 additions & 4 deletions templates/terraform/network-primitives/dns.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ locals {
# Create explicit mappings for nova and autoid instances
nova_instances = {
for idx in range(0, local.instance_split) : idx => {
ip_v4 = local.domain_nodes_ip_v4[idx]
ip_v6 = local.domain_nodes_ip_v6[idx]
ip_v4 = local.evm_nodes_ip_v4[idx]
ip_v6 = local.evm_nodes_ip_v6[idx]
}
}

autoid_instances = {
for idx in range(local.instance_split, var.domain-node-config.instance-count) : idx - local.instance_split => {
ip_v4 = local.domain_nodes_ip_v4[idx]
ip_v6 = local.domain_nodes_ip_v6[idx]
ip_v4 = local.autoid_nodes_ip_v4[idx]
ip_v6 = local.autoid_nodes_ip_v6[idx]
}
}
}
Expand Down

0 comments on commit a7296c2

Please sign in to comment.