通过ROS一键创建满足多可用区需求的ECS、SLB、RDS、ESS<资源编排服务>

本文涉及的产品
云数据库 RDS MySQL,集群系列 2核4GB
推荐场景:
搭建个人博客
RDS MySQL Serverless 基础系列,0.5-2RCU 50GB
传统型负载均衡 CLB,每月750个小时 15LCU
简介: 案例需求:在多个可用区创建多个ECS实例,弹性伸缩SLB、RDS、ECS资源 资源编排介绍: 简单介绍下:ROS 点击跳转关于ROS详细介绍 阿里云资源编排服务(ROS)可帮助用户简化云计算资源管理和自动化运维的服务。

案例需求:

在多个可用区创建多个ECS实例,弹性伸缩SLB、RDS、ECS资源。

资源编排介绍:

简单介绍下:ROS  ROS详细介绍
阿里云资源编排服务(ROS)可帮助用户简化云计算资源管理和自动化运维的服务。
用户遵循ROS定义的模板规范,编写模板文件,在模板中定义所需云计算资源的集合及资源间的依赖关系、资源配置细节等,ROS通过编排引擎自动完成所有资源的创建和配置,以达到自动化部署、运维的目的。

涉及资源类型简介:

ALIYUN::ECS::InstanceGroup: 用于创建一组 ECS 实例;详细介绍
ALIYUN::ECS::VSwitch:用于新建交换机;详细介绍
ALIYUN::ECS::VPC:用于新建专有网络;详细介绍
ALIYUN::ESS::ScalingGroup:用于创建伸缩组;详细介绍
ALIYUN::RDS::DBInstance:用于创建数据库实例;详细介绍
ALIYUN::SLB::LoadBalancer:用于创建负载均衡;详细介绍
ALIYUN::SLB::Listener:用于创建负载均衡监听器;详细介绍
ALIYUN::SLB::BackendServerAttachment:用于添加后端服务器;详细介绍
ALIYUN::ESS::ScalingConfiguration:用于创建伸缩配置;详细介绍
ALIYUN::ESS::ScalingGroupEnable:用于启用伸缩组;详细介绍

方案介绍:

相信大家熟知传统的交换网络,下图采用阿里云VPC产品的示意图,可以看出如果需要在多个可用区域创建资源,可采取下面的方式,创建一个VPC(专有网络),接下来创建多个VSwitch(虚拟交换机),可以完成将多个资源部署在多个可用区域内的:_1_zone_001_jpeg




注意:
本文代码示例完成双可用区创建资源栈;__关于模版代码中的参数具体含义就不一一介绍了, 详情请参考<涉及资源类型简介>。
资源栈感性理解:通过ROS模版的方式创建出一个或多个资源的集合。
   

需求拆分

  • 创建多个虚拟交换机完成多可用区需求,此处举例创建一个VSwitch:
"VSwitch1": {
  "Type": "ALIYUN::ECS::VSwitch",
  "DependsOn": "Vpc",
  "Properties": {
    "VSwitchName": {
      "Ref": "VSwitch1Name"
    },
    "VpcId": {
      "Ref": "Vpc"
    },
    "CidrBlock": {
      "Ref": "VSW1CidrBlock"
    },
    "Description": {
      "Ref": "VSW1Description"
    },
    "ZoneId": {
      "Ref": "VSW1ZoneId"
    }
  }
}
  • 创建多个ECS实例完成多ECS实例创建的需求,此处举例创建一组ECS实例,并将其部署与一个可用区,同样第二个可用区也创建一组ECS实例:
"EcsInstanceGroup1": {
  "Type": "ALIYUN::ECS::InstanceGroup",
  "DependsOn": "VSwitch1",
  "Properties": {
    "IoOptimized": "optimized",
    "ImageId": {
      "Ref": "EcsGroupImageId"
    },
    "SecurityGroupId": {
      "Ref": "SG"
    },
    "Password": {
      "Ref": "EcsPassword"
    },
    "MinAmount": {
      "Ref": "EcsGroup1MaxAmount"
    },
    "AllocatePublicIP": "false",
    "SystemDiskCategory": {
      "Ref": "EcsSystemDiskCategory"
    },
    "MaxAmount": {
      "Ref": "EcsGroup1MaxAmount"
    },
    "VSwitchId": {
      "Fn::GetAtt": [
        "VSwitch1",
        "VSwitchId"
      ]
    },
    "VpcId": {
      "Ref": "Vpc"
    },
    "InstanceType": {
      "Ref": "EcsGroupInstanceType"
    }
  }
}
  • 创建弹性伸缩组完成,将RDS和SLB实例都加入到组内,代码示例如下:
