All Products
Search
Document Center

Enterprise Distributed Application Service:Scale out an ECS cluster in the EDAS console

更新時間:Nov 15, 2023

This topic describes how to scale out an Elastic Compute Service (ECS) cluster in the EDAS console.

Prerequisites

Create an ECS cluster in the EDAS console

Background information

In the following scenarios, you need to import ECS instances into an ECS cluster:

  • For a newly created ECS cluster that is empty, you need to add ECS instances.

  • You need to scale out an ECS cluster for business development.

The methods for importing ECS instances vary with the network types and operating systems used by the ECS instances.

Important

Enterprise Distributed Application Service (EDAS) does not support Windows-based ECS instances.

To scale out an ECS cluster, you can purchase ECS instances or add existing ECS instances.

Purchase ECS instances

EDAS allows you to purchase ECS instances based on existing instance specifications or instance launch templates. The billing methods of ECS instances include subscription and pay-as-you-go. You can select a billing method based on your needs.

Note
  • ECS clusters that use the classic network do not support instance launch templates.

  • You cannot delete the auto scaling (ESS) tag from the ECS instances that are purchased for the scale-out.

  • The pay-as-you-go ECS instances that are purchased for the scale-out of the ECS cluster are not stopped or released when the cluster is scaled in. However, if you manually stop an ECS instance, the instance is released.

For more information, see Purchase ECS instances.

Add existing ECS instances to a cluster

If you have created ECS instances, you can add the existing instances to an ECS cluster by using the following methods:

  • You can directly import the ECS instances and do not need to convert images.

  • You can reinstall the operating system on the ECS instances by using an EDAS image and then import the ECS instances. After the operating system is reinstalled, all data of the ECS instances is deleted. You must set new passwords for the instances. An ECS instance cannot be imported if one of the following conditions is met:

    • The instance was created before December 1, 2017.

    • The instance is created in the classic network and imported to a cluster that uses the classic network.

    • The instance is in the Stopped, Starting, or Stopping state, not in the Running state.

    Note

    If you do not want to reinstall the operating system of the ECS instances, you can execute a script on the ECS instances before you import the ECS instances.

  • To import an Ubuntu-based ECS instance in the classic network to an ECS cluster, you must log on to the instance and execute a script. You do not need to reinstall the operating system.

For more information, see Add existing ECS instances to a cluster.

Purchase ECS instances

  1. Log on to the EDAS console.

  2. In the left-side navigation pane, choose Resource Management > ECS Clusters.

  3. In the top navigation bar, select a region. On the ECS Cluster page, select a Microservice Namespace from the drop-down list. Then, click the ID of the ECS cluster that you want to scale out.

  4. In the ECS Instance section of the Cluster Details page, click Purchase ECS for Scale-out in the upper-right corner.

  5. In the Scale out Cluster dialog box, specify the scale-out method and other required parameters.

    • Purchase Based on Existing Instance Specifications

      1. In the Scale-out Method step, select Purchase Based on Existing Instance Specifications, select an existing instance in the Instances section, and then click Next.

      2. In the Purchase Details step, set the following parameters, and click Next.

        Parameter

        Description

        Billing Method

        Valid values: Subscription and Pay-as-you-go.

        Purchased Duration

        If you set Billing Method to Subscription, this parameter is required.

        Set this parameter to specify the subscription period.

        Quantity

        Specify the number of ECS instances that you want to purchase in the Quantity field.

        Password

        Specify the logon password for the ECS instances from the drop-down list. If no password is available, go to the ECS console to create a key pair. For more information, see Create an SSH key pair.

        Terms of Service

        Read and agree to Elastic Compute Service Terms of Service | Terms of Service for Images.

      3. In the Confirm step, confirm the scale-out information, and click Confirm.

    • Purchase Based on Instance Launch Template

      1. In the Scale-out Method step, select Purchase Based on Instance Launch Template, select a launch template and a version, and then click Next.

      2. In the Purchase Details step, set the following parameters, and click Next.

        Parameter

        Description

        Billing Method

        Valid values: Subscription and Pay-as-you-go.

        Purchased Duration

        If you set Billing Method to Subscription, this parameter is required.

        Set this parameter to specify the subscription period.

        Quantity

        Specify the number of ECS instances that you want to purchase in the Quantity field.

        Terms of Service

        Read and agree to Elastic Compute Service Terms of Service | Terms of Service for Images.

      3. In the Confirm step, confirm the scale-out information, and click Confirm.

    After you purchase instances, the Automatic purchasing is triggered. Check the real-time information in the application change process. message appears in the upper part of the page. After the instances are imported, return to the Cluster Details page. In the ECS Instance section, Running is displayed in the Health Check column of the instances. This indicates that the instances are imported.

