This topic describes how to deploy etcd on a single instance by creating a stack in the Resource Orchestration Service (ROS) console.

Background information

etcd is a distributed storage system that uses key-value pairs to store critical data. etcd implements reliable distributed collaboration by using distributed locks, leader election, and write barriers.

You can use the sample template Installs etcd on an ECS instance (existing VPC) to deploy etcd on a CentOS 7 Elastic Compute Service (ECS) instance based on existing resources such as virtual private clouds (VPCs), vSwitches, and security groups.

After you create a stack by using the template, you can click the resource ID of the ECS instance in which etcd is deployed on the Resources tab. On the Instances page, you can click Connect in the Actions column of the instance to log on to the ECS instance.

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 template Installs etcd on an ECS instance (existing VPC).
  4. Click Create Stack.
  5. In the Configure Template Parameters step, configure Stack Name and the following parameters.
    Parameter Description Example
    VSwitch Availability Zone The zone ID of the vSwitch in the VPC. Qingdao Zone C
    Existing VPC Instance ID The ID of the VPC.

    For more information about how to create and query a VPC, see Create and manage a VPC.

    vpc-bp1m6fww66xbntjyc****
    Existing VSwitch ID The ID of the vSwitch in the VPC.

    For more information about how to create and query a vSwitch, see Create and manage a vSwitch.

    vsw-bp183p93qs667muql****
    Business Security Group ID The ID of the ECS security group.

    For more information about how to query the ID of a security group, see Query security groups.

    sg-bp15ed6xe1yxeycg7o****
    Instance Type The ECS instance type.

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

    ecs.c5.large
    System Disk Type 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
    System Disk Space The size of the system disk.

    Valid values: 20 to 500.

    Unit: GB.

    40
    Instance Password The password that is used to log on to the ECS instance. Test_12****
  6. Click Create.
  7. On the stack management page, click the Stack Information tab to view the stack status. After the stack is created, click the Outputs tab to obtain the value of EtcdServerConnectionAddress.
    Note You are required to enter the value when you manage services by using etcdctl commands. We recommend that you record the returned value in advance in a safe location.
  8. Click the Resources tab and click the resource ID of the ECS instance in which etcd is deployed to go to the Instances page. Then, click Connect in the Actions column of the ECS instance to log on to the instance.
    After you log on to the ECS instance, you can run etcdctl commands to manage the instance. For more information about etcdctl commands, see Demo.

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 ID of the stack that you created.
  4. Click the Resources tab to view resources.
    The following table describes the resource in this example.
    Resource Quantity Description Specifications
    ALIYUN::ECS::Instance 1 Creates an ECS instance to deploy etcd.
    • An ECS instance of 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.
    Note For more information about the resource charges, see the pricing schedule on the official website or the product pricing documentation.