AWSTemplateFormatVersion: '2010-09-09' Description: This template is used for setting up Graph nodes.(qs-1t9ums4l1) Metadata: QSLint: Exclusions: [ W9002, W9003, W9004, W9006 ] Parameters: DeploymentID: Description: The Deployment ID Type: String PrivateSubnet1ID: Description: ID of existing private subnet 1 for the Graph nodes. Type: AWS::EC2::Subnet::Id PrivateSubnet2ID: Description: ID of existing private subnet 2 for the Graph nodes. Type: AWS::EC2::Subnet::Id PrivateSubnet3ID: Description: ID of existing private subnet 3 for the Graph nodes. Type: AWS::EC2::Subnet::Id SecurityGroupID: Description: ID of your existing SecurityGroup for deployment. Type: AWS::EC2::SecurityGroup::Id 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 GraphInstanceType: Description: Amazon EC2 instance type for the Graph nodes. Type: String Default: t3.large AllowedValues: - t3.large - t3.xlarge - t3.2xlarge - m6i.large - m6i.xlarge - m6i.2xlarge - m6i.4xlarge - m6i.8xlarge - m6i.12xlarge - m6i.16xlarge - m6i.24xlarge - m6i.32xlarge - m6i.metal - m6a.large - m6a.xlarge - m6a.2xlarge - m6a.4xlarge - m6a.8xlarge - m6a.12xlarge - m6a.16xlarge - m6a.24xlarge - m6a.32xlarge - m6a.48xlarge - m5a.large - m5a.xlarge - m5a.2xlarge - m5a.4xlarge - m5a.8xlarge - m5a.12xlarge - m5a.16xlarge - m5a.24xlarge - m5n.large - m5n.xlarge - m5n.2xlarge - m5n.4xlarge - m5n.8xlarge - m5n.12xlarge - m5n.16xlarge - m5n.24xlarge - m5n.metal - m5zn.large - m5zn.xlarge - m5zn.2xlarge - m5zn.3xlarge - m5zn.6xlarge - m5zn.12xlarge - m5zn.metal - r5a.large - r5a.xlarge - r5a.2xlarge - r5a.4xlarge - r5a.8xlarge - r5a.12xlarge - r5a.16xlarge - r5a.24xlarge - r6i.large - r6i.xlarge - r6i.2xlarge - r6i.4xlarge - r6i.8xlarge - r6i.12xlarge - r6i.16xlarge - r6i.24xlarge - r6i.32xlarge - r6i.metal GraphNodeCount: AllowedValues: - 1 - 2 - 3 Default: 1 Description: Number of Graph nodes. Type: Number VolumeSize: Description: EBS Volume Size (data) to be attached to node in GBs. Type: Number Default: 10 MinValue: 10 MaxValue: 20 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: MoreThan2GraphNodesCondition: !Or - !Equals [!Ref GraphNodeCount, '2'] - !Equals [!Ref GraphNodeCount, '3'] Resources: GraphInstance1: Type: AWS::CloudFormation::Stack Properties: TemplateURL: !Sub 'https://${QSS3BucketName}.s3.${QSS3BucketRegion}.${AWS::URLSuffix}/${QSS3KeyPrefix}templates/graph.template.yaml' Parameters: DeploymentID: !Ref DeploymentID PrivateSubnetID: !Ref PrivateSubnet1ID SecurityGroupID: !Ref SecurityGroupID IAMRoleName: !Ref IAMRoleName IAMProfileID: !Ref IAMProfileID KeyPairName: !Ref KeyPairName InstanceType: !Ref GraphInstanceType VolumeSize: !Ref VolumeSize VolumeType: !Ref VolumeType MetaEndpoints: !Ref MetaEndpoints GraphNodeIndex: '1' NebulaGraphVersion: !Ref NebulaGraphVersion QSS3BucketName: !Ref QSS3BucketName QSS3KeyPrefix: !Ref QSS3KeyPrefix QSS3BucketRegion: !Ref QSS3BucketRegion GraphInstance2: Type: AWS::CloudFormation::Stack Condition: MoreThan2GraphNodesCondition Properties: TemplateURL: !Sub 'https://${QSS3BucketName}.s3.${QSS3BucketRegion}.${AWS::URLSuffix}/${QSS3KeyPrefix}templates/graph.template.yaml' Parameters: DeploymentID: !Ref DeploymentID PrivateSubnetID: !Ref PrivateSubnet2ID SecurityGroupID: !Ref SecurityGroupID IAMRoleName: !Ref IAMRoleName IAMProfileID: !Ref IAMProfileID KeyPairName: !Ref KeyPairName InstanceType: !Ref GraphInstanceType VolumeSize: !Ref VolumeSize VolumeType: !Ref VolumeType MetaEndpoints: !Ref MetaEndpoints GraphNodeIndex: '2' NebulaGraphVersion: !Ref NebulaGraphVersion QSS3BucketName: !Ref QSS3BucketName QSS3KeyPrefix: !Ref QSS3KeyPrefix QSS3BucketRegion: !Ref QSS3BucketRegion GraphInstance3: Type: AWS::CloudFormation::Stack Condition: MoreThan2GraphNodesCondition Properties: TemplateURL: !Sub 'https://${QSS3BucketName}.s3.${QSS3BucketRegion}.${AWS::URLSuffix}/${QSS3KeyPrefix}templates/graph.template.yaml' Parameters: DeploymentID: !Ref DeploymentID PrivateSubnetID: !Ref PrivateSubnet3ID SecurityGroupID: !Ref SecurityGroupID IAMRoleName: !Ref IAMRoleName IAMProfileID: !Ref IAMProfileID KeyPairName: !Ref KeyPairName InstanceType: !Ref GraphInstanceType VolumeSize: !Ref VolumeSize VolumeType: !Ref VolumeType MetaEndpoints: !Ref MetaEndpoints GraphNodeIndex: '3' NebulaGraphVersion: !Ref NebulaGraphVersion QSS3BucketName: !Ref QSS3BucketName QSS3KeyPrefix: !Ref QSS3KeyPrefix QSS3BucketRegion: !Ref QSS3BucketRegion Outputs: GraphInstance1ID: Description: The Instance ID of Graph Node 1 Value: !GetAtt GraphInstance1.Outputs.InstanceID GraphInstance1PrivateIP: Description: Private IP Address of Graph Node 1 Value: !GetAtt GraphInstance1.Outputs.PrivateIp GraphInstance2ID: Description: The Instance ID of Graph Node 2 Condition: MoreThan2GraphNodesCondition Value: !GetAtt GraphInstance2.Outputs.InstanceID GraphInstance2PrivateIP: Description: Private IP Address of Graph Node 2 Condition: MoreThan2GraphNodesCondition Value: !GetAtt GraphInstance2.Outputs.PrivateIp GraphInstance3ID: Description: The Instance ID of Graph Node 3 Condition: MoreThan2GraphNodesCondition Value: !GetAtt GraphInstance3.Outputs.InstanceID GraphInstance3PrivateIP: Description: Private IP Address of Graph Node 3 Condition: MoreThan2GraphNodesCondition Value: !GetAtt GraphInstance3.Outputs.PrivateIp