When you create or modify an environment, Web+ creates one or more ECS instances to run applications on your specified platforms. In the Web+ console, you can change settings for ECS instances that reside in your environment.

Background information

Elastic Compute Service (ECS) is a Web service that provides elastically scalable compute capacity for Alibaba Cloud. In Web+, the billing method of new ECS instances is pay-as-you-go by default. You can log on to the ECS console to change the billing method to subscription for these ECS instances that are created in Web+. When you release an environment or scale down ECS instances, Web+ will not stop or release subscription ECS instances. You need to manually release these subscription ECS instances.

In most cases, Web+ releases ECS instances by default when you release an environment or scale down ECS instances. You can use the CLI tool to enable or disable the no fees for stopped instances feature for ECS instances. After an ECS instance is stopped, no charge is incurred for using vCPU, memory, and Internet IP address in stop mode. However, you are only charged a minimum expense for disks that are retained. You can log on to the ECS console to back up data and release all disks.

When you create or change an environment , you can change the settings for ECS instances. When you modify ECS settings, Web+ will update the current ECS settings or replace the current ECS instances with new ECS instances to meet your business requirements. In most cases, configuration changes will cause the current ECS settings to be updated. However, if either of the following configuration changes is included, Web+ will replace the current ECS instances with new ECS instances. For example, Web+ will replace the current ECS instances with new ECS instances.
  • Instance type changes
  • System disk scale-down

Open the ECS Instance Settings page

When you create an environment or change settings for a running environment, you can change ECS settings.

Change ECS settings when creating applications or environments

  1. Log on to the Web+ console.
  2. On the Overview page, click Create in the upper-right corner of the Last Updated Environments section. Follow the instructions to configure the required settings in the Basic Information and Environment Information steps and go to the Configurations step.
  3. In the Configurations step, select Custom in the Pre-defined Configuration setting.
  4. On the list of displayed settings, select Instances in the Resources section and configure the required settings.
  5. Click Creation Complete to create a new environment. The ECS settings will also take effect.

Change ECS settings when creating a new environment for an existing application

  1. Log on to the Web+ console.
  2. On the Overview page, click View All in the upper-right corner of the Last Updated Environments section.
  3. On the Applications and Environments, click the ID of an application for which you want to create a new environment.
  4. On the Application Details page, click Create Environment, configure the required settings in the Environment Information step, and go to the Configurations page.
  5. In the Configurations step, select Custom in the Pre-defined Configuration setting.
  6. On the list of displayed settings, select Instances and configure the required settings.
  7. Click Creation Complete to create a new environment.

Change ECS settings when modifying an environment

  1. Log on to the Web+ console.
  2. On the Overview page, click View All in the upper-right corner of the Last Updated Environments section.
  3. On the Applications and Environments page, click the > icon next to the name of an application to view a list of linked environments.
    Note On the Environments list, the most recently updated four environments are displayed. If the required environment is displayed on the list, you can click the specific name to go to the Environment Details page.
  4. Click the specific name of an environment to go to the Environment Details page.
  5. In the left-side navigation pane, click Configurations to go to the Configurations page.
  6. On the list of displayed settings, select Instances in the Resources section and configure the required settings.
  7. Click Change Configuration to update the environment. The ECS settings will also take effect.

ECS settings

Instance Type

You can select a maximum of 10 instance types. Web+ creates ECS instances of specified instance types in a specific order or priority. The priority of each instance type is based on the chronological order when an instance type is selected. The first selected instance type is of the highest priority. If an instance type of top priority runs out of stock, Web+ uses another instance type of the next priority level to create ECS instances. After you remove an instance type from the environment configurations, to replace the existing ECS instances of this type, Web+ will create ECS instances of another selected type.

Instances

For each environment, the number of instances that you can create ranges from 0 to 100. If the specified number is less than the number of existing instances, Web+ stops and releases redundant ECS instances. If the specified number is more than the number of existing instances, Web+ creates new ECS instances.

When you release an environment or scale down ECS instances, Web+ will release ECS instances by default. You can use the CLI tool to enable or disable the no fees for stopped instances feature for ECS instances. After an ECS instance is stopped, no charge is incurred for using vCPU, memory, and Internet IP address in this stop mode. However, you are only charged a minimum expense for disks that are retained. Web+ allows you to release an environment to manage ECS instances. When you release an environment or scale down ECS instances, Web+ releases ECS instances. In addition to the console, you can use the CLI tool to release ECS instances.

For large-scale and availability-sensitive applications, we recommend that you create at least two ECS instances for backup. If any errors occur on an ECS instance, services can be switched over to another ECS instance. The redundant ECS instances will help ensure business continuity.

Security Group

For each environment, Web+ will create a security group. By default, port 80 and port 22 are open to allow access through the Internet. You can change the rules of the security group. For example, you can limit access to port 22 from specified IP addresses over the Internet. After the default security group is created, Web+ retains the default rules. Therefore, we recommend that you guarantee business continuity after you change the rules for the default security group.

In addition to the default security group, you can also configure other security groups. After you submit changes, Web+ adds existing ECS instances to the specified security groups. New ECS instances will be added to both the default security group and the specified security groups.

Key Pair

If you want to use Secure Shell (SSH) to access ECS instances that are created by Web+, you can configure a key pair. After you change a key pair and submit the change, Web+ will update the key pair. After the update is complete, you need to restart ECS instances to enable the key pair.

System Disk Size

By default, the type of system disk for ECS instances that Web+ creates is Enhanced SSD with a disk size of 100 GB. You can change the size of a system disk and the size ranges from 40 GB to 500 GB. If you scale up a system disk, Web+ changes the size of the system disk for the specified ECS instance. If you scale down a system disk, Web+ creates a new system disk for the specified ECS instance to replace the existing system disk.

Enable Internet IP Address

If you enable an Internet IP address, Web+ creates each ECS instance with an Internet IP address. Otherwise, Web+ creates each ECS instance that is not accessible through the Internet.

Use the CLI tool to configure ECS instances

The CLI tool uses the Wpfile file to configure ECS instances. You can use the wpctl dump command to retrieve the Wpfile file of an environment. You can add, modify, and delete ECS parameters, and then use the apply command to enable these settings.

ECS parameters are sorted into the resources.ecs.autoScaling category of the Wpfile file. The following table describes the ECS parameters.

Category Parameter Valid values Default value Description
resources.ecs.autoScaling instanceNum 0 to 100 1 The number of required ECS instances.
instanceType A list of instance types in YAML format. None The list of instance types.
securityGroupIds A list of security group IDs in YAML format. None The list of security groups.
keyPairName The name of a key pair. None The name of the key pair.
systemDiskSize 40 to 500 100 The size of the system disk.
enableInternet true and false true Specifies whether to enable an Internet IP address.