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 Sign up to Alibaba Cloud 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. In the search box in the upper-right corner of the Sample Templates page, enter Create a WordPress Environment Based on ECS and ApsaraDB for RDS to search for the template.
      View the Create a WordPress Environment Based on ECS and ApsaraDB for RDS sample template. add56
    3. Optional:Click View Details to check the template file in the JSON format.
      The following table describes the top-level fields in the template file.
      Top-level fieldDescription
      "ROSTemplateFormatVersion" : "2015-09-01"The version of the template.
      "Parameters" : { }Some parameters of the template.

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

      "Resources" : { }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": { }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 sample templates of ROS, see Template structure.
  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.
      ParameterDescription
      Stack NameThe name of the stack. The stack name must be unique and cannot be modified after the stack is created.
      VPCVPC CIDR BlockThe private CIDR block of the virtual private cloud (VPC).

      For more information, see Plan networks.

      VSwitch Availability ZoneThe ID of the zone in which to create the resource.
      VSwitch CIDR BlockThe 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.

      ECSInstance TypeThe instance type of the ECS instance.

      For more information about ECS instance types, see Overview of instance families.

      ImageThe ID of the image that ROS uses to create the ECS instance.
      Instance PasswordThe 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 (/).
      RDSDB Instance ClassThe type of the RDS instance.
      EngineThe database engine that you want to use.
      DB Instance StorageThe storage capacity of the RDS instance.
      DB NameThe name of the WordPress database.
      DB UsernameThe username of the WordPress database.
      DB PasswordThe 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.
      ParameterDescription
      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 PeriodSpecifies 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 configured correctly.
  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.