文档

使用ROS模板实现参数分组展示

更新时间:

资源编排支持通过定义模板实现参数分组展示。

表格形式

以下将提供一个示例,为您介绍如何将参数聚合以表格形式展示。

模板示例

您可以通过设置Metadata中的GroupType参数,选择参数的展示方式为表格形式或平铺形式。

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  Boolean:
    Type: Boolean
    Default: false
  Number:
    Type: Number
    Default: 3
    Description: Number Desc
  Input:
    Type: String
    Default: '12'
  RegionId:
    Type: String
    AssociationProperty: RegionId
    Description: 描述
  cidrBlock:
    Type: String
    AssociationProperty: ALIYUN::VPC::VSwitch::CidrBlock
    Default: ''
    AssociationPropertyMetadata:
      VpcId: ${vpcId}
  VPCId:
    Type: String
    AssociationProperty: ALIYUN::ECS::VPC::VPCId
    Default: vpc-ssss
    AssociationPropertyMetadata:
      RegionId: ${RegionId}
  vSwitchId:
    Type: String
    AssociationProperty: ALIYUN::ECS::VSwitch::VSwitchId
    Default: vsw-ssss
    AssociationPropertyMetadata:
      RegionId: ${RegionId}
      VPCId: ${VPCId}
  InstanceType:
    Type: String
    AssociationProperty: ALIYUN::ECS::Instance::InstanceType
    Default: ecs.s.s.1
    AssociationPropertyMetadata:
      RegionId: ${RegionId}
Metadata:
  ALIYUN::ROS::Interface:
    ParameterGroups:
      - Label: 网络设置
        Parameters:
          - VPCId
          - vSwitchId
      - Label: Table 分组设置
        GroupType: Table
        Parameters:
          - RegionId
          - Label: Grid Item 1
            Items:
              - Boolean
              - Key: Number
            Description: Grid Item 1 描述
          - Input
          - InstanceType

Metadata参数说明:

  • Label:定义分组的标签。

  • GroupType:定义分组的展示形式。取值:

    • Table:表格形式。

    • Normal(默认值):平铺形式。

    • Payment:平铺形式。

  • Description:定义分组的描述。

  • PaymentId:一个模板中可能存在多个付费类型的参数分组,需要给每个分组设置唯一标识,确保分组参数正确匹配。

  • Parameters:参数列表。取值:

    • Items:参数 Grid 布局时,归属到某个Grid的元素。

    • Label:该分组的标签。

    • Description:该分组的描述。

参数分组展示示例

当您使用模板示例代码创建资源栈或资源栈组时,ROS控制台将参数聚合以表格形式展示。分组样式

分组形式

以下将提供一个示例,为您介绍如何将参数组合展示。

您可以在模板中引入自定义参数Metadata,实现参数组合布局的功能。

限定条件:

  • 一个参数只能出现在一个分组中。

  • 定义在套餐包的参数不会显示在分组中。

  • 定义为隐藏的参数不会显示在分组中。

模板示例

ROSTemplateFormatVersion: '2015-09-01'
Description:
  en: Select the region to be deployed and the VPC and NAT under the account, and then automatically create the SLB, ECS, and other cloud resources required for SensorsData, and install the software.
  zh-cn: 选择需要部署的地域以及账号下的VPC和NAT, 然后会自动创建SensorsData所需的SLB、ECS以及其他云资源并进行软件的安装。
