Overview
To use the AutoMQ Cloud BYOC environment on AWS, you first need to install the AutoMQ console. The console is a web application deployed in your account that you will use to create, manage, and monitor your AutoMQ clusters.
Prerequisites
Before you begin installing the AutoMQ console, please ensure that you have prepared the basic AWS cloud resources as required.
- VPC Environment: The AutoMQ console and clusters need to run in your own VPC, typically the same VPC where your Kafka applications are deployed.
Steps
Step 1: Register Your Environment on the AutoMQ Website
First, you need to register your deployment environment on the AutoMQ official website to obtain the metadata for environment installation.
- Visit AutoMQ Cloud and log in to your account.
- On the console page, click Create Environment.
- Follow the wizard to enter the following information:
- Environment Name: Set a custom name for your environment.
- Description: Enter a description for the environment.
- Cloud Provider: Select AWS.
- Region: Select the AWS region where you plan to deploy AutoMQ.
- After creation, you will receive the environment metadata for deployment.
Step 2: Prepare and Deploy the Console EC2 Instance
The AutoMQ console is the core component for managing the AutoMQ Cloud BYOC environment, and it is deployed on a standalone EC2 instance. Therefore, you need to prepare this EC2 instance before installation.
Basic Requirements
To ensure the stable operation of the console, the EC2 instance you prepare needs to meet the following basic requirements:
- Instance Specifications:
- Configuration: At least a 2-core CPU and 8 GB of memory.
- System Volume: At least 20 GiB of storage space.
- Data Volume: An additional data volume of at least 20 GiB must be mounted to store metadata.
Important Note: To prevent metadata loss from the console due to EC2 instance migration or failure, it is crucial to mount an additional data volume to the EC2 instance for the AutoMQ console and store the metadata on this volume.
-
Network Location:
- The EC2 instance must be located in the same VPC as the AutoMQ cluster that will be deployed later.
- Typically, this VPC should also be the same as the one where your application services are located to ensure network connectivity.
-
Public Access:
- The EC2 instance must have internet access to download installation packages and synchronize necessary metadata. You can achieve this by associating an Elastic IP (EIP) or by configuring a NAT gateway.
Creation and Deployment Steps
-
Log in to the AWS EC2 console and click Launch instances.
-
Operating System (AMI): Choose a Linux distribution you are familiar with, such as Amazon Linux 2023 or Ubuntu.
-
Instance Type: Select an instance type that meets the above specifications (e.g.,
t3.large or higher).
-
Network Settings:
- Select the target VPC and a public subnet (if using an EIP) or a private subnet (if using a NAT gateway).
- Ensure the security group opens necessary ports, such as SSH (22) for management access and the console’s service port (default 8080). You can set the source to
0.0.0.0/0 (allowing all IP access, suitable for test environments) or restrict it to a specific IP range.
-
Storage (Volumes):
- Configure the root volume size to at least 20 GiB.
- Click Add new volume to add an additional data volume, ensuring its size is not less than 20 GiB.
-
Complete the remaining configurations and launch the instance.
-
Mount the Data Volume:
- After the instance starts, log in to it.
- Mount the additional data volume to a specified directory (e.g.,
/data). This path will be used as the data mount path when starting the Docker container.
- Ensure the mount point has the correct permissions.
-
Install and Start Docker Service:
- Install Docker on the EC2 instance. The following are reference commands for Amazon Linux 2023:
# Update packages
sudo dnf update -y
# Install Docker
sudo dnf install docker -y
# Start the Docker service
sudo systemctl start docker
# Add the current user to the docker group to run docker commands without sudo
sudo usermod -aG docker ec2-user
# Enable the Docker service to start on boot
sudo systemctl enable docker
# Verify Docker installation
docker version
- Note: If you are using another Linux distribution (like Amazon Linux 2), please refer to the official Docker documentation or use the appropriate package manager for installation.
-
Deploy the AutoMQ Console
- Once the EC2 instance is ready, you can copy the installation command from the installation wizard to start the AutoMQ console.
After the AutoMQ console starts successfully, you need to log in to the console. On your first visit, you will need to grant it the necessary permissions to operate AWS cloud resources.
-
Log in to the Console
- Access
http://<Your EC2 Public IP>:8080 in your browser.
- Log in with the initial username and password.
-
Grant IAM Permissions to the Console
After logging in, the interface will guide you to complete IAM authorization for the AutoMQ console. This is to allow the console to have permission to create and manage cluster resources in your AWS account. The process is as follows:
-
Create an IAM Policy:
- Go to the AWS IAM console and create a new customer-managed policy based on the policy JSON provided in the console interface.
-
Create an IAM Role:
- Create a new IAM Role.
- When selecting the trusted entity, choose AWS service and EC2.
- Attach the IAM Policy created in the previous step to this Role.
-
Associate the IAM Role with the EC2 Instance:
- Go to the AWS EC2 console and find the EC2 instance you are using to deploy the console.
- In Actions -> Security -> Modify IAM role, associate the IAM Role created in the previous step with this instance.
-
Complete Initialization
- Return to the AutoMQ console page and click Confirm Authorization or Next.
- The console will automatically verify if the permissions are configured correctly. Once verified, you can officially enter the AutoMQ console and start creating your first cluster.
Next Steps
- Use AutoMQ via WebUI: Continue to create instances through the environment console and experience the product features. Experience AutoMQ▸
- Use AutoMQ via Terraform: After installing the console, users can manage and use AutoMQ through the AutoMQ Terraform Provider. For using AutoMQ via Terraform, please refer to the documentation.