Skip to main content

Background

The AutoMQ BYOC Console (versions prior to 8.0) was distributed through cloud provider marketplaces and installed via AMI images. Starting from version 8.0, the AutoMQ BYOC Console is distributed and installed via Docker images. New users and new environments are recommended to follow the Install BYOC Console documentation for installation. This document describes how to smoothly upgrade existing BYOC environments from earlier versions to version 8.x.

Constraints

  • Cloud Provider: Currently, only AWS environments support the upgrade to version 8.x. Support for other cloud providers is in progress. If you have requirements for other clouds, please contact us by referring to the “Contact Us” documentation.
  • No AWS Managed Service for Prometheus: Confirm that your current environment is not using the AWS Managed Service for Prometheus. If it is, please contact AutoMQ technical personnel to discuss an appropriate solution.

Upgrade Steps

The overall process is divided into the following steps: Register an AutoMQ account, confirm deployment information, obtain the upgrade command, stop the old console, configure IAM permissions, and execute the upgrade.

1. Register an Organization and Account

Go to the AutoMQ official website to register an organization and account. The registration URL is: https://console.automq.cloud/.

2. Confirm Deployment Information

Confirm the deployment information of your current BYOC console and send it to AutoMQ technical personnel. This information is used to migrate environment metadata and generate the installation command. The information to be collected includes:
  • Environment ID
  • Deployment Region
  • Deployment Version
  • Installation ID
  • OpsBucket
It is recommended to log in to the AutoMQ console and navigate to the settings page to view this information. You also need to provide your newly registered AutoMQ Organization ID to the AutoMQ technical personnel.

3. Obtain the Upgrade Command

AutoMQ technical personnel will generate the environment’s metadata and an upgrade installation command based on the information from Step 2, which will be used for the subsequent upgrade.

4. Stop the Old Console

Log in to the EC2 instance where the AutoMQ console is located and stop the current console application. The command to stop the service is as follows:
sudo systemctl stop cmp.service

5. Modify EC2 Metadata Access Limit (Optional)

The AutoMQ 8.x console is deployed using Docker containers. Programs inside the container need to access the EC2 instance metadata service, and by default, the installation command uses Host network mode. If you prefer to use Bridge or other network modes, you must set the EC2 instance metadata response hop limit (HttpPutResponseHopLimit) to 2. The procedure is as follows:
  1. Log in to the AWS EC2 Console.
  2. In the instances list, select the EC2 instance hosting the AutoMQ console.
  3. Select Actions > Instance Settings > Modify instance metadata options.
  4. In the dialog box, change the value of Metadata response hop limit from 1 to 2.
  5. Click Save.

6. Create and Configure IAM Role