Parameters:
  CustomerId:
    Type: String
    Label:
      zh-cn: 客户名称
      en: CustomerId
    MinLength: 4
    MaxLength: 100
  DataSinkDomainName:
    Type: String
    Default: null
    Label:
      en: Datasink domain name
      zh-cn: 数据接收域名
    Description:
      zh-cn: 如果已经预先准备好域名,请输入您数据接收的域名<br>如果还未准备域名请留空,更多信息,请参见 </font><a href='https://manual.sensorsdata.cn/sa/latest/%E6%9C%8D%E5%8A%A1%E8%BD%AC%E5%8F%91%E9%85%8D%E7%BD%AE-22258255.html' target='_blank'><b> 手动登录环境进行配置</b><font color='blue'></a><br> <b><font color='red'>请注意:此处输入的域名只会进行神策部署后的配置,依然需要您自行备案和 DNS 解析!</b></font>
      en: If you have prepared the domain name in advance, enter your data receiving domain name
  QueryDomainName:
    Type: String
    Default: null
    Label:
      en: Query domain name
      zh-cn: 分析页面域名
    Description:
      zh-cn: 如果已经预先准备好域名,请输入您登录分析页面的域名<br> 如果还未准备域名请留空,更多信息,请参见 </font><a href='https://manual.sensorsdata.cn/sa/latest/%E6%9C%8D%E5%8A%A1%E8%BD%AC%E5%8F%91%E9%85%8D%E7%BD%AE-22258255.html' target='_blank'><b> 手动登录环境进行配置</b><font color='blue'></a> <br> <b><font color='red'>请注意:此处输入的域名只会进行神策部署后的配置,依然需要您自行备案和DNS解析!</b></font>
      en: If you have prepared the domain name in advance, enter your data receiving domain name
  ZoneId:
    Type: String
    AssociationProperty: ALIYUN::ECS::ZoneId
    Label:
      en: Availability Zone
      zh-cn: 请选择可用区
  VpcId:
    AssociationProperty: ALIYUN::ECS::VPC::VPCId
    Type: String
    Description:
      zh-cn: 希望神策集群和现有业务同一个VPC可选已有的VPC</br>需要和其它业务网络隔离可以点击跳转新建VPC,后续有需要再打通。
    Label:
      en: VPC ID
      zh-cn: 选择VPC
  VSwitchCidrBlock:
    Type: String
    Label:
      en: VSwitch IPv4 CIDR Block
      zh-cn: 填写交换机子网IPv4网段
    Description:
      zh-cn: 必须是所属专有网络的子网段,并且没有被其他交换机占用
      en: Must belong to the subnet segment of VPC, and it must not be occupied by other VSwitches
    Default: 192.168.XX.XX/24
  SystemDiskCategory:
    Type: String
    AssociationProperty: ALIYUN::ECS::Disk::SystemDiskCategory
    AssociationPropertyMetadata:
      ZoneId: ${ZoneId}
      InstanceType: ${EcsInstanceType}
      LocaleKey: DiskCategory
    Description: 可选择高效云盘、ssd盘、essd云盘。<b><font color='red'>推荐选择高效云盘</b></font>
    Label:
      en: System Disk Category
      zh-cn: 系统盘规格
    AllowedValues:
      - cloud_essd
      - cloud_ssd
      - cloud_efficiency
  SystemDiskSize:
    Type: Number
    Description:
      en: 'System disk space, range of values: 50~500, units: GB'
      zh-cn: 实例系统盘大小,单位为GiB。取值范围:50~500。
    Label:
      en: System Disk Size
      zh-cn: 系统盘大小
    MinValue: 50
    MaxValue: 500
    Default: 50
  MetaDiskCategory:
    Type: String
    AssociationProperty: ALIYUN::ECS::Disk::DataDiskCategory
    AssociationPropertyMetadata:
      ZoneId: ${ZoneId}
      InstanceType: ${EcsInstanceType}
      LocaleKey: DiskCategory
    Description: 由于存在大量随机读写,可选ssd盘、essd云盘。<b><font color='red'>推荐选择ssd盘</b></font>
    ConstraintDescription: 请重新选择元数据盘的规格,由于存在大量随机读写,至少需要选择ssd规格
    Label:
      en: Metadata Disk Category
      zh-cn: 元数据盘规格
    AllowedValues:
      - cloud_essd
      - cloud_ssd
  MetaDiskSize:
    Type: Number
    Description:
      en: 'Meta Data disk space, range of values: 250-32768, units: GB'
      zh-cn: 元数据盘大小,单位为GiB。可选范围:250~32768
    Label:
      en: Meta Disk Space
      zh-cn: 元数据盘空间
    MinValue: 250
    MaxValue: 32768
    Default: 250
  RndDiskCategory:
    Type: String
    AssociationProperty: ALIYUN::ECS::Disk::DataDiskCategory
    AssociationPropertyMetadata:
      ZoneId: ${ZoneId}
      InstanceType: ${EcsInstanceType}
      LocaleKey: DiskCategory
    Description: 由于存在大量随机读写,可选ssd盘、essd云盘。<b><font color='red'>推荐选择ssd盘</b></font>
    ConstraintDescription: 请重新选择随机数据盘的规格,由于存在大量随机读写,至少需要选择ssd规格
    Label:
      en: Rnd Disk Category
      zh-cn: 随机数据盘规格
    AllowedValues:
      - cloud_essd
      - cloud_ssd
  RndDiskSize:
    Type: Number
    Description:
      en: 'Random Data disk space, range of values: 250-32768, units: GB'
      zh-cn: 随机数据盘大小,单位为GiB。取值范围:250-32768
    Label:
      en: Rnd Disk Space
      zh-cn: 随机数据盘空间
    MinValue: 250
    MaxValue: 32768
    Default: 250
  SeqDiskCategory:
    Type: String
    AssociationProperty: ALIYUN::ECS::Disk::DataDiskCategory
    AssociationPropertyMetadata:
      ZoneId: ${ZoneId}
      InstanceType: ${EcsInstanceType}
      LocaleKey: DiskCategory
    Description: 主要是顺序读写,可选高效云盘、ssd盘、essd云盘。<b><font color='red'>推荐选择高效云盘</b></font>
    Label:
      en: Seq Disk Category
      zh-cn: 顺序数据盘规格
    AllowedValues:
      - cloud_essd
      - cloud_ssd
      - cloud_efficiency
  SeqDiskSize:
    Type: Number
    Description:
      en: 'Seqence Data disk space, range of values: 1000-32768, units: GB'
      zh-cn: 顺序数据盘大小,单位为GiB。取值范围:1000~32768
    Label:
      en: Seq Disk Space
      zh-cn: 顺序数据盘空间
    MinValue: 1000
    MaxValue: 32768
    Default: 1000
  StdataDiskCategory:
    Type: String
    AssociationProperty: ALIYUN::ECS::Disk::DataDiskCategory
    AssociationPropertyMetadata:
      ZoneId: ${ZoneId}
      InstanceType: ${EcsInstanceType}
      LocaleKey: DiskCategory
    Description: 主要是顺序读写,可选高效云盘、ssd盘、essd云盘。<b><font color='red'>推荐选择高效云盘</b></font>
    Label:
      en: Stdata Disk Category
      zh-cn: 数据接收盘规格
    AllowedValues:
      - cloud_essd
      - cloud_ssd
      - cloud_efficiency
  StdataDiskSize:
    Type: Number
    Description:
      en: 'Stdata Data disk space, range of values: 300-32768, units: GB'
      zh-cn: 数据接收盘大小,单位为GiB。取值范围:300~32768
    Label:
      en: Data Disk Space
      zh-cn: 数据接收盘空间
    MinValue: 300
    MaxValue: 32768
    Default: 300
  EcsInstanceType:
    Type: String
    Label:
      en: Instance Type
      zh-cn: 根据地域-可用区的不同,可选择下表中神策为Mini低配3节点集群推荐的ECS规格
    AssociationProperty: ALIYUN::ECS::Instance::InstanceType
    AssociationPropertyMetadata:
      ZoneId: ${ZoneId}
      InstanceChargeType: ${InstanceChargeType}
    AllowedValues:
      - ecs.r5.2xlarge
      - ecs.r7.2xlarge
      - ecs.r7a.2xlarge
      - ecs.g7.4xlarge
      - ecs.g7a.4xlarge
      - ecs.g7.4xlarge
      - ecs.g7se.4xlarge
      - ecs.g5.4xlarge
      - ecs.g5ne.4xlarge
      - ecs.r7se.2xlarge
  ECSPeriodUnit:
    AssociationPropertyMetadata:
      LocaleKey: PricingCycle
      Visible:
        Condition:
          Fn::Not:
            Fn::Equals:
              - ${InstanceChargeType}
              - PostPaid
    Type: String
    Default: Year
    Label:
      zh-cn: 购买周期
      en: Purchase cycle
    AllowedValues:
      - Month
      - Year
  ECSPeriod:
    AssociationPropertyMetadata:
      Visible:
        Condition:
          Fn::Not:
            Fn::Equals:
              - ${InstanceChargeType}
              - PostPaid
    Default: 1
    Label:
      zh-cn: 购买时长
      en: Purchase duration
    AllowedValues:
      - 1
      - 2
      - 3
      - 4
      - 5
      - 6
      - 7
      - 8
      - 9
      - 10
      - 11
    Type: Number
  InstanceChargeType:
    Default: PrePaid
    Type: String
    Label:
      zh-cn: ECS实例的付费模式
      en: ECS Instance Billing Method
    AllowedValues:
      - PostPaid
      - PrePaid
    AssociationPropertyMetadata:
      LocaleKey: InstanceChargeType
  NatGatewayBandwidth:
    Label:
      en: Nat Gateway Bandwidth
      zh-cn: NAT网关带宽
    Description:
      zh-cn: 神策将在选择的VPC下创建一个NAT网关出网访问。带宽取值范围:1~200 Mbps,推荐保持默认的5 Mbps即可
      en: 'EIP Bandwidth for Nat Gateway.Value range: [1,200], unit: Mbps'
    ConstraintDescription:
      zh-cn: NAT网关带宽,ECS出网通过NAT。取值范围:1~200, 单位:Mbps
      en: 'EIP Bandwidth for Nat Gateway.Value range: [1,200], unit: Mbps'
    Default: 5
    Type: Number
    MinValue: 1
    MaxValue: 200
  DatasinkServerCertificateId:
    Type: String
    AssociationProperty: ALIYUN::CAS::Certificate::CertificateId
    Label:
      en: Datasink domain name certificate
      zh-cn: 数据接收域名证书
    Default: null
    Description:
      zh-cn: 请选择或者新建您准备给<b><font color='red'>数据接收域名</b></font>的SSL证书。请注意以下几点:</br> 1、选择 SSL 证书后,将会自动配置SLB数据接收的端口443为HTTPS协议</br>2、如果未选择证书,将会自动配置SLB数据接收的端口443为HTTP协议</br> <b><font color='red'>考虑到常见埋点需求,数据接收域名推荐配置证书!</b></font>
  QueryServerCertificateId:
    Type: String
    AssociationProperty: ALIYUN::CAS::Certificate::CertificateId
    Label:
      en: Query domain name certificate
      zh-cn: 分析页面域名证书
    Default: null
    Description:
      zh-cn: 请选择或者新建您准备给<b><font color='red'>后台分析页面域名</b></font>的SSL证书。请注意以下几点:</br> 1、选择SSL证书后,将会自动配置SLB分析页面的端口8107为HTTPS协议</br> 2、如果未选择证书,将默认配置SLB分析页面的端口8107为HTTP协议</br> 若分析页面域名和数据接收域名相同,可以选择同一个证书
  LoadBalancerSpec:
    Type: String
    AssociationProperty: ALIYUN::SLB::Instance::InstanceType
    Label:
      en: Specifications
      zh-cn: 规格
    Default: slb.s3.large
    AllowedValues:
      - slb.s2.medium
      - slb.s3.small
      - slb.s3.medium
      - slb.s3.large
      - slb.s3.xlarge
      - slb.s3.xxlarge