Add existing ECS instances to a cluster

  1. Log on to the EDAS console.

  2. In the left-side navigation pane, choose Resource Management > ECS Clusters.

  3. In the top navigation bar, select a region. On the ECS Cluster page, select a Microservice Namespace from the drop-down list. Then, click the ID of the ECS cluster that you want to scale out.

  4. In the ECS Instance section of the Cluster Details page, click Show and then Add Existing ECS.

  5. On the Add ECS Instance page, select an import method and ECS instances, and then click Next.

    • If you select Import ECS, the Microservice Namespace and destination cluster cannot be specified. You can import available ECS instances in the current Microservice Namespace to the cluster. Import existing ECS instances

    • If you select Select from Existing Cluster, specify a Microservice Namespace and a source cluster in the region. Then, add instances from the All ECS Instances list to the Selected ECS Instances list. Select instances from an existing cluster

    Note

    If no instances are available, click Create ECS Instance in the upper-right corner of the page to go to the Elastic Compute Service (ECS) buy page and purchase ECS instances. For more information, see Create an ECS instance.

  6. In the Ready to Import step, the following import methods are supported:

    • Directly import the ECS instances. In the Ready to Import step, select the ECS instances that you want to import and click Confirm and Import.

    • Convert and import the ECS instances. In the Ready to Import step, view the information of the selected instances. Select I agree to convert the preceding instances that need to be imported, and I understand that the data in the original system will be lost after the conversion. Then, set a new password for the ECS instances, and click Confirm and Import.

    • Execute the script and import the ECS instances.

      1. In the Ready to Import step, copy the script.

      2. Log on to the ECS instance to be imported as the root user.

      3. Paste and execute the script on the ECS instance.

  7. In the Import step, view the import status of the instance.

    After the import is completed, return to the Cluster Details page. In the ECS Instance section, Running is displayed in the Health Check column of the instances. This indicates that the instances are imported.

Remove an ECS instance

  1. In the ECS Instance section of the Cluster Details page, click Remove in the Actions column of the instance that you want to remove.

  2. In the Remove ECS Instance dialog box, confirm the information of the instance to be removed, and click Remove.

    After the ECS instance is removed, it is deleted from the ECS instance list.

FAQ

What do I do if I am unable to find the ECS instance created in the ECS console when I import instances to an ECS cluster?

Note

Make sure that the account that you used to create the ECS instance in the ECS console is the same as the account that you used to log on to the EDAS console, and that the created ECS instance and the ECS cluster belong to the same region.

  1. Log on to the EDAS console.

  2. In the left-side navigation pane, choose Resource Management > ECS.

  3. In the upper-right corner of the ECS page, click Import ECS.

  4. On the Select Cluster and Existing ECS Instances tab, click Synchronize ECS.

    Important

    Make sure that the operating system version of the created ECS instance is in the supported versions that are listed in the Select Cluster and Existing ECS Instances step.

If the issue persists, join the DingTalk group numbered 31723701 to contact Alibaba Cloud technical personnel for further assistance.