Deploy a Node.js development and test environment

更新时间:
复制 MD 格式

Deploy a Node.js development and test environment on an ECS instance by creating a Resource Orchestration Service (ROS) stack.

Background

The Deploy a Node.js development and test environment sample template creates a CentOS 7-based ECS instance with Node.js installed. After the stack is created, use the WebsiteURL to access the Node.js test page.

Step 1: Create a stack

  1. Log in to the ROS console.

  2. In the left-side navigation pane, choose Templates > Public Templates.

  3. Search for the Deploy a Node.js development and test environment public template.

  4. Click Create Stack.

  5. On the Configure Parameters page, enter a Stack Name and configure the following parameters.

    Parameter

    Description

    Example

    VPC name

    The name of the 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.0/16

    vSwitch CIDR block

    The CIDR block of the vSwitch, which must be a subnet of the VPC CIDR block.

    For more information, see VPCs and vSwitches.

    192.168.1.0/24

    Zone

    The zone in which to create the ECS instance.

    China (Qingdao) Zone C

    Image ID

    The ID of the image for the ECS instance. The default value is centos_7.

    For more information, see Image overview.

    centos_7

    Instance name

    The name of the ECS instance.

    For more information, see Instance overview.

    DefaultECSInstanceTest

    Instance type

    The instance type of the ECS instance.

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

    ecs.d1ne.2xlarge

    System disk type

    The system disk category for the ECS instance. Valid values:

    • cloud_efficiency: ultra disk

    • cloud_ssd: standard SSD

    • cloud_essd: ESSD

    • cloud: basic disk

    • ephemeral_ssd: local SSD

    For more information, see Cloud disk overview.

    cloud_efficiency

    Instance password

    The password for the ECS instance.

    Test_12****

    Node.js URL

    The download URL for the Node.js installation package.

    https://nodejs.org/dist/v6.9.5/node-v6.9.5-linux-x64.tar.xz

  6. Click Next:Check and Confirm. Then, click Create.

  7. On the Stack Information tab, view the status of the stack. After the stack is created, click the Output tab to get the WebsiteURL.

  8. Open the WebsiteURL to access the Node.js test page.

Step 2: View resources

  1. In the left-side navigation pane, choose Deployment > Stacks.

  2. On the Stacks page, click the ID of the desired stack.

  3. Click the Resources tab to view the resource information.

    The template creates the following resources:

    Resource

    Quantity

    Description

    Specifications

    ALIYUN::ECS::Instance

    1

    An ECS instance that hosts the Node.js development environment.

    • Total: 1 instance

    • Instance type: ecs.d1ne.2xlarge

    • System disk category: ultra disk

    • System disk size: 40 GB

    • Public IP address assigned: Yes

    ALIYUN::ECS::VPC

    1

    A VPC that provides an isolated network environment.

    None

    ALIYUN::ECS::vSwitch

    1

    A vSwitch that connects instances within a single zone.

    None

    Note

    For pricing details, see the pricing documentation for each product.