This topic describes how to deploy etcd on a single Elastic Compute Service (ECS) instance by creating a stack in the Resource Orchestration Service (ROS) console.
etcd is a distributed storage system that uses key-value pairs to store mission-critical data. The system implements reliable distributed collaboration by using distributed locks, leader elections, and write barriers.
The Deploy etcd on a Single Instance in an Existing VPC sample template deploys etcd on a CentOS 7 ECS instance based on existing resources such as virtual private clouds (VPCs), vSwitches, and security groups.
After a stack is created by using the template, click the resource ID of the ECS instance where etcd is deployed on the Resources tab. On the Instances page, click Connect in the Actions column corresponding to the instance to log on to the instance.
Step 1: Create a stack
- Log on to the ROS console.
- In the left-side navigation pane, choose .
- Find the Deploy etcd on a Single Instance in an Existing VPC template.
- Click Create Stack.
- In the Configure Template Parameters step, set Stack Name and the following parameters.
Parameter Description Example VSwitch Zone ID 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**** VSwitch ID The ID of the vSwitch in the VPC.
For more information about how to create and query a vSwitch, see Work with vSwitches.
vsw-bp183p93qs667muql**** Business Security Group ID The ID of the ECS security group.
For more information about how to query security groups, see Query security groups.
sg-bp15ed6xe1yxeycg7o**** Instance Type The instance type of the ECS instance.
Select a valid instance type. For more information, see Instance families.
ecs.c5.large System Disk Type The 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
cloud_efficiency System Disk Space The system disk size of the ECS instance.
Valid values: 40 to 500.
40 Login Password The password that is used to log on to the ECS instance. Test_12****
- Click Create.
- 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
etcdctlcommands. We recommend that you record the returned value in advance in a safe location.
- Click the Resources tab, and click the resource ID of the ECS instance where etcd is deployed to go to
the Instances page. Then, click Connect in the Actions column corresponding to the instance to log on to the instance. After you log on to the ECS instance, you can use
etcdctlcommands to manage services. For more information about
etcdctlcommands, see etcdctl commands.
Step 2: View resources
- Log on to the ROS console.
- In the left-side navigation pane, click Stacks.
- On the Stacks page, click the ID of the stack that you created.
- On the stack management page, click the Resources tab to view resources. The following table describes the resources in this example.
Resource Quantity Description Specifications ALIYUN::ECS::Instance 1 Creates an ECS instance to deploy etcd.
- A single instance of the following specifications is created:
- InstanceType: ecs.c5.large
- SystemDiskCategory: cloud_efficiency
- SystemDiskSize: 40 (Unit: GB)
- AllocatePublicIP: true