AWSTemplateFormatVersion: '2010-09-09' Description: 'Deploy an Aerospike Cluster into a new VPC (qs-1rpniq8qr)' Metadata: QuickStartDocumentation: EntrypointName: "Parameters for deploying into a new VPC" Order: Index a LintSpellExclude: - Aerospike - Linux - tags - EBS - sdg - aerospike - namespace - Namespace - configuration - .conf - Location - QSS3KeyPrefix - QSS3BucketRegion - QSS3BucketName AWS::CloudFormation::Interface: ParameterGroups: - Label: default: VPC network configuration Parameters: - AvailabilityZones - NumberOfAZs - VPCCIDR - PrivateSubnet1CIDR - PrivateSubnet2CIDR - PrivateSubnet3CIDR - PublicSubnet1CIDR - PublicSubnet2CIDR - PublicSubnet3CIDR - AccessCIDR - Tenancy - Label: default: Aerospike configuration Parameters: - KeyPairName - NumberOfInstances - Tenancy - EnableCloudWatch - InstanceType - EBS - NamespaceFile - FeatureKeyFile - Label: default: Enable monitoring stack Parameters: - MonitoringStack - Label: default: Linux bastion configuration Parameters: - BastionAMIOS - BastionInstanceType - NumBastionHosts - Label: default: AWS Quick Start configuration Parameters: - QSS3BucketName - QSS3KeyPrefix - QSS3BucketRegion ParameterLabels: AvailabilityZones: default: Availability Zones NumberOfAZs: default: Number of Availability Zones NumberOfInstances: default: Number of instances Tenancy: default: Tenancy EnableCloudWatch: default: Enable CloudWatch logging InstanceType: default: Instance type FeatureKeyFile: default: Feature key file NamespaceFile: default: "Namespace file" EBS: default: "EBS volume size" BastionAMIOS: default: Bastion AMI operating system BastionInstanceType: default: Bastion instance type NumBastionHosts: default: Number of bastion hosts KeyPairName: default: EC2 key pair PrivateSubnet1CIDR: default: Private subnet 1 CIDR PrivateSubnet2CIDR: default: Private subnet 2 CIDR PrivateSubnet3CIDR: default: Private subnet 3 CIDR PublicSubnet1CIDR: default: Public subnet 1 CIDR PublicSubnet2CIDR: default: Public subnet 2 CIDR PublicSubnet3CIDR: default: Public subnet 3 CIDR QSS3BucketName: default: Quick Start S3 bucket name QSS3KeyPrefix: default: Quick Start S3 key prefix QSS3BucketRegion: default: Quick Start S3 bucket Region AccessCIDR: default: Allowed bastion external access CIDR VPCCIDR: default: VPC CIDR MonitoringStack: default: Enable Monitoring stack Parameters: AvailabilityZones: Description: "Availability Zones to use for the VPC subnets. At least two Availability Zones are required." Type: List NumberOfAZs: Type: String AllowedValues: ["2", "3"] Default: "3" Description: Number of Availability Zones to use in the VPC. This number must match the number of Availability Zones you chose for the AvailabilityZones parameter. BastionInstanceType: Default: t3.micro Type: String Description: Type of EC2 instance for the bastion hosts. AllowedValues: - t2.nano - t2.micro - t2.small - t2.medium - t2.large - t3.micro - t3.small - t3.medium - t3.large - m3.large - m3.xlarge - m3.2xlarge - m4.large - m4.xlarge - m4.2xlarge - m4.4xlarge NumBastionHosts: AllowedValues: - '1' - '2' - '3' - '4' Default: '1' Description: Number of bastion hosts to create. Type: String BastionAMIOS: Default: Amazon-Linux2-HVM Description: Linux distribution for the AMI to be used for the bastion instances. Type: String KeyPairName: Description: Name of the key pair to be used to connect to your EC2 instances by using SSH. Type: AWS::EC2::KeyPair::KeyName PrivateSubnet1CIDR: 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])(\\/([0-9]|[1-2][0-9]|3[0-2]))$" Default: 10.0.0.0/19 Description: CIDR block for private subnet 1 located in Availability Zone 1. Type: String PrivateSubnet2CIDR: 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])(\\/([0-9]|[1-2][0-9]|3[0-2]))$" Default: 10.0.32.0/19 Description: CIDR block for private subnet 2 located in Availability Zone 2. Type: String PrivateSubnet3CIDR: 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])(\\/([0-9]|[1-2][0-9]|3[0-2]))$" Default: 10.0.64.0/19 Description: CIDR block for private subnet 3 located in Availability Zone 3. Type: String PublicSubnet1CIDR: 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])(\\/([0-9]|[1-2][0-9]|3[0-2]))$" Default: 10.0.128.0/20 Description: CIDR block for public DMZ subnet 1 located in Availability Zone 1. Type: String PublicSubnet2CIDR: 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])(\\/([0-9]|[1-2][0-9]|3[0-2]))$" Default: 10.0.144.0/20 Description: CIDR block for public DMZ subnet 2 located in Availability Zone 2. Type: String PublicSubnet3CIDR: 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])(\\/([0-9]|[1-2][0-9]|3[0-2]))$" Default: 10.0.160.0/20 Description: CIDR block for public DMZ subnet 3 located in Availability Zone 3. Type: String QSS3BucketName: AllowedPattern: "^[0-9a-zA-Z]+([0-9a-zA-Z-]*[0-9a-zA-Z])*$" ConstraintDescription: The 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: Name of the S3 bucket for your copy of the Quick Start assets. Keep the default name unless you are customizing the template. Changing the name updates code references to point to a new Quick Start location. This name can include numbers, lowercase letters, uppercase letters, and hyphens, but do not start or end with a hyphen (-). See https://aws-quickstart.github.io/option1.html. Type: String QSS3BucketRegion: Default: 'us-east-1' Description: 'AWS Region where the Quick Start S3 bucket (QSS3BucketName) is hosted. Keep the default Region unless you are customizing the template. Changing this Region updates code references to point to a new Quick Start location. When using your own bucket, specify the Region. See https://aws-quickstart.github.io/option1.html.' Type: String QSS3KeyPrefix: AllowedPattern: "^[0-9a-zA-Z-/]*$" ConstraintDescription: The Quick Start S3 key prefix can include numbers, lowercase letters, uppercase letters, hyphens (-), and forward slashes (/). The prefix should end with a forward slash (/). Default: quickstart-aerospike/ Description: S3 key prefix that is used to simulate a directory for your copy of the Quick Start assets. Keep the default prefix unless you are customizing the template. Changing this prefix updates code references to point to a new Quick Start location. This prefix can include numbers, lowercase letters, uppercase letters, hyphens (-), and forward slashes (/). End with a forward slash. See https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html and https://aws-quickstart.github.io/option1.html. Type: String 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])(\\/([0-9]|[1-2][0-9]|3[0-2]))$" 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 AccessCIDR: 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])(\\/([0-9]|[1-2][0-9]|3[0-2]))$" Description: "CIDR IP range permitted to access Aerospike. A value of 0.0.0.0/0 allows access from any IP address." Type: String Default: 0.0.0.0/0 Tenancy: Description: Tenancy of the Aerospike instances. Choose "dedicated" to change the host from shared (default). Type: String Default: default AllowedValues: - default - dedicated NumberOfInstances: Description: Number of instances to provision for the Aerospike cluster. Type: Number Default: '1' MinValue: '1' MaxValue: '15' EnableCloudWatch: Description: | Choose "yes" to enable CloudWatch logging for the Aerospike cluster, which adds basic Aerospike metrics to Amazon CloudWatch. This incurs CloudWatch expenses. Type: String Default: 'no' AllowedValues: - 'yes' - 'no' InstanceType: Description: Type of EC2 instance to deploy for the Aerospike cluster. Type: String Default: m5d.xlarge AllowedValues: - t2.micro - t2.small - t2.medium - t2.large - t3.micro - t3.small - t3.medium - t3.large - t3.xlarge - t3.2xlarge - m5.large - m5.xlarge - m5.2xlarge - m5.4xlarge - m5.8xlarge - m5.12xlarge - m5.24xlarge - m5.metal - m5d.large - m5d.xlarge - m5d.2xlarge - m5d.4xlarge - m5d.8xlarge - m5d.12xlarge - m5d.16xlarge - m5d.24xlarge - m5d.metal - c5.large - c5.xlarge - c5.2xlarge - c5.4xlarge - c5.9xlarge - c5.18xlarge - c5.24xlarge - c5.metal - c5d.large - c5d.xlarge - c5d.2xlarge - c5d.4xlarge - c5d.9xlarge - c5d.18xlarge - r5.large - r5.xlarge - r5.2xlarge - r5.4xlarge - r5.8xlarge - r5.12xlarge - r5.16xlarge - r5.24xlarge - r5.metal - r5d.large - r5d.xlarge - r5d.2xlarge - r5d.4xlarge - r5d.8xlarge - r5d.12xlarge - r5d.16xlarge - r5d.24xlarge - r5d.metal - i3.large - i3.xlarge - i3.2xlarge - i3.4xlarge - i3.8xlarge - i3.16xlarge - i3.metal - i3en.large - i3en.xlarge - i3en.2xlarge - i3en.3xlarge - i3en.6xlarge - i3en.12xlarge - i3en.24xlarge - i3en.metal EBS: Description: | Size of the EBS SSD volume in GB. The volume attaches under /dev/sdg. Limit of 16000. Enter 0 if you do not want to use EBS. Type: Number Default: '50' MinValue: '0' MaxValue: '16000' NamespaceFile: Description: | (Optional) Location of your namespace-definition file. Must be publically downloadable. Appends to aerospike.conf. Type: String Default: '' FeatureKeyFile: Description: Base64 encoding of the feature key file. This is the Aerospike key to use for this deployment. Keeping this blank works only for a single node cluster. Type: String Default: "" MonitoringStack: Type: String AllowedValues: [ "Prometheus + Grafana + asbench", "None" ] Default: "Prometheus + Grafana + asbench" Description: "Enable monitoring stack (prometheus and grafana) and asbench." Conditions: UsingDefaultBucket: !Equals [!Ref QSS3BucketName, 'aws-quickstart'] 3AZDeployment: !Equals [!Ref NumberOfAZs, "3"] TrialLicense: !Equals [!Ref FeatureKeyFile, ''] MonitoringStackEnabled: !Equals [!Ref MonitoringStack, "Prometheus + Grafana + asbench"] Resources: VPCStack: Type: AWS::CloudFormation::Stack Metadata: cfn-lint: { config: { ignore_checks: [ W9901 ] } } Properties: TemplateURL: !Sub - 'https://${S3Bucket}.s3.${S3Region}.${AWS::URLSuffix}/${QSS3KeyPrefix}submodules/quickstart-aws-vpc/templates/aws-vpc.template.yaml' - S3Region: !If [UsingDefaultBucket, !Ref 'AWS::Region', !Ref QSS3BucketRegion] S3Bucket: !If [UsingDefaultBucket, !Sub '${QSS3BucketName}-${AWS::Region}', !Ref QSS3BucketName] Parameters: AvailabilityZones: !Join [ ',', !Ref 'AvailabilityZones' ] NumberOfAZs: !Ref 'NumberOfAZs' PrivateSubnet1ACIDR: !Ref 'PrivateSubnet1CIDR' PrivateSubnet2ACIDR: !Ref 'PrivateSubnet2CIDR' PrivateSubnet3ACIDR: !Ref 'PrivateSubnet3CIDR' PublicSubnet1CIDR: !Ref 'PublicSubnet1CIDR' PublicSubnet2CIDR: !Ref 'PublicSubnet2CIDR' PublicSubnet3CIDR: !Ref 'PublicSubnet3CIDR' VPCCIDR: !Ref 'VPCCIDR' AerospikeServerStack: Type: 'AWS::CloudFormation::Stack' Properties: TemplateURL: !Sub - 'https://${S3Bucket}.s3.${S3Region}.${AWS::URLSuffix}/${QSS3KeyPrefix}templates/aerospike-cluster-workload.template.yaml' - S3Region: !If [UsingDefaultBucket, !Ref 'AWS::Region', !Ref QSS3BucketRegion] S3Bucket: !If [UsingDefaultBucket, !Sub '${QSS3BucketName}-${AWS::Region}', !Ref QSS3BucketName] Parameters: VPCCIDR: !Ref VPCCIDR VPCID: !GetAtt VPCStack.Outputs.VPCID KeyPairName: !Ref KeyPairName InstanceType: !Ref InstanceType Tenancy: !Ref Tenancy NumberOfInstances: !Ref NumberOfInstances EnableCloudWatch: !Ref EnableCloudWatch EBS: !Ref EBS NamespaceFile: !Ref NamespaceFile FeatureKeyFile: !If [ TrialLicense, "IyBnZW5lcmF0ZWQgMjAyMS0wMy0xMCAwNDowNDoyOAoKZmVhdHVyZS1rZXktdmVyc2lvbiAgICAgICAgICAgICAgICAgIDIKc2VyaWFsLW51bWJlciAgICAgICAgICAgICAgICAgICAgICAgIDU2ODk1MzA1OAoKYWNjb3VudC1uYW1lICAgICAgICAgICAgICAgICAgICAgRXZhbHVhdGlvbl9MaWNlbnNlCgphY2NvdW50LUlEICAgICAgICAgICAgICAgICAgICAgICBBZXJvc3Bpa2VfXzQzNTcxMTM3NAoKYXNkYi1jaGFuZ2Utbm90aWZpY2F0aW9uICAgICAgICAgdHJ1ZQphc2RiLWNsdXN0ZXItbm9kZXMtbGltaXQgICAgICAgICAxCmFzZGItY29tcHJlc3Npb24gICAgICAgICAgICAgICAgIHRydWUKYXNkYi1lbmNyeXB0aW9uLWF0LXJlc3QgICAgICAgICAgdHJ1ZQphc2RiLWxkYXAgICAgICAgICAgICAgICAgICAgICAgICB0cnVlCmFzZGItcG1lbSAgICAgICAgICAgICAgICAgICAgICAgIHRydWUKYXNkYi1zdHJvbmctY29uc2lzdGVuY3kgICAgICAgICAgdHJ1ZQptZXNnLWptcy1jb25uZWN0b3IgICAgICAgICAgICAgICB0cnVlCm1lc2cta2Fma2EtY29ubmVjdG9yICAgICAgICAgICAgIHRydWUKcHJlc3RvLWNvbm5lY3RvciAgICAgICAgICAgICAgICAgdHJ1ZQpyYWYtcmVhbHRpbWUtYW5hbHlzaXMtZnJhbWV3b3JrICB0cnVlCgotLS0tLSBTSUdOQVRVUkUgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCk1FVUNJRXhGN3VSYzBZdURvb3J6ZkNUR2NhdGgrQVB6U0doUi94M21pN0RuRFB6a0FpRUF1cjkzRVcwb2tlNVoKUWZ5c1l4dzZCb0tKRUI1STVlV2xXdDU2UzlxeGNySWsKLS0tLS0gRU5EIE9GIFNJR05BVFVSRSAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQo=", !Ref FeatureKeyFile ] QSS3BucketName: !Ref QSS3BucketName QSS3BucketRegion: !Ref QSS3BucketRegion AccessCIDR: !Ref AccessCIDR PublicSubnet1ID: !GetAtt VPCStack.Outputs.PublicSubnet1ID PublicSubnet2ID: !GetAtt VPCStack.Outputs.PublicSubnet2ID PrivateSubnet1ID: !GetAtt VPCStack.Outputs.PrivateSubnet1AID PrivateSubnet2ID: !GetAtt VPCStack.Outputs.PrivateSubnet2AID PrivateSubnet3ID: !If [ 3AZDeployment, !GetAtt VPCStack.Outputs.PrivateSubnet3AID, !Ref "AWS::NoValue" ] BastionInstanceType: !Ref BastionInstanceType NumBastionHosts: !Ref NumBastionHosts BastionAMIOS: !Ref BastionAMIOS MonitoringStack: !Ref MonitoringStack Outputs: BastionHostIP: Description: IP for bastion host. Value: !GetAtt "AerospikeServerStack.Outputs.BastionHostIP" MonitoringBastionHostIP: Description: IP for monitoring bastion host. Value: !GetAtt "AerospikeServerStack.Outputs.MonitoringBastionHostIP" AutoscalingID: Description: The Autoscaling Group ID that is used to deploy your cluster Value: !GetAtt "AerospikeServerStack.Outputs.AutoscalingID" Postdeployment: Description: To test your deployment, see the procedure in the deployment guide. Value: https://fwd.aws/Pa8Yw? Rules: TrialSingleNode: RuleCondition: !Equals [ !Ref FeatureKeyFile, '' ] Assertions: - Assert: !Equals [!Ref NumberOfInstances, '1'] AssertDescription: "If you are not providing your own license, you may launch only a single node."