This topic describes how to deploy a Node.js development and test environment by creating a stack in the Resource Orchestration Service (ROS) console.
Background information
You can use the Deploy a Node.js Development and Test Environment sample template to create an Elastic Compute Service (ECS) instance that runs CentOS 7 and install Node.js on the instance. After a stack is created by using the sample template, you can obtain the value of WebsiteURL and log on to the Node.js test page.
Step 1: Create a stack
Log on to the ROS console.
In the left-side navigation pane, choose
.Search for the Deploy a Node.js Development and Test Environment sample template.
Click Create Stack.
In the Configure Parameters step, configure Stack Name and the following parameters.
Parameter
description
Example
VPC Name
The name of the virtual private cloud (VPC).
For more information, see VPCs and vSwitches.
DefaultVPCTest
VPC CIDR Block
The CIDR block of the VPC.
For more information, see VPCs and vSwitches.
192.168.0/16
VSwitch CIDR Block
The CIDR block of the vSwitch. The value must be a subnet of the VPC CIDR block.
For more information, see VPCs and vSwitches.
192.168.1.0/24
Zone ID
The zone ID of the ECS instance.
Qingdao Zone C
Image ID
The image ID of the ECS instance. By default, a CentOS 7 image is used.
For more information, see Overview.
centos_7
Instance Name
The name of the ECS instance.
For more information, see Overview of instances.
DefaultECSInstanceTest
Instance Type
The instance type of the ECS instance.
Select a valid instance type. For more information, see Overview of instance families.
ecs.d1ne.2xlarge
Instance System Disk Category
The system disk category of the ECS instance. Valid values:
cloud_efficiency: ultra disk
cloud_ssd: standard SSD
cloud_essd: Enterprise SSD (ESSD)
cloud: basic disk
ephemeral_ssd: local SSD
For more information, see Disks.
cloud_efficiency
Instance Password
The password of the ECS instance.
Test_12****
Nodejs Url
The download URL of the Node.js installation package.
https://nodejs.org/dist/v6.9.5/node-v6.9.5-linux-x64.tar.xz
Click Create.
On the Stack Information tab, view the stack status. Wait until the stack is created. Then, click the Outputs tab to obtain the value of WebsiteURL.
Access the URL specified by WebsiteURL and log on to the Node.js test page.
Step 2: View resources
In the left-side navigation pane, click Deployment > Stacks.
On the Stacks page, click the ID of the desired stack.
Click the Resources tab to view the information about resources in the stack.
The following table describes the resources in this example.
Resource
Quantity
Resource description
Specification description
ALIYUN::ECS::Instance
1
Creates an ECS instance to deploy a Node.js development environment.
An ECS instance that has the following specifications is created:
Instance type: ecs.c5.large.
Disk category: ultra disk.
System disk size: 40 GB.
Public IP address: A public IP address is allocated.
ALIYUN::ECS::VPC
1
Creates a VPC to enhance network security in the cloud.
None.
ALIYUN::ECS::VSwitch
1
Creates a vSwitch to manage instances in a zone.
None.
NoteFor more information about the pricing details of resources, go to the relevant console or refer to the pricing documentation of each resource.