The visual editor is a tool in ROS that simplifies template creation. You can drag and drop resources onto a canvas and connect them to visually define their relationships. This visual approach helps you avoid the complex syntax and common errors of writing templates by hand.
Background information
This topic demonstrates how to use the visual editor to create a template for an instance group within a VPC. This example creates the following resources:
-
One VPC
-
One vSwitch
-
One security group
-
One instance group
For more information about the resource types, see Resource Type Reference.
Procedure
-
Log on to the Resource Orchestration Service console.
-
In the navigation pane on the left, click visual editor.
-
Click Create Architecture Diagram Template to create resources.
-
Create an availability zone.
In the search box above the navigation pane on the left, search for availability zone, and then drag Single-zone Network onto the canvas.
This automatically creates a VPC and a vSwitch.
By default, the VPC has a CIDR block of
10.0.0.0/8, and the vSwitch has a CIDR block of10.0.0.0/24. -
Create an instance group.
In the search box above the navigation pane on the left, search for instance group and drag instance group onto the canvas.
Because an instance group depends on a Security Group, a Security Group is also automatically created.
-
-
Edit the template.
After you create resources and establish a dependency structure, the template automatically generates some property definitions. You can then add other properties. This section uses region and instance group as an example.
-
On the canvas, click the region module and select a region in the Properties pane on the right.
For example, select China (Chengdu) as the deployment region.
-
On the canvas, click the instance group. In the Properties pane on the right, find the property that you want to add, such as billing method, and configure it as needed.
The supported options for billing method are pay-as-you-go and subscription. In the Network Configuration section, you can select VPC or Classic Network as the network type for the ECS instance and configure the corresponding VPC ID.
-
-
Use the top toolbar to Rename the template or perform other operations.
Other operations include Save Changes, New Architecture Diagram, Import Template, Export as Image, and Export as Template File.
-
(Optional) You can also use this template to create a stack.
-
In the upper-right corner, click Deployment. Select a template type, either ROS or Terraform, enter a resource Name, and then click Next.
-
On the Price Preview page, confirm the cost and then click Create.
-
Stack creation begins. The creation status is updated in real time in the Event section.
After the VPC, security group, and vSwitch are created in sequence, the creation of the instance group begins.
-
After the stack is created, you can click the Stack ID to go to the Resource Orchestration Service console and view detailed information.
-