This topic describes how to deploy etcd on an 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 Installs etcd on an ECS instance (existing VPC) sample template to deploy etcd on an Elastic Compute Service (ECS) instance based on existing resources, such as a virtual private cloud (VPC), vSwitch, and security group. The ECS instance runs CentOS 7.
After you create a stack by using the sample template, you can click the ID of the ECS instance on which etcd is deployed on the Resources tab to go to the Instances page. Then, you can click Connect in the Actions column of the instance to log on to the ECS instance.
Step 1: Create a stack
Log on to the ROS console.
In the left-side navigation pane, choose .
Search for the Installs etcd on an ECS instance (existing VPC) sample template.
Click Create Stack.
In the Configure Parameters step, configure the Stack Name parameter and the following parameters.
Parameter
Description
Example
VSwitch Availability Zone
The zone ID of the vSwitch that resides 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 that resides in the VPC.
For more information about how to create and query a vSwitch, see Create and manage vSwitches.
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 Search for security groups.
sg-bp15ed6xe1yxeycg7o****
Instance Type
The instance type of the ECS instance.
Select a valid instance type. For more information, see Overview of instance families.
ecs.c5.large
System Disk Type
The category of the system disk. 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
System Disk Space
The size of the system disk.
Valid values: 20 to 500.
Unit: GB.
40
Instance Password
The password of the ECS instance.
Test_12****
Click Next:Check and Confirm. Then, 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 EtcdServerConnectionAddress.
NoteThe value of EtcdServerConnectionAddress is required when you manage services by using
etcdctlcommands. We recommend that you record the value in a safe location.Click the Resources tab and click the ID of the ECS instance on which etcd is deployed to go to the Instances page. Then, click Connect in the Actions column of the instance to log on to the ECS instance.
After you log on to the ECS instance, you can run
etcdctlcommands to manage services. For more information aboutetcdctlcommands, see Demo.
Step 2: View resources
In the left-side navigation pane, choose .
On the Stacks page, click the ID of the desired stack.
The following table describes the resource in this example.
Resource
Quantity
Resource description
Specification description
ALIYUN::ECS::Instance
1
Creates an ECS instance to deploy etcd on the instance.
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.
NoteFor more information about the pricing details of resources, go to the relevant console or refer to the pricing documentation of each resource.