feat: IoT demo — Kafka + Redis + MongoDB, 6 services, removed broken AKHQ/ClickHouse/Superset

This commit is contained in:
“Naeel”
2026-07-21 18:15:25 +04:00
parent 336e6e3795
commit e434a44fb5
13 changed files with 571 additions and 0 deletions
+45
View File
@@ -0,0 +1,45 @@
# =============================================================================
# Kafka — шина сообщений
# =============================================================================
resource "nubes_kafka" "main" {
resource_name = local.kafka_resource_name
startup_configuration = {
resource_realm = var.realm
}
cluster_configuration = {
cpu = local.kafka_cpu
memory = local.kafka_memory
disk = local.kafka_disk
replicas = local.kafka_replicas
}
access_configuration = {
master_access_list = jsonencode(["10.0.0.0/8"])
}
operation_timeout = local.kafka_timeout
}
# -----------------------------------------------------------------------------
# Kafka Topic — iot-events
# -----------------------------------------------------------------------------
resource "nubes_kafka_topic" "events" {
kafka_id = nubes_kafka.main.id
name_topic = local.kafka_topic_name
partitions = local.kafka_topic_parts
replicas = local.kafka_topic_repl
}
# -----------------------------------------------------------------------------
# Kafka User — общий для producer и consumer
# -----------------------------------------------------------------------------
resource "nubes_kafka_user" "app" {
kafka_id = nubes_kafka.main.id
username = local.kafka_username
name_topic = nubes_kafka_topic.events.name_topic
operations = "Create,Describe,Read,Write"
access_hosts = "*"
group = "*"
}