One-click full clone of ECS

Introduction:


Resource Orchestration ROS is an easy-to-use cloud computing resource management and automated operation and maintenance service. Users describe the dependencies and configurations of multiple cloud computing resources through templates, and automatically complete the creation and configuration of all resources to achieve automated deployment, operation and maintenance, etc.

What is cloning?



If you're familiar with virtualization, you've probably heard of cloning. Cloning is to copy and generate another (or multiple) identical virtual machines based on the source virtual machine.

For ECS users of Alibaba Cloud, cloning is also a common scenario. For example, when you encounter insufficient inventory in one availability zone, you can choose to batch clone your ECS to another availability zone.

Before the release of Alibaba Cloud OOS operation and maintenance orchestration, cloning an ECS required multiple manual steps on the console, namely: log in to the console and select ECS, create an image, copy an image (optional), and create an instance from an image . Since there is no atomic API capability, if automated batch cloning is required, it is a rather complicated development task.

Specifically, the meaning of these parameters:

• Selected region: choose which region to clone the machine in, you can adjust the region through the previous step
Stack name: Specify the name of the ROS resource stack, which must be globally unique
• Creation timeout: Timeout for clone machines
• Failure rollback: After the clone machine fails, whether to delete other resources that were successfully created
• Source ECS Instance ID: the source ECS to be cloned
• ECS Login Password: Root login password for the cloned new machine
• Source ECS system disk ID: the system disk ID of the source ECS to be cloned
• Source ECS data disk ID: the data disk ID of the source ECS to be cloned
• Number of Cloned ECS: How many identical ECSs will be cloned

Detailed template

ROS implements one-click full cloning of ECS through templates. In this template, three resources are mainly used:
• ECS:Snapshot
• ECS:CustomImage
• ECS:InstanceGroupClone

ECS:Snapshot resource is used to make a snapshot of the disk;
ECS:CustomImage is used to make a system image based on the system disk snapshot; Finally, ECS:InstanceGroupClone is used to fully clone the ECS based on the system disk image and data disk snapshot.

Advanced: Cloning in the same region, one OpenAPI call to complete batch cloning

There is also a public template called "ACS-ECS-CloneInstancesAcrossAZ", which can replicate instances in the same region from one availability zone to another. You only need to enter the InstanceIds, regionId, targetZoneId and other information, and click Execute it. Cloning ECS in the same region is faster because the process of cross-region mirror copying is omitted.
What if you feel that the public template is not easy to use and you have your own customization needs? You can "clone" a public template, save it as your own custom template, and then edit it at will. For example, you can solidify some parameters into your template, so that you don't need to enter so much when you execute it next time complicated parameters.

Furthermore, if you don't like the input of instanceid one by one, you can customize the template, change it to specify the tag of ecs, and clone all ecs with the specified tag in batches. Even, you can clone all the ecs under your account in a certain region to another region. What if you want to integrate with your own operation and maintenance system? It is also relatively simple, you can trigger the execution of public templates and custom templates through openapi or sdk.

Summarize


ROS implements an automated, fast, and complete ECS clone solution based on templates. It can greatly improve everyone's operation and maintenance efficiency and reduce operation and maintenance errors.

Related Articles

Explore More Special Offers

  1. Short Message Service(SMS) & Mail Service

    50,000 email package starts as low as USD 1.99, 120 short messages start at only USD 1.00

phone Contact Us