This topic describes how to use a sample template in Resource Orchestration Service (ROS) to deploy a WordPress environment based on Elastic Compute Service (ECS) and ApsaraDB RDS.

Background information

WordPress is a blog platform that is developed in the PHP programming language and paired with a MySQL database. You can use the Create a WordPress Environment Based on ECS and ApsaraDB for RDS sample template to deploy a WordPress environment based on ECS and ApsaraDB RDS. The ECS and ApsaraDB RDS instances are created on the CentOS 7 operating system.

Step 1: Create a stack

  1. Log on to the ROS console.
  2. In the left-side navigation pane, choose Templates > Sample Templates.
  3. Find the Create a WordPress Environment Based on ECS and ApsaraDB for RDS template.
  4. Click Create Stack.
  5. In the Configure Template Parameters step of the Use New Resources (Standard) wizard, set Stack Name and the following parameters.
    ParameterDescriptionExample
    VPC CIDR BlockThe CIDR block of the virtual private cloud (VPC). 192.168.0.0/16
    VSwitch Availability ZoneThe zone ID of the vSwitch. Beijing Zone K
    VSwitch CIDR BlockThe CIDR block of the vSwitch. The value must be within the range of the CIDR block of the VPC. 192.168.0.0/24
    Instance TypeThe instance type of the ECS instance.

    Select a valid instance type. For more information, see Overview of instance families.

    ecs.c5.large
    ImageThe image ID of the ECS instance. By default, centos_7 is used.

    For more information, see Image overview.

    centos_7
    Instance PasswordThe password that is used to log on to the ECS instance. Test_12****
    DB Instance ClassThe instance type of the ApsaraDB RDS instance.

    Select a valid instance type. For more information, see Primary ApsaraDB RDS instance types.

    rds.mysql.t1.small
    EngineThe type and version number of the database engine. MySQL-5.6
    DB Instance StorageThe storage capacity of the ApsaraDB RDS instance.

    Valid values: 5 to 2000. The value must be in 5 increments.

    Unit: GB.

    5
    DB NameThe name of the ApsaraDB RDS database. wordpress
    DB UsernameThe username that is used to connect to the ApsaraDB RDS database. wpuser
    DB PasswordThe password that is used to connect to the ApsaraDB RDS database. Test_13****
  6. Click Create.
  7. View the stack status on the Stack Information tab of the stack management page. After the stack is created, click the Outputs tab to view the WordPress URL.
  8. Use the WordPress URL to log on to the WordPress management console.

Step 2: View resources

  1. In the left-side navigation pane, click Stacks.
  2. On the Stacks page, click the stack that you created.
  3. On the stack management page, click the Resources tab to view the resource list.
    The following table describes the resources in this example.
    Resource typeQuantityDescriptionSpecifications
    ALIYUN::ECS::Instance1Creates an ECS instance to deploy the WordPress service.
    • A single instance of the following specifications is created:
    • InstanceType: ecs.c5.large
    • SystemDiskCategory: cloud_efficiency
    • SystemDiskSize: 40 (Unit: GB)
    • AllocatePublicIP: true
    ALIYUN::ECS::VPC1Creates a VPC to ensure network security. None
    ALIYUN::ECS::VSwitch1Creates a vSwitch in the VPC to manage instances within a zone. None
    ALIYUN::RDS::DBInstance1Creates an ApsaraDB RDS for MySQL database to store data of the WordPress service.
    • DBInstanceStorage: 5 (Unit: GB)
    • DBInstanceClass: rds.mysql.t1.small (1 core, 1 GB memory)
    Note For more information about the resource charges, see the pricing schedule on the official website or the product pricing documentation.