Home  >  Article  >  Operation and Maintenance  >  How to use Resource Orchestration Service (ROS) to build an LNMP environment on an ECS instance with one click

How to use Resource Orchestration Service (ROS) to build an LNMP environment on an ECS instance with one click

坏嘻嘻
坏嘻嘻Original
2018-09-19 10:15:262255browse

The content of this article is about how to use Resource Orchestration Service (ROS) to build an LNMP environment on an ECS instance with one click. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to you. help.

One-click deployment of LNMP environment

LNMP represents Linux, Nginx, MySQL, and PHP respectively. This article introduces how to use Alibaba Cloud Resource Orchestration Service (ROS) to build an LNMP environment on an ECS instance with one click.

ROS is a free service provided by Alibaba Cloud’s official website and does not require downloading and installation. You can use ROS to create a resource stack template file in JSON format, or use the template sample provided by ROS to create a set of Alibaba Cloud resources. In this tutorial, we will use the LNMP_basic template provided by the ROS console to automatically create an ECS instance and deploy the LNMP environment on the instance.

Prerequisites

When creating pay-as-you-go resources, the account balance cannot be less than 100.00 yuan, which can be cash, available credit limit or available Vouchers for opening products.

Operation steps

Log in to the ROS management console.

Note: If you are using ROS for the first time, you must first activate the ROS service. ROS services are free, and there are no fees for activating the services.

In the left navigation bar, select Key Help > ECS instance related information to obtain the ECS instance specifications, availability zone ID (ZoneId), and image ID (ImageId) you need.

In the left navigation bar, click Template Sample.

From the template sample, find LNMP_basic.

How to use Resource Orchestration Service (ROS) to build an LNMP environment on an ECS instance with one click

Click the Preview button to view the JSON file of the template. The explanation of each top-level field of the JSON file is shown in the following table.

How to use Resource Orchestration Service (ROS) to build an LNMP environment on an ECS instance with one click

Note: For more information about the ROS resource stack template, please see the template structure description of Resource Orchestration.

Click to create a Stack.

In the direct input section, select the specific region in the drop-down box of region, and click Next in the lower right corner of the page. In this example, choose China East 2.

In the startup stack section, set parameters:

Stack name: Set a stack name, which cannot be repeated and cannot be modified after creation.

Creation timeout: Set a time. If the resource is not successfully created within the set time period, the judgment will time out. You can choose whether to rollback on failure. If you choose rollback on failure, if any failure occurs during the creation process (including creation timeout), ROS will delete the successfully created resources.

NginxDownloadUrl: Use the default Nginx download address.

DBPassword and Please Confirm DBPassword: Set and confirm the password to access the MySQL database. According to the template definition, the password can only contain English letters and numbers.

ZoneId: Fill in the availability zone where you need to create resources. See step 2 for details.

DBUser: Create a user to access the MySQL database.

DBRootPassword and Please Confirm DBRootPassword: Set and confirm the password of the MySQL root account. According to the template definition, the password can only contain English letters and numbers.

InstanceType: Fill in the ECS instance specifications you need. See step 2 for details.

SystemDiskCategory: Select the cloud disk type as the system disk.

InstancePassword and Please Confirm InstancePassword: Set and confirm the login password for the instance. According to the template definition, the password can only contain uppercase or lowercase English letters and numbers.

How to use Resource Orchestration Service (ROS) to build an LNMP environment on an ECS instance with one click

Click Create, and the page will prompt that the creation request was submitted successfully.

In the left navigation bar, click Resource Stack Management to view the status of the stack. When the stack is successfully created, view the NginxWebsiteURL defined in Outputs in the Output section. You can access the created LNMP environment through this address.

How to use Resource Orchestration Service (ROS) to build an LNMP environment on an ECS instance with one click

Instructions:

View all resources in the stack in the resource list.

View the operation records generated by ROS in the process of creating this resource stack in the event list. If any operation involving the resource stack fails, the reason for the resource operation failure will be displayed in the list.

View the original template of the resource stack in the template list.

The above is the detailed content of How to use Resource Orchestration Service (ROS) to build an LNMP environment on an ECS instance with one click. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn