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

本文涉及的产品
云数据库 RDS MySQL,集群系列 2核4GB
推荐场景:
搭建个人博客
传统型负载均衡 CLB,每月750个小时 15LCU
RDS MySQL Serverless 基础系列,0.5-2RCU 50GB
简介: 案例需求:在多个可用区创建多个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"
            ]
          }
        ]
      }
    }
  }
}
相关实践学习
借助OSS搭建在线教育视频课程分享网站
本教程介绍如何基于云服务器ECS和对象存储OSS,搭建一个在线教育视频课程分享网站。
7天玩转云服务器
云服务器ECS(Elastic Compute Service)是一种弹性可伸缩的计算服务,可降低 IT 成本,提升运维效率。本课程手把手带你了解ECS、掌握基本操作、动手实操快照管理、镜像管理等。了解产品详情:&nbsp;https://www.aliyun.com/product/ecs
目录
相关文章
|
24天前
|
弹性计算 持续交付 API
基于 ROS 的Terraform托管服务轻松部署ChatGLM-6B
文章介绍了如何利用ROS和Terraform模板轻松自动化部署基于GLM架构、优化中文对话的ChatGLM-6B模型至阿里云,提高了部署效率与便捷性,适用于多种应用场景,且模型部署过程详细,彰显了基础设施即代码(IaC)的优势。
33 3
基于 ROS 的Terraform托管服务轻松部署ChatGLM-6B
|
24天前
|
弹性计算 人工智能 持续交付
基于 ROS 的Terraform托管服务轻松部署Qwen-7B-Chat
文章介绍了如何利用ROS和Terraform模板轻松自动化部署阿里云的Qwen-7B-Chat大语言模型服务,提高了部署效率与便捷性,是实现云资源和服务快速上线的最佳实践。
44 2
基于 ROS 的Terraform托管服务轻松部署Qwen-7B-Chat
|
9天前
|
SQL JavaScript 关系型数据库
Node服务连接Mysql数据库
本文介绍了如何在Node服务中连接MySQL数据库,并实现心跳包连接机制。
23 0
Node服务连接Mysql数据库
|
2月前
|
机器人 Shell Python
ROS2教程05 ROS2服务
这篇文章是关于ROS2(Robot Operating System 2)服务的教程,涵盖了服务的概念、特性、命令行工具的使用,以及如何编写服务的服务器和客户端代码,并提供了测试服务通信机制的示例。
46 4
ROS2教程05 ROS2服务
|
2月前
|
机器人
ROS2教程 05 服务Service
本文是关于ROS2(机器人操作系统2)中服务(Service)机制的教程,介绍了服务与话题(Topic)的区别、ROS2服务的相关命令,包括列出服务、查找服务、获取服务类型和调用服务,并通过示例代码展示了如何创建服务端(Server)和客户端(Client),以及如何测试服务调用过程。
89 0
ROS2教程 05 服务Service
|
2月前
|
关系型数据库 MySQL Java
【Azure 应用服务】App Service 无法连接到Azure MySQL服务,报错:com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure
【Azure 应用服务】App Service 无法连接到Azure MySQL服务,报错:com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure
142 0
|
2月前
|
Kubernetes 关系型数据库 MySQL
k8s练习--通过NFS+PV+PVC+POD,部署一个MySQL服务,并将MySQL的数据进行持久化存储
本文档介绍了如何使用Kubernetes (K8s)、NFS、PersistentVolume (PV)、PersistentVolumeClaim (PVC)和Pod来部署并实现MySQL服务的数据持久化存储。Kubernetes是一个用于自动化部署、扩展和管理容器化应用的强大平台。NFS作为一种网络文件系统协议,能够使Kubernetes集群中的Pod跨节点访问共享文件。PV和PVC机制则提供了持久化的存储解决方案,确保数据即使在Pod生命周期结束后仍得以保留。
|
2月前
|
SQL Oracle 关系型数据库
实时计算 Flink版产品使用问题之连接到MySQL的从库时遇到其他服务也连接到了从库,该如何处理
实时计算Flink版作为一种强大的流处理和批处理统一的计算框架,广泛应用于各种需要实时数据处理和分析的场景。实时计算Flink版通常结合SQL接口、DataStream API、以及与上下游数据源和存储系统的丰富连接器,提供了一套全面的解决方案,以应对各种实时计算需求。其低延迟、高吞吐、容错性强的特点,使其成为众多企业和组织实时数据处理首选的技术平台。以下是实时计算Flink版的一些典型使用合集。
|
3月前
|
机器人 Shell 开发者
`roslibpy`是一个Python库,它允许非ROS(Robot Operating System)环境(如Web浏览器、移动应用等)与ROS环境进行交互。通过使用`roslibpy`,开发者可以编写Python代码来远程控制ROS节点,发布和订阅话题,以及调用服务。
`roslibpy`是一个Python库,它允许非ROS(Robot Operating System)环境(如Web浏览器、移动应用等)与ROS环境进行交互。通过使用`roslibpy`,开发者可以编写Python代码来远程控制ROS节点,发布和订阅话题,以及调用服务。
|
4月前
|
弹性计算 API 持续交付
基于 ROS 的 Terraform 托管服务轻松部署文本转语音系统 ChatTTS
基于 IaC 的理念,通过定义一个模板,使用 ROS 提供的 Terraform 托管服务进行自动化部署,可以非常高效快捷地部署任意云资源和应用(比如 ChatTTS 服务)。相比于手动部署或者通过 API、SDK 的部署方式,有着高效、稳定等诸多优势,也是服务上云的最佳实践。
54 1
基于 ROS 的 Terraform 托管服务轻松部署文本转语音系统 ChatTTS

热门文章

最新文章

推荐镜像

更多
下一篇
无影云桌面