"ScalingGroup": {
  "Type": "ALIYUN::ESS::ScalingGroup",
  "DependsOn": "CreateListener",
  "Properties": {
    "DBInstanceIds": [
      {
        "Fn::GetAtt": [
          "Database",
          "DBInstanceId"
        ]
      }
    ],
    "DefaultCooldown": {
      "Ref": "EssDefaultCooldown"
    },
    "LoadBalancerIds": [
      {
        "Fn::GetAtt": [
          "LoadBalancer",
          "LoadBalancerId"
        ]
      }
    ],
    "MaxSize": {
      "Ref": "EssMaxSize"
    },
    "MinSize": {
      "Ref": "EssMinSize"
    },
    "VpcId": {
      "Ref": "Vpc"
    },
    "VSwitchIds": [
      {
        "Fn::GetAtt": [
          "VSwitch1",
          "VSwitchId"
        ]
      },
      {
        "Fn::GetAtt": [
          "VSwitch2",
          "VSwitchId"
        ]
      }
    ]
  }
}
  • 将创建的所有ECS实例,在启用伸缩组时候加入到伸缩组内,代码示例如下:
"ScalingGroupEnable": {
  "Type": "ALIYUN::ESS::ScalingGroupEnable",
  "DependsOn": "ScalingGroup",
  "Properties": {
    "ScalingGroupId": {
      "Fn::GetAtt": [
        "ScalingGroup",
        "ScalingGroupId"
      ]
    },
    "ScalingConfigurationId": {
      "Fn::GetAtt": [
        "ScalingConfiguration",
        "ScalingConfigurationId"
      ]
    },
    "InstanceIds": {
      "Fn::ListMerge": [
        {
          "Fn::GetAtt": [
            "EcsInstanceGroup1",
            "InstanceIds"
          ]
        },
        {
          "Fn::GetAtt": [
            "EcsInstanceGroup2",
            "InstanceIds"
          ]
        }
      ]
    }
  }
}
  • 创建需要的单个资源,如RDS、SLB资源,代码详见<相关模版>。

总结:

使用阿里云资源编排服务 ,不需要支付额外的费用。
传统部署打造一个这样的环境,还是需要一定物力、人力、时间的,利用本文中提供的ROS模板,可以很好,很方便的帮你一键部署此类环境,让你把更多的精力放在自己的业务上。
资源编排服务

