This document outlines how to deploy a multi-node AutoMQ cluster on a Linux host (utilizing object storage services from cloud vendors or S3-compatible storage software). In this development environment, users can test cluster-related features such as partition reassignment and automatic data balancing. In addition to the Linux host deployment plan, users can refer to the following documents to explore other deployment options: Moreover, if you want to completely eliminate the installation and deployment effort, you can try the fully managed cloud services provided by the AutoMQ team through the link below. Currently, all cloud markets offer a free 2-week trial.Documentation Index
Fetch the complete documentation index at: https://docs.automq.com/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
This documentation example is intended to deploy a 5-node AutoMQ cluster, where 3 nodes run both the Controller and Broker, and the remaining 2 nodes run only the Broker. Ensure the following prerequisites:-
Five Linux hosts, preferably network-optimized virtual machines with 4 CPUs and 16GB of RAM, for deploying the AutoMQ cluster. Make sure the system disk storage space is at least 20GB, and data volume disk space is no less than 20GB (required only for deploying Controller nodes). An example is as follows:
Role IP Node ID System Volume Metadata Volume Controller + Broker 192.168.0.1 0 EBS 20GB EBS 20GB Controller + Broker 192.168.0.2 1 EBS 20GB EBS 20GB Controller + Broker 192.168.0.3 2 EBS 20GB EBS 20GB Broker 192.168.0.4 1000 EBS 20GB Not applicable Broker 192.168.0.5 1001 EBS 20GB Not applicable - Download the binary installation package to set up AutoMQ. Refer to Software Artifact▸.
- Create two custom-named object storage buckets, such as automq-data and automq-ops, as used in this document.
- Create an IAM user and generate an Access Key ID and Access Key Secret for it. Then, ensure that the IAM user has full read and write permissions to the previously created object storage bucket.
- Install jemalloc to optimize memory allocation. Refer to Getting-started.
Install and Launch the AutoMQ Cluster
Step 1: Create a Cluster Deployment Project
AutoMQ provides theautomq-cli.sh tool for managing AutoMQ clusters. By using the command automq-cli.sh cluster create [project], a cluster configuration template will be automatically created in the directory clusters/[project]/topo.yaml.
Step 2: Edit the Cluster Configuration Template
Edit the configuration template generated in Step 1 during cluster creation. An example of the configuration template is as follows:-
global.clusterId: A randomly generated unique ID, which does not require modification. -
global.config: This is the custom incremental configuration for all nodes within the cluster. You need to specify actual values fors3.data.buckets,s3.ops.buckets, ands3.wal.path. Additional configuration items can be added with line breaks. For details on configuring object storage parameters for different cloud providers, refer to Object Storage Configuration▸. -
global.envs: These are the environment variables for the node. ReplaceKAFKA_S3_ACCESS_KEYandKAFKA_S3_SECRET_KEYwith actual values. -
controllers: This is a list of Controller nodes that must be updated with actual values. -
brokers: This is a list of Broker nodes that also need to be updated with actual values.
Step 3: Start AutoMQ
Execute the cluster pre-check command to generate the final startup command.Test Message Sending and Receiving
After installing and starting the AutoMQ cluster, you can test message sending, consumption, and other functionalities by executing the Kafka CLI commands available in the bin directory of the installation package.- Execute the following command to run kafka-topics.sh and create a Topic.
- Execute the following command to run kafka-console-producer.sh and send test messages.
- Execute the following command to run kafka-console-consumer.sh and consume test messages.
Stop and Uninstall the AutoMQ Cluster.
After completing the tests, you can refer to the following steps to stop and uninstall the AutoMQ cluster.- Run the following command on each node to terminate the process.
-
You can automatically clear data in
s3-data-bucketands3-ops-bucketby setting lifecycle rules for object storage, and then remove these buckets. - Delete the created compute instances along with their respective system volumes and data volumes.
- Remove the IAM user set up for testing along with its Access Key ID and Access Key Secret.