Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix staging tf #5787

Merged
merged 2 commits into from
Feb 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions ops/testnet/staging/backend/config.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ locals {
cartographer_env_vars = {
CARTOGRAPHER_CONFIG = local.local_cartographer_config,
DATABASE_URL = "postgres://${var.postgres_user}:${var.postgres_password}@${module.cartographer_db.db_instance_endpoint}/connext",
ENVIRONMENT = var.environment,
ENVIRONMENT = "production",
STAGE = var.stage,
DD_ENV = "${var.environment}-${var.stage}",
DD_LOGS_ENABLED = true,
Expand All @@ -16,13 +16,13 @@ locals {
{ name = "PGRST_DB_URI", value = "postgres://${var.postgres_user}:${var.postgres_password}@${module.cartographer_db.db_instance_endpoint}/connext" },
{ name = "PGRST_DB_SCHEMA", value = "public" },
{ name = "PGRST_DB_ANON_ROLE", value = "query" },
{ name = "ENVIRONMENT", value = var.environment },
{ name = "ENVIRONMENT", value = "production" },
{ name = "STAGE", value = var.stage }
]

sdk_server_env_vars = [
{ name = "SDK_SERVER_CONFIG", value = local.local_sdk_server_config },
{ name = "ENVIRONMENT", value = var.environment },
{ name = "ENVIRONMENT", value = "production" },
{ name = "STAGE", value = var.stage },
{ name = "DD_PROFILING_ENABLED", value = "true" },
{ name = "DD_ENV", value = "${var.environment}-${var.stage}" },
Expand All @@ -44,7 +44,7 @@ locals {

# The following are defined in variables.tf and don't map to the
# definitions of environment and network in agent configs.
environment = var.stage
environment = "production"
network = var.environment

redis = {
Expand All @@ -69,6 +69,6 @@ locals {
"1936027759" = { confirmations = 10 }
"1869640549" = { confirmations = 10 }
}
environment = var.stage
environment = "production"
})
}
66 changes: 13 additions & 53 deletions ops/testnet/staging/core/config.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ locals {

sequencer_env_vars = [
{ name = "SEQ_CONFIG", value = local.local_sequencer_config },
{ name = "ENVIRONMENT", value = var.environment },
{ name = "ENVIRONMENT", value = "production" },
{ name = "STAGE", value = var.stage },
{ name = "DD_PROFILING_ENABLED", value = "true" },
{ name = "DD_ENV", value = "${var.environment}-${var.stage}" },
]
router_env_vars = [
{ name = "NXTP_CONFIG", value = local.local_router_config },
{ name = "ENVIRONMENT", value = var.environment },
{ name = "ENVIRONMENT", value = "production" },
{ name = "STAGE", value = var.stage },
{ name = "DD_PROFILING_ENABLED", value = "true" },
{ name = "DD_ENV", value = "${var.environment}-${var.stage}" },
Expand All @@ -25,7 +25,7 @@ locals {
])
lighthouse_env_vars = {
NXTP_CONFIG = local.local_lighthouse_config,
ENVIRONMENT = var.environment,
ENVIRONMENT = "production",
STAGE = var.stage,
DD_LOGS_ENABLED = true,
DD_ENV = "${var.environment}-${var.stage}",
Expand All @@ -34,57 +34,43 @@ locals {
}
lighthouse_prover_subscriber_env_vars = [
{ name = "NXTP_CONFIG", value = local.local_lighthouse_config },
{ name = "ENVIRONMENT", value = var.environment },
{ name = "ENVIRONMENT", value = "production" },
{ name = "STAGE", value = var.stage },
{ name = "DD_PROFILING_ENABLED", value = "true" },
{ name = "DD_ENV", value = "${var.environment}-${var.stage}" },
]
lighthouse_web3signer_env_vars = [
{ name = "WEB3_SIGNER_PRIVATE_KEY", value = var.lighthouse_web3_signer_private_key },
{ name = "WEB3SIGNER_HTTP_HOST_ALLOWLIST", value = "*" },
{ name = "ENVIRONMENT", value = var.environment },
{ name = "ENVIRONMENT", value = "production" },
{ name = "STAGE", value = var.stage },
{ name = "DD_ENV", value = "${var.environment}-${var.stage}" },
]
router_web3signer_env_vars = [
{ name = "WEB3_SIGNER_PRIVATE_KEY", value = var.router_web3_signer_private_key },
{ name = "WEB3SIGNER_HTTP_HOST_ALLOWLIST", value = "*" },
{ name = "ENVIRONMENT", value = var.environment },
{ name = "ENVIRONMENT", value = "production" },
{ name = "STAGE", value = var.stage },
{ name = "DD_ENV", value = "${var.environment}-${var.stage}" },
]
sequencer_web3signer_env_vars = [
{ name = "WEB3_SIGNER_PRIVATE_KEY", value = var.sequencer_web3_signer_private_key },
{ name = "WEB3SIGNER_HTTP_HOST_ALLOWLIST", value = "*" },
{ name = "ENVIRONMENT", value = var.environment },
{ name = "ENVIRONMENT", value = "production" },
{ name = "STAGE", value = var.stage },
{ name = "DD_ENV", value = "${var.environment}-${var.stage}" },
]
relayer_env_vars = [
{ name = "NXTP_CONFIG", value = local.local_relayer_config },
{ name = "ENVIRONMENT", value = var.environment },
{ name = "ENVIRONMENT", value = "production" },
{ name = "STAGE", value = var.stage },
{ name = "DD_PROFILING_ENABLED", value = "true" },
{ name = "DD_ENV", value = "${var.environment}-${var.stage}" },
]
relayer_web3signer_env_vars = [
{ name = "WEB3_SIGNER_PRIVATE_KEY", value = var.relayer_web3_signer_private_key },
{ name = "WEB3SIGNER_HTTP_HOST_ALLOWLIST", value = "*" },
{ name = "ENVIRONMENT", value = var.environment },
{ name = "STAGE", value = var.stage },
{ name = "DD_ENV", value = "${var.environment}-${var.stage}" },
]
watcher_env_vars = [
{ name = "WATCHER_CONFIG", value = local.local_watcher_config },
{ name = "ENVIRONMENT", value = var.environment },
{ name = "STAGE", value = var.stage },
{ name = "DD_PROFILING_ENABLED", value = "true" },
{ name = "DD_ENV", value = var.stage }
]
watcher_web3signer_env_vars = [
{ name = "WEB3_SIGNER_PRIVATE_KEY", value = var.watcher_web3_signer_private_key },
{ name = "WEB3SIGNER_HTTP_HOST_ALLOWLIST", value = "*" },
{ name = "ENVIRONMENT", value = var.environment },
{ name = "ENVIRONMENT", value = "production" },
{ name = "STAGE", value = var.stage },
{ name = "DD_ENV", value = "${var.environment}-${var.stage}" },
]
Expand Down Expand Up @@ -127,7 +113,7 @@ locals {
url = "https://${module.relayer_server.service_endpoint}"
}
]
environment = var.stage
environment = "production"
database = {
url = local.default_db_url
}
Expand Down Expand Up @@ -229,7 +215,7 @@ locals {
}
cartographerUrl = "https://postgrest.testnet.staging.connext.ninja"
web3SignerUrl = "https://${module.router_web3signer.service_endpoint}"
environment = var.stage
environment = "production"
messageQueue = {
uri = "amqps://${var.rmq_mgt_user}:${var.rmq_mgt_password}@${module.centralised_message_queue.aws_mq_amqp_endpoint}"
}
Expand Down Expand Up @@ -265,7 +251,7 @@ locals {
url = "https://${module.relayer_server.service_endpoint}"
}
]
environment = var.stage
environment = "production"
database = {
url = local.default_db_url
}
Expand Down Expand Up @@ -314,33 +300,7 @@ locals {
providers = ["https://sepolia-rollup.arbitrum.io/rpc"]
}
}
environment = var.stage
environment = "production"
web3SignerUrl = "https://${module.relayer_web3signer.service_endpoint}"
})

