Elastic Compute Service (ECS) is a scalable computing service that lowers IT costs and improves operations and maintenance (O&M) efficiency, allowing you to focus on core business innovation. This topic describes how to manage ECS instances, including how to add, assign, or release them.
Add an ECS instance
Log on to the SOFAStack console. In the navigation pane on the left, click Global Settings.
Click the card of the workspace that you want to manage to open the Workspace Details page.
On the Resources page, click Elastic Compute Service (ECS) > Add.
On the Add ECS Instance page, configure the instance settings, and then click Submit.
Configuration
Description
Billing
Supports the pay-as-you-go and subscription billing methods.
Basic Configurations
Region: Displays the region where the workspace is located.
Workspace: Displays the name of the workspace.
Zone: Select a zone.
Network
Network Type: Displays the current network type.
Virtual Private Cloud (VPC): Displays the name of the current VPC.
vSwitch: Select a vSwitch in the current zone to allocate a private IP address. You can also go to the Workspace Details page to create a vSwitch. For more information, see Create a vSwitch.
Security Group: Select a security group in the current zone to join. You can also go to the Workspace Details page to create a security group. For more information, see Add a security group.
Instance Type Configuration
Series: Select a series.
Specifications: Select the required specifications.
For more information, see Instance families.
Image
Image Type: Displays the current image type.
Operating System: Select an operating system and version.
Storage
System Disk: Select the system disk and specify its capacity.
Data Disk: Add data disks. You can add up to four data disks.
Instance Information
Number of Instances: Enter the number of instances. The default value is 1.
Instance Name Prefix: Enter an instance name. You can select whether to check Automatically append an ordinal number to the prefix to generate a unique instance name, for example: instance-name-[n~(n+1)].
If you do not check this option when you create multiple ECS instances, numbers starting from 0 are automatically appended to the instance name prefix.
If you check this option, the system queries for the current available ID and appends it to ensure the instance name is unique.
Instance Description: Enter a description for the instance.
Security Settings
You can select whether to check Set Root Password. Remember the password. If you forget it, you can log on to the ECS console to reset it:
If you do not check this option, a root password is not set.
If you check this option, enter the Logon Password and Confirm Password.
Assign ECS instances
After you add or import an ECS instance, you can assign it to an application.
Prerequisites
Log on to the SOFAStack console. In the navigation pane on the left, click Global Settings.
Click the card of the workspace that you want to manage to open the Workspace Details page.
On the Resources page, click Elastic Compute Service (ECS).
On the ECS instance list page, select the ECS instances that you want to assign to the application, and then click More > Assign to Application > OK.
In the Assign to Application window, enter the Application and the Application Service Instance.
NoteIf an application has no service instances, you can assign it directly.
A new service instance is created and associated with the latest version of the application's technology stack.
If the application has service instances, you must specify which service instances to assign.
For more information about the relationship between applications and service instances, and how to create a service instance, see Application service instances.
Click OK. After the assignment is complete, the application name appears in the Service Instance Binding column.
Remove ECS instances
You can remove ECS instances from a workspace as needed. Removed instances are no longer managed by the system. To use a removed instance again, import it into the workspace. For more information, see Import ECS instances.
Procedure
Log on to the SOFAStack console. In the navigation pane on the left, click Global Settings.
Click the card of the workspace that you want to manage to open the Workspace Details page.
On the Resources page, click Elastic Compute Service (ECS).
On the ECS instance list page, select the ECS instances that you want to remove, and then click Remove > OK.
After an instance is removed, it is removed from the instance list.
NoteThe remove operation only removes the ECS instance from the current workspace and does not delete the instance. Therefore, billing continues for the removed ECS instance.
Import ECS instances
You can import existing ECS instances into a workspace to quickly create or recover them.
Procedure
Log on to the SOFAStack console. In the navigation pane on the left, click Global Settings.
Click the card of the workspace that you want to manage to open the Workspace Details page.
On the Resources page, click Elastic Compute Service (ECS).
On the ECS instance list page, click Import.
In the dialog box that appears, select the ECS instances that you want to import, and then click Import.
NoteYou can select Show Importable Only or select a zone to quickly filter for importable instances.
After an instance is imported, it appears in the instance list.
Delete ECS instances
After you add or import an ECS instance, you can delete it from the workspace.
Prerequisites
The ECS instance that you want to delete must not be in use by the system.
Procedure
Log on to the SOFAStack console. In the navigation pane on the left, click Global Settings.
Click the card of the workspace that you want to manage to open the Workspace Details page.
On the Resources page, click Elastic Compute Service (ECS).
On the ECS instance list page, select the ECS instances that you want to delete, and then click Delete > OK.
After the instance is deleted, it is removed from the instance list, and billing stops.
More operations
Newly imported or added ECS instances appear in the ECS instance list. The ECS instance list page provides the following simple O&M features:
Click Edit in the Actions column to modify the name and description of the ECS instance.
Click Remote Connection in the Actions column to log on to the ECS server using the management terminal.
Click Task Logs in the Actions column to view the task logs for each operation. You can also retry failed operations.
The ECS Instance Details page provides the following O&M features:
Sync: Synchronizes the instance from Alibaba Cloud.
NoteIf the machine is deleted in Alibaba Cloud or the instance status is incorrect, you can click Sync to recover the instance. You do not need to modify the database.
Shutdown: Shuts down the ECS server.
NoteBefore you reinitialize a disk, you must shut down the corresponding ECS server. Then, you can initialize the disk.
More:
Assign to Application: Assigns the ECS instance to an application. For more information, see Assign ECS instances.
Restart: Restarts the ECS instance.
Reset Password: Modifies the logon password of the ECS instance.
Delete: Deletes the ECS instance.
Security Group Settings: Adds the ECS instance to a security group. A resource must belong to at least one security group.
Task Logs: Views the task logs of the instance.