Skip to Main Content

Deploy to HuaWei Cloud CCE

参考 Overview▸, AutoMQ supports deployment on Kubernetes. This article outlines the installation process for deploying AutoMQ on the Huawei Cloud CCE platform.

In this article, AutoMQ Product Service Provider, AutoMQ Service Provider, and AutoMQ specifically refer to AutoMQ HK Limited and its subsidiaries.

Prerequisites: Prepare VPC

The AutoMQ BYOC environment is deployed within the user's VPC to ensure data privacy and security. Before installing the AutoMQ environment, you need to prepare an available VPC. The VPC needs to meet the following conditions:

  • Zone Requirements: Based on business needs, if you need to create instances across three availability zones, you must allocate at least three availability zones and subnets.

  • Subnet CIDR Requirements: AutoMQ data plane clusters use the user's VPC for deployment, which will consume the IPs of the VPC subnets. It is recommended to allocate a sufficient number of available IPs in each subnet (suggested to be no less than 1000 available IPs per subnet) to avoid issues with deployment and expansion of clusters in the future.

  • Public Network Access Requirements: Deploying the AutoMQ data plane cluster requires pulling Docker images and Helm Charts from a public network environment. Therefore, the VPC environment must support SNAT or other methods to access the public network.

Procedure

Step 1: Install the AutoMQ Environment Console

AutoMQ is available in the Huawei Cloud Marketplace, and users can refer to the Install Env via Huawei Marketplace▸ documentation to install the AutoMQ environment console.

Note:

When installing the environment console as mentioned above, Install Env via Huawei Marketplace▸ the cluster deployment type must be set to Kubernetes to support subsequent steps 2-4, which involve installing the AutoMQ cluster on CCE.

After installing AutoMQ, obtain the permission delegation used by AutoMQ from the RFS console output menu. This delegation will be used in Step 3 to create a node pool.

Step 2: Create a CCE Cluster

Refer to Overview▸, users need to create an independent CCE cluster in advance for AutoMQ. Users can access the Huawei Cloud CCE product console and follow the steps below, or use the Terraform template provided by AutoMQ for quick creation.

Method 1: Create a CCE Cluster Via CCE Console

  1. Log in to the Huawei Cloud CCE Console. Click Purchase Cluster.
  1. Select the cluster type as CCE Turbo and choose the billing mode and version according to the recommendations. It is recommended to choose a cluster size of 200-1000 nodes.

The network configuration needs to be set according to the following requirements:

  • Node subnet: Select a subnet with a sufficient IP range, recommended not less than /20, to avoid the inability to create machines later.

  • Container subnet and service subnet: Similarly, choose a subnet with sufficient IPs, recommended not less than /20, to avoid the inability to create Pods later.

  • Service forwarding mode: Make sure to select the IPVS mode.

When you proceed to the next step, it is recommended not to install the "Observability and Local Node DNS Acceleration plugins."

  1. Click on Create Cluster and wait a few minutes for the creation to complete.

  2. Once the cluster is created, go to the cluster details, Plugin Center, and install the CCE Cluster Elastic Engine Plugin.

For the elastic plugin deployment, select small scale to avoid occupying too many node resources.

  1. Go to the cluster's Configuration Center, Network Configuration Tab, and enable Pod Access Metadata. Confirm and submit.
  1. Go to the cluster's Configuration Center, Cluster Auto-scaling Tab, enable Elastic Shrinkage, and check Ignore CPU and Memory Pre-allocation for DaemonSet Containers. Confirm and submit.

Step 3: Create a CCE Node Pool and Delegate Authorization

Refer to Overview▸, users need to create a node pool that meets the requirements to deploy instances later. Follow the steps below to create a compliant node pool and complete the delegated authorization.

  1. Go to the CCE cluster details created in Step 1, click on the Node Management Menu, and Create Node Pool.
  1. Refer to the following documentation to set custom parameters and complete the node pool creation. For parameters not specified in the table, please use the default recommended values.

When creating a node pool, only single availability zone or three availability zones are supported. If a different number of availability zones is selected, instances cannot be created later.

Parameter Settings
Value Description
Node Pool Name
  • Description: Enter a distinguishable name according to the business semantics.
Node Type
  • Description: Specify the node pool's machine type, refer to the document Overview▸. Fill in the machine type.

Note: AutoMQ must run on the specified machine type VM. If a non-preset machine type is chosen when creating the node pool, the node pool cannot be used later.

Availability Zone
  • Description: Choose one or three availability zones based on the actual needs of the AutoMQ cluster.

Note:
AutoMQ requires the availability zones for subsequent cluster creation to be completely consistent with the node pool. Therefore, if a single availability zone AutoMQ cluster is needed, create a single availability zone node pool here; if a three availability zone AutoMQ cluster is needed, create a three availability zone node pool here. Mixing the two is not allowed.

Delegation Name
  • Description: The AutoMQ cluster needs to access OBS, network, and other cloud services, hence the node pool requires authorization for the aforementioned operations. During step 1 of installing the BYOC environment, the corresponding delegation will be created. Select to bind this delegation when creating the node pool. Deploy to Huawei Cloud CCE▸
  1. Bind the delegation information to the node pool. The delegation information comes from Step 1 Deploy to Huawei Cloud CCE▸ and the output parameters after installing the console.
  1. After the node pool is created, click on Elastic Scaling and enable the elastic scaling rules for the specified availability zone.

When setting the elastic scaling rules for the node pool, ensure the following two configurations are correct:

Number of nodes range: It is recommended to retain at least 1 node. The range should be reasonably assessed based on the subsequent AutoMQ cluster scale. If the setting is too small, it will result in insufficient nodes for deployment.

Specification selection: Make sure to enable all machine types that meet the conditions in all available zones.

  1. Click the scaling menu of the node pool to scale the initial node capacity. It is recommended to scale 1 node per availability zone.

Step 4: Enter the Environment Console and Configure the Kubernetes Cluster Information.

When entering the AutoMQ BYOC console for the first time, you need to configure the Kubernetes cluster information and Kubeconfig to use it normally. Follow the console's guidance page to fill in the CCE cluster ID and Kubeconfig created in Step 2 to complete the environment initialization.

  1. Copy the cluster ID of the GKE cluster created in Step 2.
  1. Find the Kubectl configuration menu and obtain the Kubeconfig configuration file.

Click on Kubectl configuration, set it to intranet access, and download the Kubeconfig configuration file.

Log in to the console, enter the cluster ID and Kubeconfig, and complete the initialization.