AWSTemplateFormatVersion: '2010-09-09' Description: This CloudFormation template performs all the necessary steps of creating a VPC, subnet, and security groups; deploying a MemSQL cluster; and configuring the Studio environment with your cluster's information. This creates a MemSQL cluster running memsql-server 6.7.8-a5a87c0575 and memsql-studio 1.5.0. (qs-1po30j033) Parameters: AggInstanceType: Default: m4.2xlarge Type: String Description: 'EC2 instance type for master aggregator and child aggregators. AWS Instance type information: https://aws.amazon.com/ec2/instance-types' AllowedValues: - m4.xlarge - m4.2xlarge - m5.xlarge - m5.2xlarge - r4.xlarge - r4.2xlarge - r5.xlarge - r5.2xlarge LeafInstanceType: Default: m4.2xlarge Type: String Description: EC2 instance type for leaves AllowedValues: - m4.xlarge - m4.2xlarge - m4.4xlarge - m5.xlarge - m5.2xlarge - m5.4xlarge - r4.xlarge - r4.2xlarge - r4.4xlarge - r5.xlarge - r5.2xlarge - r5.4xlarge AvailabilityZone: Description: List of Availability Zones to use for the subnets in the VPC. Three Availability Zones are used for this deployment, and the logical order of your selections is preserved. Type: AWS::EC2::AvailabilityZone::Name NumAggregators: Default: 1 MinValue: 0 Type: Number Description: Number of child aggregators in the cluster (between 0 and 3). Separately, the master aggregator will automatically be created MaxValue: 3 License: AllowedPattern: .+ Type: String NoEcho: true Description: A license you received from the MemSQL Customer Portal ConstraintDescription: Must provide a MemSQL license from the MemSQL Customer Portal at https://portal.memsql.com. EnableHighAvailability: Default: 'true' Type: String Description: 'You should only specify an even number of leaves if enabled as an extra leaf will not be utilized. Learn more about High Availability: https://docs.memsql.com/operational-manual/v6.5/managing-high-availability/' AllowedValues: - 'true' - 'false' NumLeaves: Default: 2 MinValue: 1 Type: Number Description: Number of leaves in the cluster (between 1 and 6) MaxValue: 6 VPCCIDR: AllowedPattern: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$ ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28 Default: 10.0.0.0/16 Description: CIDR block for the VPC Type: String RootPassword: AllowedPattern: .+ Type: String NoEcho: true Description: Provide a MemSQL root password that will be set for all the nodes in your cluster ConstraintDescription: Must provide a MemSQL root password RemoteAccessCIDR: AllowedPattern: (\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})/(\d{1,2}) Default: '0.0.0.0/0' Type: String Description: IP CIDR range that is allowed to access the nodes (including SSH access, connecting to MemSQL on port 3306, viewing MemSQL studio). ConstraintDescription: CIDR range must be in the form x.x.x.x/x KeyPairName: Type: AWS::EC2::KeyPair::KeyName Description: The EC2 Key Pair to allow SSH access to the nodes. PublicSubnetCIDR: AllowedPattern: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$ ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28 Default: 10.0.32.0/24 Description: CIDR Range used in the Public Subnet located in AvailabilityZone 1 Type: String QSS3BucketName: AllowedPattern: ^[0-9a-zA-Z]+([0-9a-zA-Z-]*[0-9a-zA-Z])*$ ConstraintDescription: Quick Start bucket name can include numbers, lowercase letters, uppercase letters, and hyphens (-). It cannot start or end with a hyphen (-). Default: aws-quickstart Description: S3 bucket name for the Quick Start assets. This string can include numbers, lowercase letters, uppercase letters, and hyphens (-). It cannot start or end with a hyphen (-). Type: String QSS3KeyPrefix: AllowedPattern: ^[0-9a-zA-Z-/]*$ ConstraintDescription: Quick Start key prefix can include numbers, lowercase letters, uppercase letters, hyphens (-), and forward slash (/). Default: quickstart-memsql/ Description: S3 key prefix for the Quick Start assets. Quick Start key prefix can include numbers, lowercase letters, uppercase letters, hyphens (-), and forward slash (/). Type: String Metadata: AWS::CloudFormation::Interface: ParameterGroups: - Parameters: - KeyPairName - License - RootPassword Label: default: Basic Setup (Required) - Parameters: - AggInstanceType - NumAggregators - LeafInstanceType - NumLeaves - EnableHighAvailability - AvailabilityZone - RemoteAccessCIDR Label: default: Advanced Configuration - Parameters: - VPCCIDR - PublicSubnetCIDR Label: default: Network Configuration - Parameters: - QSS3BucketName - QSS3KeyPrefix Label: default: AWS Quick Start configuration ParameterLabels: LeafInstanceType: default: Leaf Instance Type AvailabilityZone: default: Availability Zone NumAggregators: default: Number of Child Aggregators License: default: License EnableHighAvailability: default: Enable High Availability NumLeaves: default: Number of Leaves RootPassword: default: MemSQL Password KeyPairName: default: Key pair name RemoteAccessCIDR: default: CIDR Range for Remote Access AggInstanceType: default: Aggregator Instance Type QSS3BucketName: default: Quick Start S3 bucket name QSS3KeyPrefix: default: Quick Start S3 key prefix PublicSubnetCIDR: default: Public subnet CIDR VPCCIDR: default: VPC CIDR Resources: VPCStack: Type: AWS::CloudFormation::Stack Properties: TemplateURL: !Sub 'https://${QSS3BucketName}.s3.amazonaws.com/${QSS3KeyPrefix}templates/memsql-custom-vpc.template.yaml' Parameters: AvailabilityZone: !Ref AvailabilityZone VPCCIDR: !Ref VPCCIDR PublicSubnet1CIDR: !Ref PublicSubnetCIDR RemoteAccessCIDR: !Ref RemoteAccessCIDR MemsqlStack: Type: AWS::CloudFormation::Stack Properties: TemplateURL: !Sub 'https://${QSS3BucketName}.s3.amazonaws.com/${QSS3KeyPrefix}templates/memsql.template.yaml' Parameters: PublicSubnetID: !GetAtt - VPCStack - Outputs.PublicSubnet1ID LeafInstanceType: !Ref LeafInstanceType AggInstanceType: !Ref AggInstanceType NumAggregators: !Ref NumAggregators License: !Ref License EnableHighAvailability: !Ref EnableHighAvailability NumLeaves: !Ref NumLeaves VPCID: !GetAtt - VPCStack - Outputs.VPCID RootPassword: !Ref RootPassword KeyPairName: !Ref KeyPairName SecurityGroups: !GetAtt - VPCStack - Outputs.MemSQLAccessSG