Resources:
  EcsVSwitch:
    Type: ALIYUN::ECS::VSwitch
    Properties:
      VSwitchName:
        Fn::Join:
          - '-'
          - - sensorsdata-vsw
            - StackId
            - Ref: ALIYUN::StackId
      VpcId:
        Ref: VpcId
      CidrBlock:
        Ref: VSwitchCidrBlock
      ZoneId:
        Ref: ZoneId
  EcsSecurityGroup:
    Type: ALIYUN::ECS::SecurityGroup
    Properties:
      SecurityGroupName:
        Fn::Join:
          - '-'
          - - SensorsData-sg
            - StackId
            - Ref: ALIYUN::StackId
      VpcId:
        Ref: VpcId
      SecurityGroupIngress:
        - PortRange: 22/22
          Priority: 1
          SourceCidrIp: 192.144.XX.XX/32,49.232.XX.XX/32,47.93.XX.XX/32,123.59.XX.XX/32,107.150.XX.XX/32,128.1.XX.XX/32,100.104.XX.XX/16
          IpProtocol: tcp
          NicType: internet
      SecurityGroupEgress:
        - PortRange: '-1/-1'
          Priority: 1
          IpProtocol: all
          DestCidrIp: 0.0.0.0/0
          NicType: internet
        - PortRange: '-1/-1'
          Priority: 1
          IpProtocol: all
          DestCidrIp: 0.0.0.0/0
          NicType: intranet
  EcsInstanceGroup:
    Type: ALIYUN::ECS::InstanceGroup
    Properties:
      IoOptimized: optimized
      DiskMappings:
        - Category:
            Ref: MetaDiskCategory
          Size:
            Ref: MetaDiskSize
          Device: /dev/xvdb
        - Category:
            Ref: RndDiskCategory
          Size:
            Ref: RndDiskSize
          Device: /dev/xvdc
        - Category:
            Ref: SeqDiskCategory
          Size:
            Ref: SeqDiskSize
          Device: /dev/xvdd
        - Category:
            Ref: SeqDiskCategory
          Size:
            Ref: SeqDiskSize
          Device: /dev/xvde
        - Category:
            Ref: SeqDiskCategory
          Size:
            Ref: SeqDiskSize
          Device: /dev/xvdf
        - Category:
            Ref: StdataDiskCategory
          Size:
            Ref: StdataDiskSize
          Device: /dev/xvdg
      PeriodUnit:
        Ref: ECSPeriodUnit
      Period:
        Ref: ECSPeriod
      SystemDiskCategory:
        Ref: SystemDiskCategory
      SystemDiskSize:
        Ref: SystemDiskSize
      InstanceChargeType:
        Ref: InstanceChargeType
      SecurityGroupId:
        Ref: EcsSecurityGroup
      VSwitchId:
        Ref: EcsVSwitch
      MaxAmount: 3
      VpcId:
        Ref: VpcId
      ImageId: centos_7_9
      InstanceType:
        Ref: EcsInstanceType
      Password: Sensorsdata@2015
      AllocatePublicIP: false
      InstanceName:
        Fn::Join:
          - '-'
          - - sensorsdata-ecs[1,2]
            - StackId
            - Ref: ALIYUN::StackId
      SecurityEnhancementStrategy: Active
  Slb:
    Type: ALIYUN::SLB::LoadBalancer
    Properties:
      LoadBalancerName:
        Fn::Join:
          - '-'
          - - sensorsdata-lb
            - StackId
            - Ref: ALIYUN::StackId
      VpcId:
        Ref: VpcId
      VSwitchId:
        Ref: EcsVSwitch
      AddressType: internet
      LoadBalancerSpec:
        Ref: LoadBalancerSpec
      PayType: PayOnDemand
      AddressIPVersion: ipv4
      InternetChargeType: paybytraffic
  SlbBackendServerAttachment:
    DependsOn:
      - EcsInstanceGroup
    Type: ALIYUN::SLB::BackendServerAttachment
    Properties:
      BackendServerList:
        Fn::GetAtt:
          - EcsInstanceGroup
          - InstanceIds
      LoadBalancerId:
        Ref: Slb
  Slb443Listener:
    DependsOn: Slb
    Type: ALIYUN::SLB::Listener
    Properties:
      Persistence:
        CookieTimeout: 3600
        StickySession: 'on'
        PersistenceTimeout: 180
        XForwardedFor: 'on'
        StickySessionType: insert
      ListenerPort: 443
      Scheduler: wrr
      Bandwidth: -1
      HealthCheck:
        HttpCode: http_2xx,http_3xx,http_4xx,http_5xx
        HealthCheckType: http
        UnhealthyThreshold: 3
        Timeout: 5
        HealthyThreshold: 3
        Port: 8106
        URI: /
        Interval: 2
      LoadBalancerId:
        Ref: Slb
      BackendServerPort: 8106
      Protocol:
        Fn::If:
          - HttporHttps4Datasink
          - https
          - http
      ServerCertificateId:
        Ref: DatasinkServerCertificateId
  Slb8107Listener:
    DependsOn: Slb
    Type: ALIYUN::SLB::Listener
    Properties:
      Persistence:
        CookieTimeout: 1800
        StickySession: 'on'
        PersistenceTimeout: 180
        XForwardedFor: 'on'
        StickySessionType: insert
      ListenerPort: 8107
      Bandwidth: -1
      RequestTimeout: 180
      HealthCheck:
        HttpCode: http_2xx,http_3xx,http_4xx,http_5xx
        HealthCheckType: http
        UnhealthyThreshold: 3
        Timeout: 5
        HealthyThreshold: 3
        Port: 8107
        URI: /
        Interval: 2
      LoadBalancerId:
        Ref: Slb
      BackendServerPort: 8107
      Protocol:
        Fn::If:
          - HttporHttps4Query
          - https
          - http
      ServerCertificateId:
        Ref: QueryServerCertificateId
  EipSlb:
    Type: ALIYUN::VPC::EIP
    Properties:
      InternetChargeType: PayByTraffic
      Bandwidth: 20
      Name:
        Fn::Join:
          - '-'
          - - sensorsdata-lb-eip
            - StackId
            - Ref: ALIYUN::StackId
  EipSlbAssociation:
    Type: ALIYUN::VPC::EIPAssociation
    Properties:
      InstanceId:
        Ref: Slb
      AllocationId:
        Ref: EipSlb
  VpcNatGateway:
    Type: ALIYUN::VPC::NatGateway
    DependsOn: EcsVSwitch
    Properties:
      Description: 神策集群公网NAT
      NatGatewayName:
        Fn::Join:
          - '-'
          - - sensorsdata-nat
            - StackId
            - Ref: ALIYUN::StackId
      VSwitchId:
        Fn::GetAtt:
          - EcsVSwitch
          - VSwitchId
      VpcId:
        Ref: VpcId
  EipNat:
    Type: ALIYUN::VPC::EIP
    Properties:
      InternetChargeType: PayByTraffic
      Bandwidth:
        Ref: NatGatewayBandwidth
      Name:
        Fn::Join:
          - '-'
          - - sensorsdata-nat-eip
            - StackId
            - Ref: ALIYUN::StackId
  EipNatAssociation:
    DependsOn: VpcNatGateway
    Type: ALIYUN::VPC::EIPAssociation
    Properties:
      InstanceId:
        Ref: VpcNatGateway
      AllocationId:
        Ref: EipNat
  SNatEntry:
    Type: ALIYUN::ECS::SNatEntry
    DependsOn: EipNatAssociation
    Properties:
      SNatIp:
        Fn::GetAtt:
          - EipNat
          - EipAddress
      SNatTableId:
        Fn::GetAtt:
          - VpcNatGateway
          - SNatTableId
      SourceCIDR:
        Ref: VSwitchCidrBlock
      SnatEntryName: 神策集群出网SNAT转发
  DNatEntry:
    Type: ALIYUN::ECS::ForwardEntry
    DependsOn: EipNatAssociation
    Properties:
      ForwardEntryName: 神策集群SSH-DNAT转发
      ExternalIp:
        Fn::GetAtt:
          - EipNat
          - EipAddress
      ForwardTableId:
        Fn::GetAtt:
          - VpcNatGateway
          - ForwardTableId
      ExternalPort: '12321'
      InternalIp:
        Fn::Select:
          - '0'
          - Fn::GetAtt:
              - EcsInstanceGroup
              - PrivateIps
      IpProtocol: TCP
      InternalPort: '22'
      PortBreak: 'true'
  Invocation:
    Type: ALIYUN::ECS::RunCommand
    Properties:
      InstanceIds:
        Fn::GetAtt:
          - EcsInstanceGroup
          - InstanceIds
      Type: RunShellScript
      CommandContent:
        Fn::Sub:
          - |
            #!/bin/bash
            cat >> /root/conf.txt << EOF
            SystemDiskCategory=${SystemDiskCategory}
            SystemDiskSize=${SystemDiskSize}
            MetaDiskCategory=${MetaDiskCategory}
            MetaDiskSize=${MetaDiskSize}
            RndDiskCategory=${RndDiskCategory}
            RndDiskSize=${RndDiskSize}
            SeqDiskCategory=${SeqDiskCategory}
            SeqDiskSize=${SeqDiskSize}
            StdataDiskCategory=${StdataDiskCategory}
            StdataDiskSize=${StdataDiskSize}
            CustomerId=${CustomerId}
            DataSinkDomainName=${DataSinkDomainName}
            QueryDomainName=${QueryDomainName}
            SlbEip=${SlbEip}
            InstanceIps=${InstanceIps}
            EOF
          - SlbEip:
              Fn::GetAtt:
                - EipSlb
                - EipAddress
            SystemDiskCategory:
              Ref: SystemDiskCategory
            SystemDiskSize:
              Ref: SystemDiskSize
            MetaDiskCategory:
              Ref: MetaDiskCategory
            MetaDiskSize:
              Ref: MetaDiskSize
            RndDiskCategory:
              Ref: RndDiskCategory
            RndDiskSize:
              Ref: RndDiskSize
            SeqDiskCategory:
              Ref: SeqDiskCategory
            SeqDiskSize:
              Ref: SeqDiskSize
            StdataDiskCategory:
              Ref: StdataDiskCategory
            StdataDiskSize:
              Ref: StdataDiskSize
            CustomerId:
              Ref: CustomerId
            DataSinkDomainName:
              Ref: DataSinkDomainName
            QueryDomainName:
              Ref: QueryDomainName
            InstanceIps:
              Fn::GetAtt:
                - EcsInstanceGroup
                - PrivateIps
