Updated on 2023-04-20 GMT+08:00

Compiling a Template to Create an EVS Disk

This section describes how to compile a template on the Visual Designer to create an EVS disk. At the end of this walkthrough, you will see the newly created EVS disk on the Cloud Server Console, as shown in Figure 1.

Figure 1 Created EVS disk
  1. Step 1: Use the Visual Designer to Compile a Template: Use the Visual Designer to add elements and configure parameters for each element.
  2. Step 2: Create an EVS Disk: Use the Visual Designer to create an ECS, a VPC, and a subnet.
  3. Step 3: Delete Unnecessary Resources: Delete unnecessary stacks to avoid unwanted charges.

Step 1: Use the Visual Designer to Compile a Template

  1. Log in to the RFS console. In the navigation pane on the left, click Visual Designer.
  2. Add and connect elements. Drag elements, such as VPC, VPC subnet, and EVS, to the canvas, and establish relationships between them, as shown in Figure 2.

    Figure 2 Adding an element

  3. Configure the template parameters. Set the attributes in the Attribute Editing Panel panel on the right.

    1. Click the vpc element in the canvas. The attributes of the element will be automatically displayed in the attribute pane. The CIDR can use the default value 192.168.0.0/16.
    1. Click the subnet element in the canvas. The attributes of the element will be automatically displayed in the attribute pane. You can set the default value for the attributes.
    2. Click the evs element in the canvas. The attributes of the element will be automatically displayed in the attribute pane. The attributes with red text boxes are mandatory, as shown in Figure 3.
      Figure 3 Mandatory attributes

      To facilitate parameter setting and modification, you are advised to set parameters whose value needs to be frequently changed as input parameters. get_input indicates input parameters. You can define the values behind get_input.

    3. Click on the right of the attribute editing panel to generate an input parameter, as shown in Figure 4.
      Figure 4 Generating an input parameter

  4. Click Save Template in the upper right corner of the Visual Designer to save the template. If the message "Template saved. You can view and manage it in My Templates." is displayed, the template is saved.

    Figure 5 Saving a template

Step 2: Create an EVS Disk

  1. Close the Visual Designer and go to the RFS console.
  2. In the navigation pane on the left, click Templates > My Templates. The template is displayed in the template list.
  3. Click Create Stack in the Operation column of the template.
  4. Click Next to view the stack information. After confirming the information, click Next, select an agency, click Next, and click Create Execution Plan.

    The Execution Plans tab page is displayed, click Deploy in the Operation column of the execution plan.

  5. When the status of the plan is Applied, you can view that three cloud services exist in the Resources tab page. A VPC, a subnet, and an EVS disk have been created.

    Figure 6 Crested stack

  6. View the created cloud services.

    1. Log in to the Huawei Cloud management console.
    2. Choose Cloud Server Console > Elastic Volume Service. You can see the newly created EVS disk.
      Figure 7 EVS created
    3. Choose Service List > Networking > Virtual Private Cloud. You will see the newly created VPC on the VPC list.
      Figure 8 Created VPC
    4. Click the VPC name to show more details about the VPC. On the VPC details page, you will see that the subnet has been created in the VPC.
      Figure 9 Created subnet

Step 3: Delete Unnecessary Resources

You are advised to delete unnecessary stacks to avoid unwanted charges.

  1. Log in to the RFS console.
  2. In the navigation pane on the left, click Stacks.
  3. Locate the created stack, click Delete in the Operation column, and delete the stack as prompted.