Browse the Repo

file-type-icon.circleci
file-type-iconexamples
file-type-iconconfluent-oss-ami
file-type-iconkafka-ami
file-type-iconconfig
file-type-iconssl
file-type-iconREADME.md
file-type-iconcheck-for-kafka-key-store.sh
file-type-iconconfigure-kafka-server.sh
file-type-iconkafka.json
file-type-iconkafka-zookeeper-confluent-oss-ami
file-type-iconkafka-zookeeper-confluent-oss-colocated-cl...
file-type-iconkafka-zookeeper-confluent-oss-standalone-c...
file-type-iconkafka-zookeeper-standalone-clusters
file-type-iconzookeeper-ami
file-type-iconmodules
file-type-icontest
file-type-icon.gitignore
file-type-icon.pre-commit-config.yaml
file-type-iconCODEOWNERS
file-type-iconLICENSE.txt
file-type-iconREADME.md
file-type-iconterraform-cloud-enterprise-private-module-...

Browse the Repo

file-type-icon.circleci
file-type-iconexamples
file-type-iconconfluent-oss-ami
file-type-iconkafka-ami
file-type-iconconfig
file-type-iconssl
file-type-iconREADME.md
file-type-iconcheck-for-kafka-key-store.sh
file-type-iconconfigure-kafka-server.sh
file-type-iconkafka.json
file-type-iconkafka-zookeeper-confluent-oss-ami
file-type-iconkafka-zookeeper-confluent-oss-colocated-cl...
file-type-iconkafka-zookeeper-confluent-oss-standalone-c...
file-type-iconkafka-zookeeper-standalone-clusters
file-type-iconzookeeper-ami
file-type-iconmodules
file-type-icontest
file-type-icon.gitignore
file-type-icon.pre-commit-config.yaml
file-type-iconCODEOWNERS
file-type-iconLICENSE.txt
file-type-iconREADME.md
file-type-iconterraform-cloud-enterprise-private-module-...
Apache Kafka and Confluent Tools

Apache Kafka and Confluent Tools

Deploy a cluster of Kafka brokers. Optionally deploy Confluent tools such as Schema Registry, REST Proxy, and Kafka Connect.

Code Preview

Preview the Code

mobile file icon

README.md

down

Kafka Example AMI

This folder contains an example Packer template that can be used to create an Amazon Machine Image (AMI) with Kafka and all of its dependencies installed. A few notes about this Packer template:

  • It builds two AMIs, one on top of Amazon Linux and one on top of Ubuntu. Pick which ever distro you prefer.

  • This AMI includes an example of how to configure Kafka with SSL. It expects you to use the generate-key-stores module to generate a Key Store and Trust Store before building the AMI.

  • This AMI only includes Kafka. It does not include ZooKeeper, which is expected to be running in a separate cluster, with a separate AMI (see the zookeeper-ami example). For an example of Kafka and ZooKeeper co-located in the same cluster, see kafka-zookeeper-ami.

To deploy this AMI, see the kafka-zookeeper-standalone-clusters example.

Quick start

To build the AMI:

  1. Run the generate-key-stores module to create a Key Store, Trust Store, and self-signed SSL certificate. You can run the check-for-key-store.sh script to print out example usage for the generate-key-stores.sh script.
  2. Install Packer.
  3. Set up your AWS credentials as environment variables.
  4. Set the GITHUB_OAUTH_TOKEN environment variable to a valid GitHub auth token with "repo" access. You can generate one here: https://github.com/settings/tokens
  5. Run packer build -var "package_kafka_branch=<branch>" -only <target os> kafka.json to create a new AMI in your AWS account. Note down the ID of this new AMI.

To deploy the new AMI, plug its ID into the kafka-zookeeper-standalone-clusters example.

Questions? Ask away.

We're here to talk about our services, answer any questions, give advice, or just to chat.

Ready to hand off the Gruntwork?