feat: IoT demo — RabbitMQ + Redis + MongoDB + Node.js producer plan (test stand cleanup)
This commit is contained in:
@@ -10,12 +10,11 @@ locals {
|
||||
consumer_kafka_user_key = try(nonsensitive(local.consumer_kafka_secrets["iot-app"]["user.key"]), "")
|
||||
|
||||
consumer_redis_host = try(nubes_redis.main.state_out_flat["internalConnect.master"], "")
|
||||
consumer_redis_secrets = try(jsondecode(nubes_redis.main.vault_secrets["users"]), tomap({}))
|
||||
consumer_redis_password = try(nonsensitive(lookup(local.consumer_redis_secrets, "default", tomap({})).password), "")
|
||||
consumer_redis_password = try(nonsensitive(nubes_redis.main.vault_secrets["adminPass"]), "")
|
||||
|
||||
consumer_mongo_host = try(nubes_mongodb.main.state_out_flat["internalConnect"], "")
|
||||
consumer_mongo_secrets = try(jsondecode(nubes_mongodb.main.vault_secrets["users"]), tomap({}))
|
||||
consumer_mongo_password = try(nonsensitive(lookup(local.consumer_mongo_secrets, "admin", tomap({})).password), "")
|
||||
consumer_mongo_user = try(nonsensitive(nubes_mongodb.main.vault_secrets["adminUser"]), "admin")
|
||||
consumer_mongo_password = try(nonsensitive(nubes_mongodb.main.vault_secrets["adminPass"]), "")
|
||||
}
|
||||
|
||||
resource "nubes_flask" "consumer" {
|
||||
@@ -56,7 +55,7 @@ resource "nubes_flask" "consumer" {
|
||||
REDIS_HOST = local.consumer_redis_host
|
||||
REDIS_PORT = "6379"
|
||||
REDIS_PASSWORD = local.consumer_redis_password
|
||||
MONGO_URI = "mongodb://admin:${local.consumer_mongo_password}@${local.consumer_mongo_host}:27017/iot?authSource=admin"
|
||||
MONGO_URI = "mongodb://${local.consumer_mongo_user}:${local.consumer_mongo_password}@${local.consumer_mongo_host}:27017/iot?authSource=admin"
|
||||
MONGO_DB = "iot"
|
||||
})
|
||||
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
# =============================================================================
|
||||
locals {
|
||||
dashboard_redis_host = try(nubes_redis.main.state_out_flat["internalConnect.master"], "")
|
||||
dashboard_redis_secrets = try(jsondecode(nubes_redis.main.vault_secrets["users"]), tomap({}))
|
||||
dashboard_redis_password = try(nonsensitive(lookup(local.dashboard_redis_secrets, "default", tomap({})).password), "")
|
||||
dashboard_redis_password = try(nonsensitive(nubes_redis.main.vault_secrets["adminPass"]), "")
|
||||
}
|
||||
|
||||
resource "nubes_nodejs" "dashboard" {
|
||||
|
||||
@@ -25,27 +25,14 @@ locals {
|
||||
# Kafka — user (общий для producer и consumer)
|
||||
kafka_username = "iot-app"
|
||||
|
||||
# ═══════════════════════════════════════════════════════════════════════════
|
||||
# ClickHouse
|
||||
# ═══════════════════════════════════════════════════════════════════════════
|
||||
|
||||
ch_resource_name = "iot-ch"
|
||||
ch_cpu = 500
|
||||
ch_memory = 1024
|
||||
ch_disk = 10
|
||||
ch_replicas = 1
|
||||
ch_shards = 1
|
||||
ch_version = "24.8"
|
||||
ch_timeout = "15m"
|
||||
|
||||
# ═══════════════════════════════════════════════════════════════════════════
|
||||
# Flask — Producer
|
||||
# ═══════════════════════════════════════════════════════════════════════════
|
||||
|
||||
producer_resource_name = "iot-producer"
|
||||
producer_domain = "iotproducer"
|
||||
producer_resource_name = "iot-producer-v2"
|
||||
producer_domain = "iotprod"
|
||||
producer_git_path = "https://gitea.services.ngcloud.ru/Nail/tf-iot-producer.git"
|
||||
producer_git_revision = "master"
|
||||
producer_git_revision = "3b52098"
|
||||
producer_cpu = 300
|
||||
producer_memory = 256
|
||||
producer_replicas = 1
|
||||
@@ -55,10 +42,10 @@ locals {
|
||||
# Flask — Consumer
|
||||
# ═══════════════════════════════════════════════════════════════════════════
|
||||
|
||||
consumer_resource_name = "iot-consumer"
|
||||
consumer_domain = "iotconsumer"
|
||||
consumer_resource_name = "iot-consumer-v2"
|
||||
consumer_domain = "iotcons"
|
||||
consumer_git_path = "https://gitea.services.ngcloud.ru/Nail/tf-iot-consumer.git"
|
||||
consumer_git_revision = "master"
|
||||
consumer_git_revision = "3a9eef8"
|
||||
consumer_cpu = 300
|
||||
consumer_memory = 256
|
||||
consumer_replicas = 1
|
||||
@@ -93,7 +80,7 @@ locals {
|
||||
dashboard_resource_name = "iot-dashboard"
|
||||
dashboard_domain = "iotdash"
|
||||
dashboard_git_path = "https://gitea.services.ngcloud.ru/Nail/tf-iot-dashboard.git"
|
||||
dashboard_git_revision = "master"
|
||||
dashboard_git_revision = "42eb636"
|
||||
dashboard_cpu = 300
|
||||
dashboard_memory = 256
|
||||
dashboard_replicas = 1
|
||||
|
||||
Reference in New Issue
Block a user