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 ECS and ApsaraDB for RDS services.

Prerequisites

  • You must have registered an Alibaba Cloud account. If not, create a new Alibaba Cloud account first.
  • The first time that you use the ROS service, you are prompted to activate this service. ROS is a free service. Therefore, you can activate ROS free of charge.

Background information

ApsaraDB for RDS is a stable, reliable, and scalable online database service provided by Alibaba Cloud. ApsaraDB for 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, freeing you from database O&M. For more information, see What is ApsaraDB for 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 target template.
    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.
    3. Optional:Click View Details to check the template in JSON format.
      The following table lists 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 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 ROS creates the specified resources.

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

  3. Click Create Stack.
  4. Configure the 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 VPC.

      For more information, see Plan a VPC network.

      VSwitch CIDR Block The CIDR block of the VSwitch.

      The CIDR block of the VSwitch must fall within the CIDR block of the VPC and cannot overlap with the CIDR block of an existing VSwitch. For more information, see Plan a VPC network.

      Zone ID The zone ID of the resource that you want to create.
      ECS Instance Type The ECS instance type that you want to select.

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

      Image ID 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 of Windows instances cannot start with a forward slash (/).
      RDS DB Instance Class The type of the ApsaraDB for RDS instance.
      Database Engine Version The database engine that you want to use.
      DB Instance Storage The storage capacity of the ApsaraDB for 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 consist of 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 creation fails.
      • If you select Enabled, ROS will delete the created resources when an error such as creation timeout occurs during the creation process.
      • If you select Disabled, ROS will not delete the created resources when any error such as creation timeout occurs during the creation process.
      Timeout Period The timeout period that is specified for the stack creation request. If ROS fails to create the specified resources within the period, the creation operation will time out.
    5. Click Next.
    6. Check whether the stack parameters are configured correctly.
  5. Click Create Stack.

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 status. If the status 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: displays the basic information of the stack, such as the status and timeout period.
  • Events: records the operations that ROS performs during the stack creation. The causes of failed operations are also displayed in the list.
  • Resources: displays all resources of the stack.
  • Template: displays the original template of the stack.