Skip to content

Commit

Permalink
Merge pull request #199 from documentat/feature/YCDOCIO-2736-kf-ch-edit
Browse files Browse the repository at this point in the history
[REVIEW] YCDOCIO-2736: Edit Kafka-ClickHouse manifest
  • Loading branch information
redalka-cloud authored Jun 26, 2023
2 parents 808bd7e + 0c800c4 commit 95b6cc2
Showing 1 changed file with 46 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,25 @@
#
# Set the configuration of the Managed Service for Apache Kafka® and ClickHouse clusters

# Set the following settings:
# Specify the following settings:

locals {
producer_name = "" # Set name of the producer.
producer_password = "" # Set the password of the producer.
topic_name = "" # Set the Kafka topic name. Each Managed Service for Apache Kafka® cluster must have its unique topic name.
consumer_name = "" # Set name of the consumer.
consumer_password = "" # Set the password of the consumer.
db_user_name = "" # Set database username.
db_user_password = "" # Set database user password.
zone_a_v4_cidr_blocks = "10.1.0.0/16" # Set the CIDR block for subnet in the ru-central1-a availability zone.
kafka_cluster_name = "kafka-cluster" # Set the Managed Service for Apache Kafka® cluster name
clickhouse_cluster_name = "clickhouse-cluster" # Set the Managed Service for ClickHouse cluster name
# Settings for Managed Service for Apache Kafka® cluster:
producer_name = "" # Name of a user with the producer role
producer_password = "" # Password of the user with the producer role
topic_name = "" # Apache Kafka® topic name. Each Managed Service for Apache Kafka® cluster must have its unique topic name.
consumer_name = "" # Name of a user with the consumer role
consumer_password = "" # Password of the user with the consumer role

# Settings for Managed Service for ClickHouse cluster:
db_user_name = "" # Name of the ClickHouse database user
db_user_password = "" # Password of the ClickHouse database user

# The following settings are predefined. Change them only if necessary.

zone_a_v4_cidr_blocks = "10.1.0.0/16" # CIDR block for subnet in the ru-central1-a availability zone
kafka_cluster_name = "kafka-cluster" # Managed Service for Apache Kafka® cluster name. If you are going to create multiple clusters, then duplicate, rename, and edit this variable.
clickhouse_cluster_name = "clickhouse-cluster" # Managed Service for ClickHouse cluster name
}

resource "yandex_vpc_network" "network" {
Expand All @@ -39,21 +45,21 @@ resource "yandex_vpc_default_security_group" "security-group" {
network_id = yandex_vpc_network.network.id

ingress {
description = "Allow connections to the Managed Service for Apache Kafka® cluster from the Internet"
description = "Allows connections to the Managed Service for Apache Kafka® cluster from the Internet"
protocol = "TCP"
port = 9091
v4_cidr_blocks = ["0.0.0.0/0"]
}

ingress {
description = "# Allow connections to the Managed Service for ClickHouse cluster from the Internet"
description = "Allows connections to the Managed Service for ClickHouse cluster from the Internet"
protocol = "TCP"
port = 9440
v4_cidr_blocks = ["0.0.0.0/0"]
}

egress {
description = "Allow outgoing connections to any required resource"
description = "Allows outgoing connections to any required resource"
protocol = "ANY"
from_port = 0
to_port = 65535
Expand Down Expand Up @@ -121,6 +127,32 @@ resource "yandex_mdb_clickhouse_cluster" "clickhouse-cluster" {
disk_type_id = "network-ssd"
disk_size = 10 # GB
}

# Uncomment the next block if you are going to use only one Managed Service for Apache Kafka® cluster

#config {
# kafka {
# security_protocol = "SECURITY_PROTOCOL_SASL_SSL"
# sasl_mechanism = "SASL_MECHANISM_SCRAM_SHA_512"
# sasl_username = local.consumer_name
# sasl_password = local.consumer_password
# }
#}

# Uncomment the next block if you are going to use multiple Managed Service for Apache Kafka® clusters. Specify topic name and consumer credentials.

#config {
# kafka_topic {
# name = "<topic name>"
# settings {
# security_protocol = "SECURITY_PROTOCOL_SASL_SSL"
# sasl_mechanism = "SASL_MECHANISM_SCRAM_SHA_512"
# sasl_username = "<name of the user for the consumer>"
# sasl_password = "<password of the user for the consumer>"
# }
# }
#}

}

host {
Expand Down

0 comments on commit 95b6cc2

Please sign in to comment.