Conditions:
  HttporHttps4Datasink:
    Fn::Not:
      Fn::Equals:
        - null
        - Ref: DatasinkServerCertificateId
  HttporHttps4Query:
    Fn::Not:
      Fn::Equals:
        - null
        - Ref: QueryServerCertificateId
Outputs:
  EipSlbAddress:
    Description:
      en: Accessing public IP Addresses
      zh-cn: 神策集群对外暴露的公网IP,需要解析到数据接收和查询的域名
    Value:
      Fn::GetAtt:
        - EipSlb
        - EipAddress
  EipEcsAddress:
    Description:
      en: Accessing public IP Addresses
      zh-cn: ECS 通过白名单公网访问的IP地址
    Value:
      Fn::GetAtt:
        - EipNat
        - EipAddress
Metadata:
  ALIYUN::ROS::Interface:
    ParameterGroups:
      - Parameters:
          - ZoneId
          - VpcId
          - VSwitchCidrBlock
          - NatGatewayBandwidth
        Label:
          default:
            zh-cn: 基础网络配置
            en: NetWork
      - Parameters:
          - LoadBalancerSpec
          - DatasinkServerCertificateId
          - QueryServerCertificateId
        Label:
          default:
            en: SLB
            zh-cn: SLB相关配置
      - Parameters:
          - Label:
              en: Charge Type
              zh-cn: 付费模式
            Items:
              - InstanceChargeType
              - Key: ECSPeriodUnit
                ShowLabel: true
              - Key: ECSPeriod
                ShowLabel: true
          - EcsInstanceType
          - Label:
              en: System Disk
              zh-cn: 系统盘
            Description: 可选择高效云盘、ssd盘、essd云盘。<b><font color='red'>推荐选择高效云盘</b></font>
            Items:
              - SystemDiskCategory
              - Key: SystemDiskSize
                ShowLabel: true
          - Label:
              en: Meta Disk
              zh-cn: 元数据盘
            Description: 由于存在大量随机读写,可选ssd盘、essd云盘。<b><font color='red'>推荐选择ssd盘</b></font>
            Items:
              - MetaDiskCategory
              - Key: MetaDiskSize
                ShowLabel: true
          - Label:
              en: Random Disk
              zh-cn: 随机数据盘
            Description: 由于存在大量随机读写,可选ssd盘、essd云盘。<b><font color='red'>推荐选择ssd盘</b></font>
            Items:
              - RndDiskCategory
              - Key: RndDiskSize
                ShowLabel: true
          - Label:
              en: Sequence Disk
              zh-cn: 顺序数据盘
            Description: 主要是顺序读写,可选高效云盘、ssd盘、essd云盘。<b><font color='red'>推荐选择高效云盘</b></font>
            Items:
              - SeqDiskCategory
              - Key: SeqDiskSize
                ShowLabel: true
          - Label:
              en: Stdata Disk
              zh-cn: 数据接收盘
            Description: 主要是顺序读写,可选高效云盘、ssd盘、essd云盘。<b><font color='red'>推荐选择高效云盘</b></font>
            Items:
              - StdataDiskCategory
              - Key: StdataDiskSize
                ShowLabel: true
        Label:
          default:
            en: ECS
            zh-cn: 云服务器
      - Parameters:
          - CustomerId
          - DataSinkDomainName
          - QueryDomainName
        Label:
          default:
            zh-cn: 客户环境配置
            en: Environment Configurati

Metadata参数说明:

  • Items:定义某分组中的参数。

  • Label:定义分组的标签。

  • Description:定义分组的描述。

  • ShowLabel:是否显示分组内参数的标签。取值:

    • true:显示分组标签。

    • false(默认值):不显示分组标签。

  • Parameters:参数列表。取值:

    • Label:该分组的标签。

    • Description:该分组的描述。

参数组合展示示例

当您使用模板示例创建资源栈或资源栈组时,ROS控制台会将模板中的参数组合展示,使结构更紧凑。参数组合