Go to the AWS IAM console (https://us-east-1.console.aws.amazon.com/iam/home?region=us-east-1#/roles) to create a new IAM Role for the AutoMQ console and grant the necessary cloud resource operation permissions. Starting from version 8.x, the AutoMQ console requires permissions to create IAM Roles for the data plane clusters. This means the console will manage the IAM permissions and roles required for each data plane cluster to operate. The procedure is as follows: Go to the IAM console to create a custom IAM Policy, then create an IAM Role, select EC2 as the service type, and attach the newly created IAM Policy. Next, go to the EC2 console to modify the EC2 instance where the console is located and change its attached IAM Role.
  • Example AWS Policy
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "autoscaling:AttachInstances",
        "autoscaling:DeleteAutoScalingGroup",
        "autoscaling:DetachInstances",
        "autoscaling:ResumeProcesses",
        "autoscaling:SuspendProcesses",
        "autoscaling:UpdateAutoScalingGroup",
        "ec2:AttachVolume",
        "ec2:AuthorizeSecurityGroupEgress",
        "ec2:AuthorizeSecurityGroupIngress",
        "ec2:DeleteKeyPair",
        "ec2:DeleteSecurityGroup",
        "ec2:DeleteVolume",
        "ec2:DetachVolume",
        "ec2:RebootInstances",
        "ec2:StopInstances",
        "ec2:TerminateInstances"
      ],
      "Resource": "*",
      "Condition": {
        "StringEquals": {
          "aws:ResourceTag/automqVendor": "automq"
        }
      }
    },
    {
      "Effect": "Allow",
      "Action": "iam:PassRole",
      "Resource": "*",
      "Condition": {
        "StringLike": {
          "iam:PassedToService": "ec2.amazonaws.com*"
        }
      }
    },
    {
      "Effect": "Allow",
      "Action": [
        "s3:GetBucketPolicy",
        "s3:GetLifecycleConfiguration",
        "s3:ListBucket",
        "s3:PutBucketPolicy",
        "s3:PutBucketTagging",
        "s3:PutLifecycleConfiguration"
      ],
      "Resource": "arn:aws:s3:::{Replace with your truly OpsBucket}"
    },
    {
      "Effect": "Allow",
      "Action": [
        "s3:DeleteObject",
        "s3:GetObject",
        "s3:PutObject"
      ],
      "Resource": "arn:aws:s3:::{Replace with your truly OpsBucket}/*"
    },
    {
      "Effect": "Allow",
      "Action": [
        "autoscaling:CreateAutoScalingGroup",
        "autoscaling:DescribeAutoScalingGroups",
        "ec2:CreateKeyPair",
        "ec2:CreateLaunchTemplate",
        "ec2:CreateLaunchTemplateVersion",
        "ec2:CreateSecurityGroup",
        "ec2:CreateTags",
        "ec2:CreateVolume",
        "ec2:DeleteLaunchTemplate",
        "ec2:DescribeAvailabilityZones",
        "ec2:DescribeImages",
        "ec2:DescribeInstanceAttribute",
        "ec2:DescribeInstanceTypeOfferings",
        "ec2:DescribeInstances",
        "ec2:DescribeKeyPairs",
        "ec2:DescribeLaunchTemplateVersions",
        "ec2:DescribeLaunchTemplates",
        "ec2:DescribeRouteTables",
        "ec2:DescribeSecurityGroupRules",
        "ec2:DescribeSecurityGroups",
        "ec2:DescribeSubnets",
        "ec2:DescribeTags",
        "ec2:DescribeVolumes",
        "ec2:DescribeVpcEndpoints",
        "ec2:DescribeVpcs",
        "ec2:ModifyLaunchTemplate",
        "ec2:RunInstances",
        "eks:DescribeAccessEntry",
        "eks:DescribeCluster",
        "eks:DescribeNodegroup",
        "eks:ListAccessEntries",
        "eks:ListAssociatedAccessPolicies",
        "eks:ListClusters",
        "eks:ListNodegroups",
        "elasticloadbalancing:DescribeTargetGroups",
        "iam:AddRoleToInstanceProfile",
        "iam:AttachRolePolicy",
        "iam:CreateInstanceProfile",
        "iam:CreatePolicy",
        "iam:CreatePolicyVersion",
        "iam:CreateRole",
        "iam:DeleteInstanceProfile",
        "iam:DeletePolicy",
        "iam:DeletePolicyVersion",
        "iam:DeleteRole",
        "iam:DetachRolePolicy",
        "iam:GetAccessKeyLastUsed",
        "iam:GetInstanceProfile",
        "iam:GetOpenIdConnectProvider",
        "iam:GetPolicy",
        "iam:GetPolicyVersion",
        "iam:GetRole",
        "iam:GetRolePolicy",
        "iam:GetUser",
        "iam:GetUserPolicy",
        "iam:ListAttachedRolePolicies",
        "iam:ListAttachedUserPolicies",
        "iam:ListInstanceProfilesForRole",
        "iam:ListOpenIDConnectProviders",
        "iam:ListPolicyVersions",
        "iam:ListRolePolicies",
        "iam:ListRoles",
        "iam:ListUserPolicies",
        "iam:RemoveRoleFromInstanceProfile",
        "pricing:DescribeServices",
        "pricing:GetAttributeValues",
        "pricing:GetProducts",
        "route53:ChangeResourceRecordSets",
        "route53:CreateHostedZone",
        "route53:DeleteHostedZone",
        "route53:GetHostedZone",
        "route53:ListHostedZones",
        "route53:ListHostedZonesByName",
        "route53:ListHostedZonesByVpc",
        "route53:ListResourceRecordSets",
        "s3:AbortMultipartUpload",
        "s3:CreateBucket",
        "s3:DeleteBucket",
        "s3:DeleteObject",
        "s3:ListAllMyBuckets",
        "s3:ListBucket",
        "s3:ListBucketMultipartUploads",
        "s3:PutBucketTagging",
        "ssm:GetParameters"
      ],
      "Resource": "*"
    },
    {
      "Effect": "Allow",
      "Action": "iam:CreateServiceLinkedRole",
      "Resource": "*",
      "Condition": {
        "StringEquals": {
          "iam:AWSServiceName": "autoscaling.amazonaws.com"
        }
      }
    }
  ]
}

7. Install Docker and Start the AutoMQ Console

Before executing the upgrade command, please ensure that Docker is installed and running in your environment.
# Install docker
sudo yum install docker -y

# Start docker service
sudo systemctl start docker

# Enable docker to start on boot
sudo systemctl enable docker
Copy the upgrade installation command from Step 3 to start the new version of the AutoMQ console. An example of the Docker run command is as follows:
sudo docker run -d -v /home/admin:/root \
  -p 8080:8080 \
  -e CLOUD_PROVIDER=aws \
  -e REGION=ap-northeast-1 \
  -e OPS_BUCKET=automq-ops-xxxx \
  -e CONSOLE_INITIAL_USER=admin \
  -e CONSOLE_INITIAL_PASSWORD=admin \
  -e CLIENT_ID=env-xxxx \
  -e CLIENT_SECRET=xxx \
  xxx/automq/automq_byoc_console:xxxx
After observing that the Docker container is running correctly and that port 8080 is accessible, you can access the AutoMQ console service via a web browser.

8. Copy the Installation ID and Update the License

Because version 8.x changes the installation media and startup method, the installation ID for the new version will be different. After logging into the new console, a “License invalid” prompt will appear. Copy the installation ID displayed on the console page and contact AutoMQ technical personnel to update the information. You will then be able to access the new version of the console.
Note: During the upgrade process, if the console displays a “License invalid” message, this will not affect the normal operation of the cluster. You simply need to contact AutoMQ technical personnel and provide the new installation ID to activate the license.