# ess-container

Part of **ESS**

# Auto Scaling Container Service Console Guide

## Operations Overview

| Operation | Console Entry | Prerequisites | Description |
|----------|---------------|---------------|-------------|
| Create Enterprise Edition Container Registry Instance | Console > Container Registry > Instance List > Create Enterprise Edition Instance | You have an Alibaba Cloud account; Container Registry (ACR) Enterprise Edition activated; Auto Scaling activated; Apsara DevOps activated; RAM user permissions granted if applicable | Creates a new Enterprise Edition instance in Container Registry for hosting container images |
| Create Image Repository | Console > Container Registry > [Instance] > Repository Management > Image Repositories > Create Image Repository | Enterprise Edition instance created | Sets up a private or public image repository within the Container Registry instance |
| Configure Access Control for Public Endpoint | Console > Container Registry > [Instance] > Access Control > Public Network | Enterprise Edition instance created | Enables public network access and configures IP whitelist (default rule deleted for open access with credentials) |
| Create and Run Build Image Pipeline | Console > Apsara DevOps > My Pipelines > New Pipeline | Apsara DevOps activated; code source available | Configures a pipeline to build a container image and push it to the Enterprise Edition registry |
| Create ECI Scaling Group | Console > Auto Scaling > Scaling Groups > Create Scaling Group | VPC and vSwitch created; Container Registry instance ready | Creates a scaling group of Elastic Container Instances with min/max instance settings |
| Create and Enable Scaling Configuration | Console > Auto Scaling > [Scaling Group] > Scaling Configurations > Create Scaling Configuration | Scaling group created | Defines container image, version, and runtime configuration for ECI instances |
| Deploy Updated Image via DevOps Pipeline | Console > Apsara DevOps > My Pipelines > [Pipeline] > Copy Pipeline > Add ESS ECI Deployment Task | Original build pipeline exists; scaling group configured | Extends pipeline to deploy newly built image to an existing ECI scaling group |

## Operation Steps

### Create Enterprise Edition Container Registry Instance

**Navigation**: Console > Container Registry > Instance List > Create Enterprise Edition Instance

**Prerequisites**:
- You have an Alibaba Cloud account
- You have activated Container Registry (ACR) Enterprise Edition
- You have activated Auto Scaling
- You have activated Apsara DevOps
- If using a RAM user, you must grant permissions for Container Registry

1. Log on to the **Container Registry console**  
   - Element: **Container Registry console** (link) — top navigation bar

2. On the Instance List page, click **Create Enterprise Edition Instance**  
   - Element: **Create Enterprise Edition Instance** (button) — Instance List page

3. Select a region using the **region** dropdown  
   - Element: **region** (dropdown) — top navigation bar

4. On the Container Registry page, configure parameters and click **Buy Now**  
   - Element: **Buy Now** (button) — Container Registry page  
   - Notes: Key parameters include **Instance Type**, **Instance Name**, and **Subscription Duration**

5. On the Confirm Order page, review details, agree to terms, and click **Pay**  
   - Element: **Pay** (button) — Confirm Order page

6. Complete payment on the **Payment** page  
   - Element: **Payment** (link) — Payment page  
   - Notes: Review total cost before confirming

### Create Image Repository

**Navigation**: Console > Container Registry > [Instance] > Repository Management > Image Repositories

**Prerequisites**:
- Enterprise Edition instance (e.g., eci-autoscaling) already created

7. Click the **eci-autoscaling** instance link to open its overview  
   - Element: **eci-autoscaling** (link) — Instance List

8. In the left navigation pane, go to Repository Management > Image Repositories and click **Create Image Repository**  
   - Element: **Create Image Repository** (button) — left navigation pane

9. Fill in repository parameters and click **Next**  
   - Element: **Next** (button) — Create Image Repository page  
   - Notes: Required fields include **Namespace**, **Repository Name**, **Repository Type**, and optional **Summary**

10. Set **Code Source** to **Local Repository** and click **Create Image Repository**  
    - Element: **Create Image Repository** (button) — Code Source section

### Configure Access Control for Public Endpoint

**Navigation**: Console > Container Registry > [Instance] > Access Control

**Prerequisites**:
- Enterprise Edition instance created

11. On the Basic Information page, click the link **Please enable the network entry for access control first** next to Public Endpoint  
    - Element: **Please enable the network entry for access control first** (link) — Basic Information page

12. On the Access Control page, switch to the **Public Network** tab, enable **Access Entry**, and click **OK**  
    - Element: **OK** (button) — Access Control page  
    - Notes: A default whitelist rule is added automatically

13. Delete the default whitelist rule in the Actions column  
    - Element: **Delete** (button) — Actions column  
    - Notes: After deletion, any public server can access the endpoint using valid credentials

