Skip to content

Commit

Permalink
Update resources for throughput experiment
Browse files Browse the repository at this point in the history
* Drop old ACLs: these only existed because the `tls-app` module used to
  create quotas and we didn't want those on the topic, the module
  no longer creates those quotas, so just rely on the module
* Unify consumer requirements into a single module: so the single
  deployment can consume from one topic and write to another

Ticket: DENA-1069
  • Loading branch information
matthewhughes-uw committed Nov 28, 2024
1 parent 84e5a2e commit 73a05e2
Showing 1 changed file with 11 additions and 27 deletions.
38 changes: 11 additions & 27 deletions dev-aws/kafka-shared-msk/pubsub/pubsub-test-throughput.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,31 +14,6 @@ resource "kafka_topic" "pubsub_throughput_test" {
}
}

module "example_producer_throughput" {
source = "../../../modules/tls-app"
produce_topics = [kafka_topic.pubsub_throughput_test.name]
cert_common_name = "pubsub/example-throughput-producer"
}

/* no not use the module for the consumer, as we don't need quota */
resource "kafka_acl" "throughput_consumer_group_acl" {
resource_name = "pubsub.consume-throughput"
resource_type = "Group"
acl_principal = "User:CN=pubsub/throughput-test-consumer"
acl_host = "*"
acl_operation = "Read"
acl_permission_type = "Allow"
}

resource "kafka_acl" "throughput_consumer_topic_acl" {
resource_name = kafka_topic.pubsub_throughput_test.name
resource_type = "Topic"
acl_principal = "User:CN=pubsub/throughput-test-consumer"
acl_host = "*"
acl_operation = "Read"
acl_permission_type = "Allow"
}

# a topic to write to to simulate some real work
resource "kafka_topic" "pubsub_throughput_test_out" {
name = "pubsub.throughput-test-out"
Expand All @@ -58,8 +33,17 @@ resource "kafka_topic" "pubsub_throughput_test_out" {
}
}

module "example_producer_throughput_out" {

module "example_producer_throughput" {
source = "../../../modules/tls-app"
produce_topics = [kafka_topic.pubsub_throughput_test.name]
cert_common_name = "pubsub/example-throughput-producer"
}

module "throughput_test_consumer" {
source = "../../../modules/tls-app"
produce_topics = [kafka_topic.pubsub_throughput_test_out.name]
cert_common_name = "pubsub/example-throughput-producer-out"
consume_topics = [kafka_topic.pubsub_throughput_test.name]
consume_groups = ["pubsub.throughput-test-consumer"]
cert_common_name = "pubsub/throughput-test-consumer"
}

0 comments on commit 73a05e2

Please sign in to comment.