After you create an Elastic Compute Service (ECS) cluster, no ECS instance is automatically created for the cluster. You can create or add ECS instances to scale out the cluster based on your business requirements. To scale out an ECS cluster, you need to import ECS instances into the ECS cluster. You can purchase ECS instances or add existing ECS instances.

Background information

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

Notice Enterprise Distributed Application Service (EDAS) does not support Windows-based 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.

Add existing ECS instances to the cluster

If you have created ECS instances, you can add the existing instances to the ECS cluster. To add existing instances to the ECS cluster, you can use the following methods:

  • You can directly import ECS instances and do not need to convert images.
  • You can reinstall the operating system on 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 are 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 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.

Purchase ECS instances

  1. Log on to the EDAS console.
  2. In the left-side navigation pane, choose Resource Management > ECS Clusters.
  3. On the ECS Cluster page, select a region from the Region drop-down list in the top navigation bar, and select a microservice namespace from the Microservice Namespace 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 wizard, specify the scale-out method and other required parameters.
    • Purchase Based on Existing Instance SpecificationsPurchase Based on Existing Instance Specifications
      1. In the Scale-Out Method step, set the Scale-out Method parameter to Purchase Based on Existing Instance Specifications, select an existing instance, 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 the Billing Method parameter 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 password for the ECS instances from the Password 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 select 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 TemplatePurchase Based on Instance Launch Template
      1. In the Scale-Out Method step, set the Scale-out Method parameter to Purchase Based on Instance Launch Template.
      2. Select an instance launch template and template version, and click Next.
      3. 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 the Billing Method parameter 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 select Elastic Compute Service Terms of Service | Terms of Service for Images.
    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 the cluster

  1. Log on to the EDAS console.
  2. In the left-side navigation pane, choose Resource Management > ECS Clusters.
  3. On the ECS Cluster page, select a region from the Region drop-down list in the top navigation bar, and select a microservice namespace from the Microservice Namespace 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 the DOWN arrow next to Purchase ECS for Scale-out in the upper-right corner,and click 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 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 instance, 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 Ready to 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 page, click Remove in the Actions column.
  2. In the Remove ECS Instance message, 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?

  1. Check whether the account used to create the ECS instance in the ECS console is the same as the account used to log on to the EDAS console.
  2. Check whether the created ECS instance and the ECS cluster belong to the same region.
  3. Log on to the EDAS console. In the left-side navigation pane, choose Resource Management > ECS. On the ECS page, click Import ECS in the upper-right corner. On the Select Cluster and Existing ECS Instances tab, click Synchronize ECS.
    Notice 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.
  4. If the issue persists, submit a ticket.