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

The Deploy a Node.js Development and Test Environment sample template creates an Elastic Compute Service (ECS) instance that runs CentOS 7 and installs Node.js on the instance. After a stack is created by using the sample template, you can obtain the URL of the Node.js web application and log on to the Node.js test page.

Step 1: Create a stack

  1. Log on to the ROS console.
  2. In the left-side navigation pane, click Stacks.
  3. Find the Deploy a Node.js Development and Test Environment template.
  4. Click Create Stack.
  5. In the Configure Template Parameters step, set Stack Name and the following parameters.
    ParameterDescriptionExample
    VPC NameThe name of the virtual private cloud (VPC).

    For more information, see Overview of VPCs and vSwitches.

    DefaultVPCTest
    VPC CIDR BlockThe CIDR block of the VPC.

    For more information, see Overview of VPCs and vSwitches.

    192.168.0/16
    VSwitch CIDR BlockThe CIDR block of the vSwitch. The value must be within the range of the CIDR block of the VPC.

    For more information, see Overview of VPCs and vSwitches.

    192.168.1.0/24
    Zone IDThe zone ID of the ECS instance. Qingdao Zone C
    Image IDThe image ID of the ECS instance. By default, centos_7 is used.

    For more information, see Image overview.

    centos_7
    Instance NameThe name of the ECS instance.

    For more information, see Overview.

    DefaultECSInstanceTest
    Instance TypeThe 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 CategoryThe system disk category of the ECS instance. Valid values:
    • cloud_efficiency: ultra disk
    • cloud_ssd: standard SSD
    • cloud_essd: enhanced SSD (ESSD)
    • cloud: basic disk
    • ephemeral_ssd: local SSD

    For more information, see Disks.

    cloud_efficiency
    Instance PasswordThe password that is used to log on to the ECS instance. Test_12****
    Nodejs UrlThe download URL of the Node.js installation package. https://nodejs.org/dist/v6.9.5/node-v6.9.5-linux-x64.tar.xz
  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 URL of the Node.js web application.
  8. Use the URL to log on to the Node.js test page.

Step 2: View resources

  1. Log on to the ROS console.
  2. In the left-side navigation pane, click Stacks.
  3. On the Stacks page, click the stack that you created.
  4. 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 a Node.js development environment. A single instance of the following specifications is created:
    • InstanceType: ecs.c5.large
    • SystemDiskCategory: cloud_efficiency
    • SystemDiskSize: 40
    • AllocatePublicIP: true
    ALIYUN::ECS::VPC1Creates a VPC to ensure network security. None
    ALIYUN::ECS::VSwitch1Creates a vSwitch to manage instances within a zone. None
    Note For more information about the resource charges, see the pricing schedule on the official website or the product pricing documentation.