Edit

Deploy a StarRocks Cluster on AWS by Using AWS CloudFormation

StarRocks supports integration with AWS CloudFormation since version 2.3.0. You can use AWS CloudFormation to quickly deploy and use StarRocks clusters on AWS.

AWS CloudFormation

AWS CloudFormation is provided by AWS to help you conveniently and fastly model and set up AWS resources and third-party resources, such as StarRocks clusters, so that you can spend less time managing resources and more time using them. You create a template that describes the resources you need, and AWS CloudFormation takes care of configuring those resources for you. For more information, see What is AWS CloudFormation?

Basic Concepts

Templates

Templates are JSON or YAML formatted text files that describe AWS resources and third-party resources, as well as the properties of those resources. For more information, see Templates.

Stacks

Stacks are used to create and manage the resources described in templates. You can create, update, and delete a set of resources by creating, updating, and deleting stacks. All resources in a stack are defined by a template. Suppose you have created a template that describes various resources. To configure these resources, you need to create a stack by submitting the template that you created, and AWS CloudFormation then configures all those resources for you. For more information, see Stacks.

Procedure

  1. Log in to the AWS CloudFormation console.

  2. Choose Create stack > With new resources (standard). With new resources (standard)

  3. Follow these steps to specify the template: specify the template

    1. Under Prerequisite - Prepare template, choose Template is ready.
    2. Under Specify template, choose Template source as Amazon S3 URL. And under Amazon S3 URL, enter the following address: https://cf-templates-1euv6e68138u2-us-east-1.s3.amazonaws.com/templates/starrocks.template.yaml

      Note: You can also set Template source to Upload a template file. Click Choose file to upload the starrocks.template.yaml file. You can download the starrocks.template.yaml file from the aws-cloudformation repository in the StarRocks project. . starrocks.template.yaml

    3. Click next.
  4. Specify the stack details, including the Stack name and Parameters. Click Next.

    1. Type a stack name in the Stack name field.

      The stack name is an identifier that helps you find a particular stack from a list of stacks. A stack name can contain only letters (case-sensitive), characters, and hyphens(-). It must start with a letter and can be up to 128 characters in length.

    2. Configure the following parameters.

      TypeParameterDescription
      Network configurationAvailability ZonesSelect an availability zone for deploying the StarRocks cluster. For more information, see Regions and Zones.
      EC2 configurationKey pair nameA key pair, consisting of a public key and a private key, is a set of security credentials that you use to prove your identity when you attempt to connect to an Amazon EC2 instance. For more information, see key pairs.Note: If you need to create a key pair, see Create key pairs.
      Environment configurationReference the latest Amazon Linux AMI in a CloudFormation templateThe ID of the latest Amazon Machine Image (AMI) with the 64-bit architecture (x86_64), which is used to launch an Amazon EC2 instance.Note: An AMI is a supported and maintained image provided by AWS. It provides the information required to launch an Amazon EC2 instance. For more information, see Amazon Machine Images.
      URL of download JDK 1.8The URL from which you can download JDK 1.8.
      URL of StarRocksThe URL from which you can download the StarRocks binary package.
      StarRocks Cluster configurationNumber of StarRocks FeThe number of FEs. Default value: 1. Valid values: 1 and 3.
      Fe instance typeThe instance type of the Amazon EC2 to which a FE node belongs. Default value: t2.micro. For more information about instance types, see Amazon EC2 Instance Types.
      Number of StarRocks BeThe number of BEs. Default value: 3. Valid values: 3 and 6.
      Be instance typeThe instance type of the Amazon EC2 to which the BE nodes belong. Default value: t2.micro. For more information about instance types, see Amazon EC2 Instance Types.
      Fe configurationDir to save fe logThe path of the FE log file. Only absolute paths are allowed.
      Sys Log LevelThe logging level of FE. Default level: INFO. Valid levels: INFO, WARN, ERROR and FATAL.
      Meta data dirThe path of the FE metadata file. The value of this parameter must be an absolute path. The default value is feDefaultMetaPath, which means to use /home/starrocks/StarRocks/fe/meta.
      BE configurationDir to save be sys logThe path of the log file on each BE. The value of this parameter must be an absolute path.
      Sys Log LevelThe log level of each BE. Default level: INFO. Valid levels: INFO, WARN, ERROR and FATAL.
      Volume type of Be nodesThe type of the Amazon EBS volume attached to the Amazon EC2 instances to which each BE belongs. An Amazon EBS volume is a block-level storage device that you can attach to Amazon EC2 instances. For more information, see Amazon EBS volumes.
      Volume size of Be nodesThe storage capacity of EBS volumes that BE nodes use to store data. Unit: GB.
  5. Configure more options about the stack. For more information, see Setting AWS CloudFormation stack options.

    After the configuration is completed, click Next.

  6. Review the stack information you entered, including the template, details, and more options. You can also estimate the cost of your stack. For more information, see Reviewing your stack and estimating stack cost on the AWS CloudFormation console.

    Note: If you need to change any of the parameters, click Edit on the top right corner of the related section to go back to the relevant page.

  7. Select the following two check boxes and click Create stack. Create stack