AWSTemplateFormatVersion: '2010-09-09' Description: Deploy NebulaGraph on Amazon Web Services in a new VPC. (qs-1t9ums4ht) Metadata: LICENSE: Apache License Version 2.0 AWS::CloudFormation::Interface: ParameterGroups: - Label: default: Network configuration Parameters: - AvailabilityZone - VPCCIDR - PrivateSubnetCIDR - PublicSubnetCIDR - AccessCIDR - Label: default: Amazon EC2 configuration Parameters: - KeyPairName - Label: default: NebulaGraph configuration Parameters: - LicenseLink - InstanceType - VolumeSize - Label: default: Quick Start configuration Parameters: - QSS3BucketName - QSS3BucketRegion - QSS3KeyPrefix ParameterLabels: AvailabilityZone: default: Availability Zone PrivateSubnetCIDR: default: Private subnet CIDR PublicSubnetCIDR: default: Public subnet CIDR VPCCIDR: default: VPC CIDR AccessCIDR: default: Permitted IP range KeyPairName: default: Key-pair name LicenseLink: default: NebulaGraph License Link InstanceType: default: Node Instance Type VolumeSize: default: Volume size of node QSS3BucketName: default: Quick Start S3 bucket name QSS3BucketRegion: default: Quick Start S3 bucket Region QSS3KeyPrefix: default: Quick Start S3 key prefix Parameters: AvailabilityZone: Description: 'Availability Zone to use for the subnets in the VPC.' Type: AWS::EC2::AvailabilityZone::Name PrivateSubnetCIDR: 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: Must be a valid IP range in the form x.x.x.x/x. Default: 10.0.0.0/19 Description: 'CIDR block for private subnet located in Availability Zone.' Type: String 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])(\/([0-9]|[1-2][0-9]|3[0-2]))$ ConstraintDescription: Must be a valid IP range in the form x.x.x.x/x. Default: 10.0.128.0/20 Description: 'CIDR block for the public DMZ subnet 1 located in Availability Zone.' 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: Must be a valid IP range in the form x.x.x.x/x. 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]))$ ConstraintDescription: Must be a valid IP range in the form x.x.x.x/x. Description: CIDR IP range permitted to access NebulaGraph instances. A value of 0.0.0.0/0 allows access from any IP address. Default: 10.0.0.0/16 Type: String KeyPairName: Description: Key pairs allow you to connect to your instance after it launches. Type: AWS::EC2::KeyPair::KeyName LicenseLink: Description: You can skip this for 3-day free trial, or you can contact us for an enterprise license via https://www.nebula-graph.io/contact. Type: String InstanceType: Description: Amazon EC2 instance type for the node. 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 VolumeSize: Description: 'Data disk space for each Storage node, range: 32-16348 GiB, units: GiB. Space estimation method for the data in the whole cluster: total number of nodes and edges * average bytes of properties * 3.5 * 120% bytes.' Type: Number Default: 32 MinValue: 32 MaxValue: 16384 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-vesoft-nebula-graph-cloud/ 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: UsingDefaultBucket: !Equals [!Ref QSS3BucketName, 'aws-quickstart'] Resources: VPCStack: Type: AWS::CloudFormation::Stack Properties: TemplateURL: Fn::Sub: - https://${S3Bucket}.s3.${S3Region}.${AWS::URLSuffix}/${QSS3KeyPrefix}templates/allinone/vpc.template.yaml - S3Region: !If - UsingDefaultBucket - !Ref 'AWS::Region' - !Ref QSS3BucketRegion S3Bucket: !If - UsingDefaultBucket - !Sub '${QSS3BucketName}-${AWS::Region}' - !Ref QSS3BucketName Parameters: AvailabilityZone: !Ref AvailabilityZone PrivateSubnetCIDR: !Ref PrivateSubnetCIDR PublicSubnetCIDR: !Ref PublicSubnetCIDR VPCCIDR: !Ref VPCCIDR IAMRoleStack: Type: AWS::CloudFormation::Stack Properties: TemplateURL: Fn::Sub: - https://${S3Bucket}.s3.${S3Region}.${AWS::URLSuffix}/${QSS3KeyPrefix}templates/nebulagraph-iam.template.yaml - S3Region: !If - UsingDefaultBucket - !Ref 'AWS::Region' - !Ref QSS3BucketRegion S3Bucket: !If - UsingDefaultBucket - !Sub '${QSS3BucketName}-${AWS::Region}' - !Ref QSS3BucketName SecurityGroupStack: Type: AWS::CloudFormation::Stack Properties: TemplateURL: Fn::Sub: - https://${S3Bucket}.s3.${S3Region}.${AWS::URLSuffix}/${QSS3KeyPrefix}templates/securitygroups.template.yaml - S3Region: !If - UsingDefaultBucket - !Ref 'AWS::Region' - !Ref QSS3BucketRegion S3Bucket: !If - UsingDefaultBucket - !Sub '${QSS3BucketName}-${AWS::Region}' - !Ref QSS3BucketName Parameters: VPCID: !GetAtt VPCStack.Outputs.VPCID SecurityGroupRulesStack: Type: AWS::CloudFormation::Stack Properties: TemplateURL: Fn::Sub: - https://${S3Bucket}.s3.${S3Region}.${AWS::URLSuffix}/${QSS3KeyPrefix}templates/allinone/securitygroups-rules.template.yaml - S3Region: !If - UsingDefaultBucket - !Ref 'AWS::Region' - !Ref QSS3BucketRegion S3Bucket: !If - UsingDefaultBucket - !Sub '${QSS3BucketName}-${AWS::Region}' - !Ref QSS3BucketName Parameters: SecurityGroupID: !GetAtt SecurityGroupStack.Outputs.SecurityGroupID AccessCIDR: !Ref AccessCIDR NebulaGraphStack: Type: AWS::CloudFormation::Stack Properties: TemplateURL: Fn::Sub: - https://${S3Bucket}.s3.${S3Region}.${AWS::URLSuffix}/${QSS3KeyPrefix}templates/allinone/nebula-cluster.template.yaml - S3Region: !If - UsingDefaultBucket - !Ref 'AWS::Region' - !Ref QSS3BucketRegion S3Bucket: !If - UsingDefaultBucket - !Sub '${QSS3BucketName}-${AWS::Region}' - !Ref QSS3BucketName Parameters: SubnetID: !GetAtt VPCStack.Outputs.PrivateSubnetID SecurityGroupID: !GetAtt SecurityGroupStack.Outputs.SecurityGroupID IAMRoleName: !GetAtt IAMRoleStack.Outputs.NebulaGraphIAMRole IAMProfileID: !GetAtt IAMRoleStack.Outputs.NebulaGraphIAMProfile KeyPairName: !Ref KeyPairName LicenseLink: !Ref LicenseLink InstanceType: !Ref InstanceType VolumeSize: !Ref VolumeSize QSS3BucketName: !If - UsingDefaultBucket - !Sub '${QSS3BucketName}-${AWS::Region}' - !Ref QSS3BucketName QSS3KeyPrefix: !Ref QSS3KeyPrefix QSS3BucketRegion: !If - UsingDefaultBucket - !Ref 'AWS::Region' - !Ref QSS3BucketRegion NlbStack: Type: AWS::CloudFormation::Stack Properties: TemplateURL: Fn::Sub: - https://${S3Bucket}.s3.${S3Region}.${AWS::URLSuffix}/${QSS3KeyPrefix}templates/nlb.template.yaml - S3Region: !If - UsingDefaultBucket - !Ref 'AWS::Region' - !Ref QSS3BucketRegion S3Bucket: !If - UsingDefaultBucket - !Sub '${QSS3BucketName}-${AWS::Region}' - !Ref QSS3BucketName Parameters: VPCID: !GetAtt VPCStack.Outputs.VPCID Subnets: !Join - ',' - [ !GetAtt VPCStack.Outputs.PublicSubnetID ] ExplorerPort: '7002' ExplorerInstanceID: !GetAtt NebulaGraphStack.Outputs.InstanceID DashboardPort: '7005' DashboardInstanceID: !GetAtt NebulaGraphStack.Outputs.InstanceID Outputs: DatabaseVersion: Value: '3.4.1' GraphEndpoint: Description: Endpoint of NebulaGraph Value: !Sub [ '${PrivateIp}:9669', { PrivateIp: !GetAtt NebulaGraphStack.Outputs.PrivateIp } ] Explorer: Description: Explorer is a browser-based visualization tool. Value: !Sub [ 'http://${ElbDNSName}:7002', { ElbDNSName: !GetAtt NlbStack.Outputs.ElbDNSName } ] ExplorerLoginInfo: Value: 'The connection address is: ${PrivateIp}:9669, the default login username/password are: root/nebula' Dashboard: Description: Dashboard is a visualization tool that monitors and manages the status of machines and services in NebulaGraph clusters. Value: !Sub [ 'http://${ElbDNSName}:7005?lang=EN_US', { ElbDNSName: !GetAtt NlbStack.Outputs.ElbDNSName } ] DashboardLoginInfo: Value: 'The default login username/password is: nebula/nebula, use SSH username ubuntu, authorize the instance via key-pair secret and use sudo to import your cluster to Dashboard'