相关模板

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Description": "Create Multi-ECS And Scaling Group And Rds And Slb In Double Zone.",
  "Conditions": {
    "CreateInstacneGroup2": {
      "Fn::Not": {
        "Fn::Equals": [
          0,
          {
            "Ref": "EcsGroup2MaxAmount"
          }
        ]
      }
    }
  },
  "Resources": {
    "Vpc": {
      "Type": "ALIYUN::ECS::VPC",
      "Properties": {
        "VpcName": {
          "Ref": "VpcName"
        },
        "CidrBlock": {
          "Ref": "VPCCidrBlock"
        },
        "Description": {
          "Ref": "VPCDescription"
        }
      }
    },
    "VSwitch1": {
      "Type": "ALIYUN::ECS::VSwitch",
      "DependsOn": "Vpc",
      "Properties": {
        "VSwitchName": {
          "Ref": "VSwitch1Name"
        },
        "VpcId": {
          "Ref": "Vpc"
        },
        "CidrBlock": {
          "Ref": "VSW1CidrBlock"
        },
        "Description": {
          "Ref": "VSW1Description"
        },
        "ZoneId": {
          "Ref": "VSW1ZoneId"
        }
      }
    },
    "VSwitch2": {
      "Type": "ALIYUN::ECS::VSwitch",
      "DependsOn": "Vpc",
      "Properties": {
        "VSwitchName": {
          "Ref": "VSwitch2Name"
        },
        "VpcId": {
          "Ref": "Vpc"
        },
        "CidrBlock": {
          "Ref": "VSW2CidrBlock"
        },
        "Description": {
          "Ref": "VSW2Description"
        },
        "ZoneId": {
          "Ref": "VSW2ZoneId"
        }
      }
    },
    "SG": {
      "Type": "ALIYUN::ECS::SecurityGroup",
      "DependsOn": "Vpc",
      "Properties": {
        "VpcId": {
          "Ref": "Vpc"
        },
        "SecurityGroupName": "mysg",
        "SecurityGroupIngress": [
          {
            "PortRange": "-1/-1",
            "Priority": 1,
            "SourceCidrIp": "0.0.0.0/0",
            "IpProtocol": "all",
            "NicType": "intranet"
          }
        ],
        "SecurityGroupEgress": [
          {
            "PortRange": "-1/-1",
            "Priority": 1,
            "IpProtocol": "all",
            "DestCidrIp": "0.0.0.0/0",
            "NicType": "intranet"
          }
        ]
      }
    },
    "EcsInstanceGroup1": {
      "Type": "ALIYUN::ECS::InstanceGroup",
      "DependsOn": "VSwitch1",
      "Properties": {
        "IoOptimized": "optimized",
        "ImageId": {
          "Ref": "EcsGroupImageId"
        },
        "SecurityGroupId": {
          "Ref": "SG"
        },
        "Password": {
          "Ref": "EcsPassword"
        },
        "MinAmount": {
          "Ref": "EcsGroup1MaxAmount"
        },
        "AllocatePublicIP": "false",
        "SystemDiskCategory": {
          "Ref": "EcsSystemDiskCategory"
        },
        "MaxAmount": {
          "Ref": "EcsGroup1MaxAmount"
        },
        "VSwitchId": {
          "Fn::GetAtt": [
            "VSwitch1",
            "VSwitchId"
          ]
        },
        "VpcId": {
          "Ref": "Vpc"
        },
        "InstanceType": {
          "Ref": "EcsGroupInstanceType"
        }
      }
    },
    "EcsInstanceGroup2": {
      "Type": "ALIYUN::ECS::InstanceGroup",
      "DependsOn": "VSwitch2",
      "Condition": "CreateInstacneGroup2",
      "Properties": {
        "IoOptimized": "optimized",
        "ImageId": {
          "Ref": "EcsGroupImageId"
        },
        "SecurityGroupId": {
          "Ref": "SG"
        },
        "Password": {
          "Ref": "EcsPassword"
        },
        "MinAmount": {
          "Ref": "EcsGroup2MaxAmount"
        },
        "AllocatePublicIP": "false",
        "SystemDiskCategory": {
          "Ref": "EcsSystemDiskCategory"
        },
        "MaxAmount": {
          "Ref": "EcsGroup2MaxAmount"
        },
        "VSwitchId": {
          "Fn::GetAtt": [
            "VSwitch2",
            "VSwitchId"
          ]
        },
        "VpcId": {
          "Ref": "Vpc"
        },
        "InstanceType": {
          "Ref": "EcsGroupInstanceType"
        }
      }
    },
    "ScalingGroup": {
      "Type": "ALIYUN::ESS::ScalingGroup",
      "DependsOn": "CreateListener",
      "Properties": {
        "DBInstanceIds": [
          {
            "Fn::GetAtt": [
              "Database",
              "DBInstanceId"
            ]
          }
        ],
        "DefaultCooldown": {
          "Ref": "EssDefaultCooldown"
        },
        "LoadBalancerIds": [
          {
            "Fn::GetAtt": [
              "LoadBalancer",
              "LoadBalancerId"
            ]
          }
        ],
        "MaxSize": {
          "Ref": "EssMaxSize"
        },
        "MinSize": {
          "Ref": "EssMinSize"
        },
        "VpcId": {
          "Ref": "Vpc"
        },
        "VSwitchIds": [
          {
            "Fn::GetAtt": [
              "VSwitch1",
              "VSwitchId"
            ]
          },
          {
            "Fn::GetAtt": [
              "VSwitch2",
              "VSwitchId"
            ]
          }
        ]
      }
    },
    "Database": {
      "Type": "ALIYUN::RDS::DBInstance",
      "DependOn": "EcsInstanceGroup1",
      "Properties": {
        "DBInstanceClass": {
          "Ref": "RdsDBInstanceClass"
        },
        "DBInstanceNetType": {
          "Ref": "RdsDBInstanceNetType"
        },
        "DBInstanceStorage": {
          "Ref": "RdsDBInstanceStorage"
        },
        "Engine": {
          "Ref": "RdsEngine"
        },
        "EngineVersion": {
          "Ref": "RdsEngineVersion"
        },
        "SecurityIPList": {
          "Ref": "RdsSecurityIPList"
        },
        "VpcId": {
          "Ref": "Vpc"
        },
        "VSwitchId": {
          "Fn::GetAtt": [
            "VSwitch1",
            "VSwitchId"
          ]
        }
      }
    },
    "LoadBalancer": {
      "Type": "ALIYUN::SLB::LoadBalancer",
      "Properties": {
        "AddressType": "internet"
      }
    },
    "CreateListener": {
      "Type": "ALIYUN::SLB::Listener",
      "DependOn": "LoadBalancer",
      "Properties": {
        "BackendServerPort": 8080,
        "Bandwidth": 50,
        "ListenerPort": "80",
        "LoadBalancerId": {
          "Ref": "LoadBalancer"
        },
        "Protocol": "http",
        "Scheduler": "wrr"
      }
    },
    "Attachment": {
      "Type": "ALIYUN::SLB::BackendServerAttachment",
      "DependOn": "Database",
      "Properties": {
        "BackendServerList": {
          "Fn::ListMerge": [
            {
              "Fn::GetAtt": [
                "EcsInstanceGroup1",
                "InstanceIds"
              ]
            },
            {
              "Fn::GetAtt": [
                "EcsInstanceGroup2",
                "InstanceIds"
              ]
            }
          ]
        },
        "LoadBalancerId": {
          "Ref": "LoadBalancer"
        }
      }
    },
    "ScalingConfiguration": {
      "Type": "ALIYUN::ESS::ScalingConfiguration",
      "Properties": {
        "DiskMappings": [
          {
            "Category": "cloud_efficiency",
            "Device": "/dev/xvdb",
            "Size": 100
          }
        ],
        "SystemDisk_Category": "cloud_efficiency",
        "ScalingGroupId": {
          "Fn::GetAtt": [
            "ScalingGroup",
            "ScalingGroupId"
          ]
        },
        "SecurityGroupId": {
          "Fn::GetAtt": [
            "SG",
            "SecurityGroupId"
          ]
        },
        "UserData": {
          "Fn::Join": [
            "",
            [
              "#!/bin/sh\n",
              "echo \"nihao\" > /tmp/test_result.log\n"
            ]
          ]
        },
        "ImageId": {
          "Ref": "EcsGroupImageId"
        },
        "InstanceType": {
          "Ref": "EcsGroupInstanceType"
        }
      }
    },
    "ScalingGroupEnable": {
      "Type": "ALIYUN::ESS::ScalingGroupEnable",
      "DependsOn": "ScalingGroup",
      "Properties": {
        "ScalingGroupId": {
          "Fn::GetAtt": [
            "ScalingGroup",
            "ScalingGroupId"
          ]
        },
        "ScalingConfigurationId": {
          "Fn::GetAtt": [
            "ScalingConfiguration",
            "ScalingConfigurationId"
          ]
        },
        "InstanceIds": {
          "Fn::ListMerge": [
            {
              "Fn::GetAtt": [
                "EcsInstanceGroup1",
                "InstanceIds"
              ]
            },
            {
              "Fn::GetAtt": [
                "EcsInstanceGroup2",
                "InstanceIds"
              ]
            }
          ]
        }
      }
    }
  },
  "Parameters": {
    "VpcName": {
      "Type": "String",
      "Label": "Name For Create VPC",
      "Description": "Display name of the vpc instance, [2, 128] English or Chinese characters, must start with a letter or Chinese in size, can contain numbers, '_' or '.', '-'",
      "Default": "TwoAvailableZonesVPC"
    },
    "VPCCidrBlock": {
      "Type": "String",
      "Label": "The VPC Cidrblock",
      "Description": "The IP address range of the VPC in the CIDR block form. You can use the following IP address ranges and their subnets:\n10.0.0.0/8\n172.16.0.0/12 (Default)\n192.168.0.0/16",
      "Default": "192.168.0.0/16"
    },
    "VPCDescription": {
      "Type": "String",
      "Label": "The Description Of VPC",
      "Description": "Description of the vpc, [2, 256] characters. Do not fill or empty, the default is empty.",
      "Default": "Description of the two available zones VPC"
    },
    "VSwitch1Name": {
      "Type": "String",
      "Label": "Name For Create Zone 1 VSwitch",
      "Description": "Display name of the vSwitch instance, [2, 128] English or Chinese characters, must start with a letter or Chinese in size, can contain numbers, '_' or '.', '-'",
      "Default": "Zone1VSitchName"
    },
    "VSW1CidrBlock": {
      "Type": "String",
      "Label": "The VSwitch 1 Cidrblock",
      "Description": "CIDR Block of created VSwitch, It must belong to itself VPC CIDR block.",
      "Default": "192.168.1.0/24"
    },
    "VSW1Description": {
      "Type": "String",
      "Label": "The Description Of The Zone 1 VSwitch",
      "Description": "Description of the VSwitch, [2, 256] characters. Do not fill or empty, the default is empty.",
      "Default": "Description of the available zone 1 VSwitch"
    },
    "VSW1ZoneId": {
      "Type": "String",
      "Label": " The VSwitch 1 Available Zone ID",
      "Description": "VSwitch Available Zone ID, <a href='#/product/cn-beijing/list/zoneList' target='_blank'>View zoneid info</a>"
    },
    "VSwitch2Name": {
      "Type": "String",
      "Label": "Name For Create Zone 2 VSwitch",
      "Description": "Display name of the vSwitch instance, [2, 128] English or Chinese characters, must start with a letter or Chinese in size, can contain numbers, '_' or '.', '-'",
      "Default": "Zone2VSitchName"
    },
    "VSW2CidrBlock": {
      "Type": "String",
      "Label": "The VSwitch 2 Cidrblock",
      "Description": "CIDR Block of created VSwitch, It must belong to itself VPC CIDR block.",
      "Default": "192.168.2.0/24"
    },
    "VSW2Description": {
      "Type": "String",
      "Label": "The Description Of The Zone 2 VSwitch",
      "Description": "Description of the VSwitch, [2, 256] characters. Do not fill or empty, the default is empty.",
      "Default": "Description of the available zone 2 VSwitch"
    },
    "VSW2ZoneId": {
      "Type": "String",
      "Label": "The VSwitch 2 Available Zone ID",
      "Description": "VSwitch Available Zone ID, <a href='#/product/cn-beijing/list/zoneList' target='_blank'>View zoneid info</a>"
    },
    "EcsGroupImageId": {
      "Type": "String",
      "Label": "Ecs Image Id",
      "Description": "Image Id, represents the image resource to startup the ECS instance, <a href='#/product/cn-beijing/list/imageList' target='_blank'>View image resources</a>",
      "Default": "centos_7_04_64_20G_alibase_201701015.vhd"
    },
    "EcsGroupInstanceType": {
      "Type": "String",
      "Label": "Ecs Instance type",
      "Description": "The ECS instance type, <a href='#/product/cn-beijing/list/typeList' target='_blank'>View instance types</a>",
      "Default": "ecs.c5.large",
      "AllowedValues": [
        "ecs.c5.large",
        "ecs.c5.xlarge",
        "ecs.g5.large",
        "ecs.g5.xlarge"
      ]
    },
    "EcsPassword": {
      "Type": "String",
      "Label": "Ecs Password",
      "ConstraintDescription": "[8, 30] characters, consists of 3 types of uppercase letter, lowercase letter, number or special characters.",
      "Description": "The login password of ECS instance",
      "MaxLength": 30,
      "MinLength": 8,
      "NoEcho": true,
      "Confirm": true
    },
    "EcsSystemDiskCategory": {
      "Type": "String",
      "Label": "Ecs System Disk Category",
      "Description": "System disk category: efficient cloud disk(cloud_efficiency) or SSD cloud disk(cloud_ssd)",
      "Default": "cloud_ssd",
      "AllowedValues": [
        "cloud_efficiency",
        "cloud_ssd"
      ]
    },
    "EssDefaultCooldown": {
      "Type": "Number",
      "Label": "The Default Cooldown",
      "Description": "The Default cooldown in seconds",
      "Default": 300
    },
    "EcsGroup1MaxAmount": {
      "Type": "Number",
      "Description": "The number of Ecs Group1 instance.",
      "Label": "Number of Ecs Group1 instance",
      "Default": 2,
      "AllowedValues": [
        1,
        2,
        3,
        4,
        5,
        6,
        7,
        8,
        9,
        10
      ]
    },
    "EcsGroup2MaxAmount": {
      "Type": "Number",
      "Label": "Number of Ecs Group2 instance",
      "Description": "The number of Ecs Group2 iinstance.",
      "Default": 2,
      "AllowedValues": [
        0,
        1,
        2,
        3,
        4,
        5,
        6,
        7,
        8,
        9,
        10
      ]
    },
    "EssMaxSize": {
      "Type": "Number",
      "Label": "The Max Number Of ECS In Scaling Group",
      "Description": "The maximum of ECS instances in scaling group",
      "MaxValue": 100,
      "MinValue": 1,
      "Default": 20
    },
    "EssMinSize": {
      "Type": "Number",
      "Label": "The Min Number Of ECS In Scaling Group",
      "Description": "The minimum of ECS instances in scaling group",
      "MaxValue": 100,
      "MinValue": 1,
      "Default": 1
    },
    "RdsDBInstanceClass": {
      "Type": "String",
      "Label": "Rds Instance Class",
      "Description": "Database instance type. Refer the RDS database instance type,<a href='https://help.aliyun.com/document_detail/26312.html' target='_blank'>View RDS resources type</a>",
      "AllowedValues": [
        "rds.mysql.t1.small",
        "rds.mysql.s1.small",
        "rds.mysql.s2.large",
        "rds.mysql.s2.xlarge",
        "rds.mysql.s3.large",
        "rds.mysql.m1.medium",
        "rds.mysql.c1.large",
        "rds.mysql.c1.xlarge",
        "rds.mysql.c2.xlarge",
        "rds.mysql.c2.xlp2"
      ],
      "Default": "rds.mysql.t1.small"
    },
    "RdsDBInstanceNetType": {
      "Type": "String",
      "Label": "Database Instance Net Type",
      "Description": "Database instance net type, default is Intranet.Internet for public access, Intranet for private access.",
      "AllowedValues": [
        "Internet",
        "Intranet"
      ],
      "Default": "Intranet"
    },
    "RdsDBInstanceStorage": {
      "Type": "Number",
      "Label": "Database Instance Storage Size",
      "Description": "Incrementing in every 5G, unit: GB",
      "ConstraintDescription": "Incrementing in every 5G, unit: GB",
      "MaxValue": 2000,
      "MinValue": 5,
      "Default": 10
    },
    "RdsEngine": {
      "Type": "String",
      "Label": "Database Instance Engine Type",
      "Description": "Database instance engine type. Support MySQL/SQLServer/PostgreSQL/PPAS/MariaDB now.",
      "AllowedValues": [
        "MySQL",
        "SQLServer",
        "PostgreSQL",
        "PPAS"
      ],
      "Default": "MySQL"
    },
    "RdsEngineVersion": {
      "Type": "String",
      "Label": "Database Engine Version",
      "AllowedValues": [
        "5.5",
        "5.6",
        "2008r2",
        "9.4",
        "9.3"
      ],
      "Description": "MySQL:5.5/5.6; SQLServer:2008r2; PostgreSQL:9.4; PPAS:9.3",
      "Default": "5.6"
    },
    "RdsSecurityIPList": {
      "Type": "String",
      "Label": "Security Ip To access The Database",
      "Description": "The ECS instances IP list access database, separated by commas, do not be repeated",
      "Default": "0.0.0.0/0"
    }
  },
  "Outputs": {
    "RouteTableId": {
      "Description": "The router table id of created VPC.",
      "Value": {
        "Fn::GetAtt": [
          "Vpc",
          "RouteTableId"
        ]
      }
    },
    "VpcId": {
      "Description": "Id of created VPC.",
      "Value": {
        "Fn::GetAtt": [
          "Vpc",
          "VpcId"
        ]
      }
    },
    "VRouterId": {
      "Description": "Router id of created VPC.",
      "Value": {
        "Fn::GetAtt": [
          "Vpc",
          "VRouterId"
        ]
      }
    },
    "VSwitchId1": {
      "Description": "Id of created VSwitch1.",
      "Value": {
        "Fn::GetAtt": [
          "VSwitch1",
          "VSwitchId"
        ]
      }
    },
    "VSwitchId2": {
      "Description": "Id of created VSwitch2.",
      "Value": {
        "Fn::GetAtt": [
          "VSwitch2",
          "VSwitchId"
        ]
      }
    },
    "SecurityGroupId": {
      "Description": "The Security group id.",
      "Value": {
        "Fn::GetAtt": [
          "SG",
          "SecurityGroupId"
        ]
      }
    },
    "BackendServerList": {
      "Description": "Backend server list",
      "Value": {
        "Fn::ListMerge": [
          {
            "Fn::GetAtt": [
              "EcsInstanceGroup1",
              "InstanceIds"
            ]
          },
          {
            "Fn::GetAtt": [
              "EcsInstanceGroup2",
              "InstanceIds"
            ]
          }
        ]
      }
    }
  }
}
相关实践学习
2分钟自动化部署人生模拟器
本场景将带你借助云效流水线Flow实现人生模拟器小游戏的自动化部署
7天玩转云服务器
云服务器ECS(Elastic Compute Service)是一种弹性可伸缩的计算服务,可降低 IT 成本,提升运维效率。本课程手把手带你了解ECS、掌握基本操作、动手实操快照管理、镜像管理等。了解产品详情:&nbsp;https://www.aliyun.com/product/ecs
目录
相关文章
|
1月前
|
弹性计算 监控 负载均衡
|
3月前
|
NoSQL Redis Windows
windows服务器重装系统之后,Redis服务如何恢复?
windows服务器重装系统之后,Redis服务如何恢复?
75 6
|
2月前
|
Prometheus Kubernetes 监控
k8s部署针对外部服务器的prometheus服务
通过上述步骤,您不仅成功地在Kubernetes集群内部署了Prometheus,还实现了对集群外服务器的有效监控。理解并实施网络配置是关键,确保监控数据的准确无误传输。随着监控需求的增长,您还可以进一步探索Prometheus生态中的其他组件,如Alertmanager、Grafana等,以构建完整的监控与报警体系。
135 60
|
2月前
|
Prometheus Kubernetes 监控
k8s部署针对外部服务器的prometheus服务
通过上述步骤,您不仅成功地在Kubernetes集群内部署了Prometheus,还实现了对集群外服务器的有效监控。理解并实施网络配置是关键,确保监控数据的准确无误传输。随着监控需求的增长,您还可以进一步探索Prometheus生态中的其他组件,如Alertmanager、Grafana等,以构建完整的监控与报警体系。
269 62
|
1月前
|
弹性计算 人工智能 数据安全/隐私保护
【手把手教你】如何免费畅快使用阿里云ECS搭建私有Overleaf论文写作服务
本文详细介绍如何利用阿里云ECS免费搭建私有Overleaf论文写作服务,包括ECS服务器的部署、Overleaf服务的安装、TexLive包的更新、XeLaTeX修复、中文字体支持及账号管理等步骤。通过这些操作,你可以实现免费且高效的多人协作论文写作,避免付费版本的高昂费用。适合需要频繁合作撰写论文的团队使用。
105 1
【手把手教你】如何免费畅快使用阿里云ECS搭建私有Overleaf论文写作服务
|
26天前
|
弹性计算 监控 容灾
阿里云ECS提供强大的云上灾备解决方案,通过高可用基础设施、多样的数据备份方式及异地灾备服务,帮助企业实现业务的持续稳定运行
在数字化时代,企业对信息技术的依赖加深,确保业务连续性至关重要。阿里云ECS提供强大的云上灾备解决方案,通过高可用基础设施、多样的数据备份方式及异地灾备服务,帮助企业实现业务的持续稳定运行。无论是小型企业还是大型企业,都能从中受益,确保在面对各种风险时保持业务稳定。
42 4
|
1月前
|
Linux 数据库
Linux服务如何实现服务器重启后的服务延迟自启动?
【10月更文挑战第25天】Linux服务如何实现服务器重启后的服务延迟自启动?
254 3
|
2月前
|
SQL 存储 数据管理
Hadoop-15-Hive 元数据管理与存储 Metadata 内嵌模式 本地模式 远程模式 集群规划配置 启动服务 3节点云服务器实测
Hadoop-15-Hive 元数据管理与存储 Metadata 内嵌模式 本地模式 远程模式 集群规划配置 启动服务 3节点云服务器实测
64 2
|
3月前
|
Java 应用服务中间件 Windows
windows服务器重装系统之后,Tomcat服务如何恢复?
windows服务器重装系统之后,Tomcat服务如何恢复?
66 10
|
3月前
|
消息中间件 Java Kafka
windows服务器重装系统之后,Kafka服务如何恢复?
windows服务器重装系统之后,Kafka服务如何恢复?
37 8

推荐镜像

更多
下一篇
DataWorks