Alibaba Cloud Resource Orchestration Service (ROS) allows you to use templates to create a group of Alibaba Cloud resources. The ROS template is a JSON file used to specify the resources that you want to create. This topic describes how to use ROS templates to create a WordPress environment based on Elastic Compute Service (ECS) and ApsaraDB RDS.

Prerequisites

  • An Alibaba Cloud account is created. To create an Alibaba Cloud account, go to the Create Your Alibaba Cloud Account page.
  • The first time you use ROS, you are prompted to activate it. ROS is a free service. You can activate ROS free of charge.

Background information

ApsaraDB RDS is a stable, reliable, and scalable online database service provided by Alibaba Cloud. ApsaraDB RDS supports database engines such as MySQL, SQL Server, and PostgreSQL. It provides a complete set of solutions for scenarios such as disaster recovery, backup, restoration, monitoring, and migration to reduce your O&M burdens. For more information, see What is ApsaraDB RDS?

This topic describes how to create a WordPress environment by using the Create a WordPress Environment Based on ECS and ApsaraDB for RDS template.

Procedure

  1. Log on to the ROS console.
  2. Select the template that you want to use.
    1. In the left-side navigation pane, choose Templates > Sample Templates.
      The common templates provided by ROS are displayed on the Sample Templates page.
    2. Find the Create a WordPress Environment Based on ECS and ApsaraDB for RDS template.
      Sample template
    3. Optional: Click View Details to view the template in the JSON format.
      The following table describes the top-level fields in the JSON file.
      Top-level field Description
      "ROSTemplateFormatVersion" : "2015-09-01" Specifies the version of the template.
      "Parameters" : { } Specifies some parameters of the template.

      In this example, this field specifies the default image ID and instance type.

      "Resources" : { } Specifies the Alibaba Cloud resources that you can use the template to create.

      In this example, this field declares that the resources to be created include an ECS instance and a security group. The properties of these resources are defined in the Parameters field.

      "Outputs": { } Specifies the resource information that the stack generates after the specified resources are created.

      In this example, the stack generates the ECS instance ID, public IP address, and security group ID.

      Note For more information about the sample templates of ROS, see Template structure.
  3. Click Create Stack.
  4. Configure parameters.
    1. In the top navigation bar, select a region.
    2. Configure the parameters in the stack template.
      The following table describes the stack template parameters.
      Parameter Description
      Stack Name The name of the stack. The stack name must be unique and cannot be modified after the stack is created.
      VPC VPC CIDR Block The private CIDR block of the virtual private cloud (VPC).

      For more information, see Plan networks.

      VSwitch Availability Zone The ID of the zone in which to create the resource.
      VSwitch CIDR Block The CIDR block of the vSwitch.

      The CIDR block of the vSwitch must fall within the CIDR block of the VPC to which the vSwitch belongs and cannot overlap with the CIDR block of an existing vSwitch. For more information, see Plan networks.

      ECS Instance Type The instance type of the ECS instance.

      For more information about ECS instance types, see Instance families.

      Image The ID of the image that ROS uses to create the ECS instance.
      Instance Password The logon password of the ECS instance.

      The password must be 8 to 30 characters in length and must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters. Special characters include ( ) ` ~ ! /@#$%^&*-_+=|{}[]:;'<>,.?.

      Note Passwords for Windows instances cannot start with a forward slash (/).
      RDS DB Instance Class The type of the RDS instance.
      Engine The database engine that you want to use.
      DB Instance Storage The storage capacity of the RDS instance.
      DB Name The name of the WordPress database.
      DB Username The username of the WordPress database.
      DB Password The password used to access the WordPress database.

      The password must be 6 to 32 characters in length and can contain letters, digits, and underscores (_).

    3. Click Next.
    4. Configure stack parameters.
      The following table describes the stack parameters.
      Parameter Description
      Stack Policy (Optional) The stack policy.
      Rollback on Failure Specifies whether to roll back the stack if the stack cannot be created.
      • If you select Enabled, ROS deletes the created resources when errors such as creation timeout occur during the creation process.
      • If you select Disabled, ROS does not delete the created resources when errors such as creation timeout occur during the creation process.
      Timeout Period Specifies the timeout period of the stack creation request. If the specified resources cannot be created within the period, the creation operation times out.
    5. Click Next.
    6. Check whether the stack parameters are correctly configured.
  5. Click Create.

Result

In the left-side navigation pane, click Stacks. In the top navigation bar, select the region of your created stack from the drop-down list to view stack information such as the state. If the state of the stack is Created, the stack is created.

What to do next

Click the stack name to go to the stack details page. Click the following tabs to view information about the stack.
  • Stack Information: The basic information of the stack, such as the state and timeout period is displayed.
  • Events: The records of the operations that ROS performs during stack creation are displayed. The causes of failed operations are also displayed in the list.
  • Resources: All resources of the stack are displayed.
  • Template: The original template of the stack is displayed.