AWSTemplateFormatVersion: '2010-09-09' Description: This template is used for setting up Meta nodes.(qs-1t9ums4lc) Metadata: QSLint: Exclusions: [ W9002, W9003, W9004, W9006 ] Parameters: IAMRoleName: Description: Name of the NebulaGraph IAM Role. Type: String IAMProfileID: Description: ID of the NebulaGraph IAM Profile. Type: String KeyPairName: Description: Name of an existing EC2 key pair. All instances will launch with this key pair. Type: AWS::EC2::KeyPair::KeyName MetaInstanceType: Description: Type of EC2 instance for the Meta nodes. Type: String Default: c5.large AllowedValues: - c5.large - c5.xlarge - c5.2xlarge - c5.4xlarge - c5.9xlarge - c5.12xlarge - c5a.large - c5a.xlarge - c5a.2xlarge - c5a.4xlarge - c5a.8xlarge - c5a.12xlarge - c5a.16xlarge - c6a.large - c6a.xlarge - c6a.2xlarge - c6a.4xlarge - c6a.8xlarge - c6a.12xlarge - c6a.16xlarge - c6i.large - c6i.xlarge - c6i.2xlarge - c6i.4xlarge - c6i.8xlarge - c6i.12xlarge - c6i.16xlarge MetaNodeCount: AllowedValues: - 1 - 3 Default: 1 Description: Number of Meta nodes. Type: Number NetworkInterface1ID: Description: The ENI Physical ID of Meta Node 1. Type: String NetworkInterface2ID: Description: The ENI Physical ID of Meta Node 2. Type: String NetworkInterface3ID: Description: The ENI Physical ID of Meta Node 3. Type: String VolumeSize: Description: EBS Volume Size (data) to be attached to node in GBs. Type: Number Default: 20 MinValue: 20 MaxValue: 40 VolumeType: Description: EBS Volume Type (data) to be attached to node in GBs [gp2,gp3,io1,io2]. Type: String Default: gp2 AllowedValues: - gp2 - gp3 - io1 - io2 MetaEndpoints: Description: The endpoints of Meta nodes, separated by comma ','. Type: String NebulaGraphVersion: Description: NebulaGraph version. Type: String Default: 3.1.3 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 slashes (/). Default: quickstart-nebulagraph-cluster/ Description: S3 key prefix for the Quick Start assets. Quick Start key prefix can include numbers, lowercase letters, uppercase letters, hyphens (-), and forward slashes (/). Type: String QSS3BucketRegion: Default: 'us-east-1' Description: Amazon Region where the Quick Start S3 bucket (QSS3BucketName) is hosted. If you use your own bucket, you must specify this value. Type: String Conditions: 3MetaNodesCondition: !Equals [!Ref MetaNodeCount, '3'] Resources: MetaInstance1: Type: AWS::CloudFormation::Stack Properties: TemplateURL: !Sub 'https://${QSS3BucketName}.s3.${QSS3BucketRegion}.${AWS::URLSuffix}/${QSS3KeyPrefix}templates/meta.template.yaml' Parameters: IAMRoleName: !Ref IAMRoleName IAMProfileID: !Ref IAMProfileID KeyPairName: !Ref KeyPairName InstanceType: !Ref MetaInstanceType VolumeSize: !Ref VolumeSize VolumeType: !Ref VolumeType MetaEndpoints: !Ref MetaEndpoints MetaNodeIndex: '1' NetworkInterfaceID: !Ref NetworkInterface1ID NebulaGraphVersion: !Ref NebulaGraphVersion QSS3BucketName: !Ref QSS3BucketName QSS3KeyPrefix: !Ref QSS3KeyPrefix QSS3BucketRegion: !Ref QSS3BucketRegion MetaInstance2: Type: AWS::CloudFormation::Stack Condition: 3MetaNodesCondition Properties: TemplateURL: !Sub 'https://${QSS3BucketName}.s3.${QSS3BucketRegion}.${AWS::URLSuffix}/${QSS3KeyPrefix}templates/meta.template.yaml' Parameters: IAMRoleName: !Ref IAMRoleName IAMProfileID: !Ref IAMProfileID KeyPairName: !Ref KeyPairName InstanceType: !Ref MetaInstanceType VolumeSize: !Ref VolumeSize VolumeType: !Ref VolumeType MetaEndpoints: !Ref MetaEndpoints MetaNodeIndex: '2' NetworkInterfaceID: !Ref NetworkInterface2ID NebulaGraphVersion: !Ref NebulaGraphVersion QSS3BucketName: !Ref QSS3BucketName QSS3KeyPrefix: !Ref QSS3KeyPrefix QSS3BucketRegion: !Ref QSS3BucketRegion MetaInstance3: Type: AWS::CloudFormation::Stack Condition: 3MetaNodesCondition Properties: TemplateURL: !Sub 'https://${QSS3BucketName}.s3.${QSS3BucketRegion}.${AWS::URLSuffix}/${QSS3KeyPrefix}templates/meta.template.yaml' Parameters: IAMRoleName: !Ref IAMRoleName IAMProfileID: !Ref IAMProfileID KeyPairName: !Ref KeyPairName InstanceType: !Ref MetaInstanceType VolumeSize: !Ref VolumeSize VolumeType: !Ref VolumeType MetaEndpoints: !Ref MetaEndpoints MetaNodeIndex: '3' NetworkInterfaceID: !Ref NetworkInterface3ID NebulaGraphVersion: !Ref NebulaGraphVersion QSS3BucketName: !Ref QSS3BucketName QSS3KeyPrefix: !Ref QSS3KeyPrefix QSS3BucketRegion: !Ref QSS3BucketRegion Outputs: MetaInstance1ID: Description: The Instance ID of Meta Node 1 Value: !GetAtt MetaInstance1.Outputs.InstanceID MetaInstance2ID: Description: The Instance ID of Meta Node 2 Condition: 3MetaNodesCondition Value: !GetAtt MetaInstance2.Outputs.InstanceID MetaInstance3ID: Description: The Instance ID of Meta Node 3 Condition: 3MetaNodesCondition Value: !GetAtt MetaInstance3.Outputs.InstanceID