### Create and Run Build Image Pipeline

**Navigation**: Console > Apsara DevOps > My Pipelines

**Prerequisites**:
- Apsara DevOps activated
- Sample code source available (e.g., JAVA project)

14. Log on to the **Apsara DevOps pipeline console**  
    - Element: **Apsara DevOps pipeline console** (link) — top navigation bar

15. On the My Pipelines page, click **New Pipeline**  
    - Element: **New Pipeline** (button) — My Pipelines page

16. Select a pipeline template (e.g., Java - Test, Build Image) and click **Create**  
    - Element: **Create** (button) — Select a Pipeline Template page

17. Set pipeline name to **Build Image Pipeline** and click **Add Pipeline Source**  
    - Element: **Add Pipeline Source** (button) — upper-left corner  
    - Notes: Use **Sample Code Source** with programming language **JAVA**

18. In the Build Image section, delete the **Alibaba Cloud Image Build (Personal)** task  
    - Element: **Alibaba Cloud Image Build (Personal)** (button) — Build Image section  
    - Notes: Must remove Personal Edition task before adding Enterprise Edition

19. In the New Stage section, click **New Task**  
    - Element: **New Task** (button) — New Stage section

20. Choose **Alibaba Cloud Image Build (Enterprise)** and configure the task  
    - Element: **Build and push image to Alibaba Cloud Container Registry Enterprise Edition** (button) — Task Steps section  
    - Notes: Enter registry instance, namespace, repository, and image tag

21. Click **Save and Run**, then click **Run** in the dialog box  
    - Element: **Run** (button) — Run Configuration dialog box  
    - Notes: Pipeline execution takes 2–3 minutes

22. Return to the **eci-autoscaling** instance page and click **Manage** for your repository  
    - Element: **Manage** (button) — Actions column

23. In the left navigation pane, click the **Image Versions** tab to verify successful build  
    - Element: **Image Versions** (tab) — left navigation pane

### Create ECI Scaling Group

**Navigation**: Console > Auto Scaling > Scaling Groups

**Prerequisites**:
- VPC and vSwitch created
- Container image built and available

24. Click **Create an ECI scaling group**  
    - Element: **Create an ECI scaling group** (section) — main content area

25. Configure scaling group parameters:  
    - Select **Create from Scratch**  
    - Enter **Scaling Group Name** (e.g., eci_scaling_group)  
    - Set **Scaling Group Type** to **ECI**  
    - Set **Minimum Number of Instances** to **1**  
    - Set **Maximum Number of Instances** to **2**  
    - Select **VPC** (e.g., vpc-bp1jmxxau0lur929p****)  
    - Select **Select VSwitch** (e.g., vsw-bp155oak33mqngov2****)  
    - Element: **Create from Scratch** (radio) — scaling group configuration

### Create and Enable Scaling Configuration

**Navigation**: Console > Auto Scaling > [Scaling Group] > Scaling Configurations

**Prerequisites**:
- ECI scaling group created

26. Click **Create and enable a scaling configuration**  
    - Element: **Create and enable a scaling configuration** (section) — main content area

27. In Container Configuration > Image, click **Select Container Image**  
    - Element: **Select Container Image** (button) — Container Configuration section  
    - Notes: Switch to **Enterprise Image** tab and select your image (e.g., eci-autoscaling-***_repo)

28. Enter or select the **Image Version** (e.g., eci_autoscaling_****_01)  
    - Element: **eci_autoscaling_****_01** (text_input) — image version field

29. Enable the scaling group by clicking **Enable**  
    - Element: **Enable** (button) — main content area  
    - Notes: One ECI instance is automatically created due to minimum instance setting

30. Go to the Instance List and click the **Automatically Created** tab to view the instance  
    - Element: **Automatically Created** (tab) — Instance List

### Deploy Updated Image via DevOps Pipeline

**Navigation**: Console > Apsara DevOps > My Pipelines

**Prerequisites**:
- Original build pipeline exists
- Scaling group and configuration active

31. Log on to the **Apsara DevOps pipeline console**  
    - Element: **Apsara DevOps pipeline console** (link) — top navigation bar

32. Find your image pipeline, click **Copy Pipeline**, and confirm with **OK**  
    - Element: **Copy Pipeline** (button) — My Pipelines page

33. Click **Edit** and rename the pipeline to **Build Image and Deploy to Scaling Group Pipeline**  
    - Element: **Edit** (button) — upper-right corner

34. In the New Stage section, click **New Task**  
    - Element: **New Task** (button) — New Stage section