local_watcher_config = jsonencode({
server = {
adminToken = var.admin_token_watcher
}
logLevel = "debug"
environment = "staging"
chains = {
"1869640549" = {
providers = ["https://sepolia.optimism.io/"]
}
"1936027759" = {
providers = ["https://eth-sepolia.public.blastapi.io"]
}
"1633842021" = {
providers = ["https://sepolia-rollup.arbitrum.io/rpc"]
}
}
web3SignerUrl = "https://${module.watcher_web3signer.service_endpoint}"
environment = var.stage
discordHookUrl = "https://discord.com/api/webhooks/${var.discord_webhook_key}"
telegramApiKey = "${var.telegram_api_key}"
telegramChatId = "${var.telegram_chat_id}"
betterUptimeApiKey = "${var.betteruptime_api_key}"
betterUptimeRequesterEmail = "${var.betteruptime_requester_email}"
})
}
6 changes: 3 additions & 3 deletions ops/testnet/staging/core/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ module "relayer" {
ingress_ipv6_cdir_blocks = []
service_security_groups = flatten([module.network.allow_all_sg, module.network.ecs_task_sg])
cert_arn = var.certificate_arn_testnet
container_env_vars = merge(local.relayer_env_vars, { RELAYER_SERVICE = "poller" })
container_env_vars = concat(local.relayer_env_vars, [{ name = "RELAYER_SERVICE", value = "poller" }])
}

module "relayer_server" {
Expand Down Expand Up @@ -488,8 +488,8 @@ module "relayer_server" {
ingress_cdir_blocks = [module.network.vpc_cdir_block]
ingress_ipv6_cdir_blocks = []
service_security_groups = flatten([module.network.allow_all_sg, module.network.ecs_task_sg])
cert_arn = var.certificate_arn
container_env_vars = merge(local.relayer_env_vars, { RELAYER_SERVICE = "server" })
cert_arn = var.certificate_arn_testnet
container_env_vars = concat(local.relayer_env_vars, [{ name = "RELAYER_SERVICE", value = "server" }])
}

module "relayer_web3signer" {
Expand Down
8 changes: 0 additions & 8 deletions ops/testnet/staging/core/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,6 @@ output "relayer-dns" {
value = module.relayer.dns_name
}

output "watcher-service-endpoint" {
value = module.watcher.service_endpoint
}

output "watcher-dns" {
value = module.watcher.dns_name
}

output "rmq-management-endpoint" {
value = module.centralised_message_queue.aws_mq_broker_console
}
Expand Down
Loading