Skip to content

Commit

Permalink
updated formatting and removal of old comments
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenplatt committed Nov 29, 2023
1 parent a5483db commit 67b0ad4
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 31 deletions.
20 changes: 8 additions & 12 deletions automation/terraform/modules/kubernetes/testnet/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -203,13 +203,11 @@ variable "seed_external_port" {
variable "seed_configs" {
type = list(
object({
name = string,
class = string,
libp2p_secret = string,
libp2p_secret_pw = string
# external_port = number,
external_ip = string,
# private_key_secret = string,
name = string,
class = string,
libp2p_secret = string,
libp2p_secret_pw = string
external_ip = string,
enableArchive = bool,
archiveAddress = string
persist_working_dir = bool,
Expand All @@ -233,11 +231,9 @@ variable "block_producer_key_pass" {
variable "block_producer_configs" {
type = list(
object({
name = string,
class = string,
keypair_name = string,
# private_key = string,
# public_key = string,
name = string,
class = string,
keypair_name = string,
privkey_password = string,
external_port = number,
libp2p_secret = string,
Expand Down
33 changes: 14 additions & 19 deletions automation/terraform/modules/o1-testnet/testnet.tf
Original file line number Diff line number Diff line change
Expand Up @@ -66,37 +66,32 @@ module "kubernetes_testnet" {
# block_producer_key_pass = var.block_producer_key_pass
block_producer_configs = [for i, bp in local.block_producer_configs :
{
name = bp.name
class = bp.class
# id = bp.total_node_index
name = bp.name
class = bp.class
keypair_name = "${bp.class}-${bp.unique_node_index}-key"
privkey_password = "naughty blue worm"
external_port = bp.port
libp2p_secret = ""
enable_gossip_flooding = false
# run_with_user_agent = bp.class =="whale" ? false : ( var.nodes_with_user_agent == [] ? true : contains(var.nodes_with_user_agent, bp.name) )
run_with_user_agent = bp.class == "whale" ? false : true
run_with_bots = false
enable_peer_exchange = true
isolated = false
enableArchive = false
archiveAddress = length(local.archive_node_configs) != 0 ? "${element(local.archive_node_configs, i % (length(local.archive_node_configs)))["name"]}:${element(local.archive_node_configs, i % (length(local.archive_node_configs)))["serverPort"]}" : ""
persist_working_dir = true
run_with_user_agent = bp.class == "whale" ? false : true
run_with_bots = false
enable_peer_exchange = true
isolated = false
enableArchive = false
archiveAddress = length(local.archive_node_configs) != 0 ? "${element(local.archive_node_configs, i % (length(local.archive_node_configs)))["name"]}:${element(local.archive_node_configs, i % (length(local.archive_node_configs)))["serverPort"]}" : ""
persist_working_dir = true
}
]

seed_external_port = 10001

seed_configs = [
for i in range(var.seed_count) : {
name = local.seed_static_peers[i].name
class = "seed"
# id = i + 1
# external_port = local.seed_static_peers[i].port
libp2p_secret = "seed-${i + 1}-key"
libp2p_secret_pw = "naughty blue worm"
external_ip = google_compute_address.seed_static_ip[i].address
# private_key_secret = "online-seeds-account-${i + 1}-key"
name = local.seed_static_peers[i].name
class = "seed"
libp2p_secret = "seed-${i + 1}-key"
libp2p_secret_pw = "naughty blue worm"
external_ip = google_compute_address.seed_static_ip[i].address
enableArchive = length(local.archive_node_configs) > 0
archiveAddress = length(local.archive_node_configs) > 0 ? "${element(local.archive_node_configs, i)["name"]}:${element(local.archive_node_configs, i)["serverPort"]}" : ""
persist_working_dir = true
Expand Down

0 comments on commit 67b0ad4

Please sign in to comment.