35. In the left navigation pane, choose **Deploy > ESS ECI Deployment**  
    - Element: **ESS ECI Deployment** (menu) — left navigation pane

36. In the **Edit** panel, configure:  
    - **Scaling Group**: eci_scaling_group  
    - **Container Name**: [your container name]  
    - **Deployment Image Address**: [full image address with tag]  
    - Element: **Edit** (panel) — Edit panel

37. Click **Save and Run**, then click **Run** in the dialog box  
    - Element: **Run** (button) — Run Configuration dialog box

38. After deployment, click **Release Order Details** to view results  
    - Element: **Release Order Details** (link) — Deployment section

39. Verify update on the Elastic Container Instance page:  
    - Check **Events** tab for image update confirmation  
    - Review **Container Configuration** section for new image  
    - Element: **Events** (tab) — Elastic Container Instance page

## Form Fields

| Parameter | Type | Required | Options/Values | Description |
|-----------|------|----------|----------------|-------------|
| Instance Type | dropdown | Yes | Basic Edition | Select an instance type |
| Instance Name | text_input | Yes | — | Enter an instance name |
| Subscription Duration | dropdown | Yes | 1 Month, 2 Months, 3 Months, 6 Months, 1 Year, 2 Years, 3 Years, 4 Years, 5 Years | Select subscription duration |
| Namespace | text_input | Yes | — | If not created, create one first and then select it |
| Repository Name | text_input | Yes | — | Name must be 2 to 120 characters long and can contain lowercase letters, digits, underscores, hyphens, periods, and forward slashes |
| Repository Type | dropdown | Yes | Public, Private | Choose between Public and Private repositories |
| Summary | text_input | No | test | Briefly describe the purpose of the image repository |
| Code Source | dropdown | Yes | Local Repository | Set the code source to Local Repository |
| Pipeline Name | text_input | Yes | — | Set the pipeline name to Build Image Pipeline |
| Programming Language | dropdown | Yes | JAVA | Select the programming language for the pipeline |
| Scaling Group Name | text_input | Yes | eci_scaling_group | Enter the name of the scaling group |
| Scaling Group Type | dropdown | Yes | ECS, ECI | Choose between ECS and ECI scaling groups |
| Instance Configuration Source | dropdown | Yes | Create from Scratch | After creating the scaling group, you must create a scaling configuration |
| Minimum Number of Instances | number_input | Yes | 1 | If current number is less than minimum, Auto Scaling adds instances |
| Maximum Number of Instances | number_input | Yes | 2 | If current number exceeds maximum, Auto Scaling removes instances |
| VPC | dropdown | Yes | vpc-bp1jmxxau0lur929p**** | Select an existing virtual private cloud (VPC) |
| Select VSwitch | dropdown | Yes | vsw-bp155oak33mqngov2**** | Select a vSwitch after selecting a VPC |
| Container Image | dropdown | Yes | — | Select the image to run in the container |
| Image Version | dropdown | Yes | eci_autoscaling_****_01 | Select the version of the image to run in the container |
| Scaling Group | dropdown | Yes | eci_scaling_group | Select your scaling group |
| Container Name | text_input | Yes | — | Specify the container name |
| Deployment Image Address | text_input | Yes | — | Specify the deployment image address |

## FAQ

Q: Where do I find the Enterprise Edition instance after creation?
A: Go to the Container Registry console > Instance List. Your instance (e.g., eci-autoscaling) appears in the list. Click its name to access management pages.

Q: Can I use a Personal Edition image repository with an ECI scaling group?
A: No. ECI scaling groups require images from an Enterprise Edition registry. You must delete any Personal Edition build tasks in DevOps and use the Enterprise Edition build task instead.

Q: What happens if I don’t delete the default whitelist rule in Access Control?
A: Only IP addresses in the whitelist can access the public endpoint. Deleting the rule allows any client with valid credentials to pull/push images over the public network.

Q: Can I modify the container image in a scaling configuration after it’s enabled?
A: Yes, but you must create a new scaling configuration with the updated image and set it as active. The existing configuration cannot be edited directly.

Q: How do I verify that my DevOps pipeline successfully deployed a new image to the scaling group?
A: Check the Release Order Details in the pipeline, then go to the Elastic Container Instance page and view the Events tab. The Container Configuration section will also show the updated image address.

## Pricing & Billing

### Billing Model
Auto Scaling charges based on the number of instances managed. Elastic Container Instance (ECI) is billed per second used.

### Price Reference
| Tier | Price |
|------|-------|
| ECI | 0.0001 / |

### Free Tier
None mentioned

### Billing Notes
Auto Scaling itself is free; you only pay for the underlying resources (e.g., ECI instances). ECI billing starts when an instance is created and stops when it is released.