A serverless cluster runs jobs on elastic container instances instead of Elastic Compute Service (ECS) instances. Provide a packaged container image, submit a job, and the system automatically provisions and releases compute resources -- no capacity planning or server management required.
Serverless vs. standard clusters
Standard E-HPC clusters use ECS instances as compute nodes. You select instance types, manage node quantities, and monitor cluster status.
Serverless clusters differ in the following ways:
Automatic provisioning: The system creates elastic container instances on demand based on submitted jobs.
One container per instance: Each elastic container instance runs a single container from your image.
Pay-per-use billing: After a job completes, the elastic container instance stops billing and is automatically released.
No server management: Provide container images and submit jobs -- skip capacity planning entirely.
Elastic Container Instance (ECI) is an Alibaba Cloud service that combines container and serverless technologies. You develop and run containerized workloads without managing servers, and pay only for the resources your containers consume. For more information, see What is Elastic Container Instance?
Prerequisites
Before you begin, make sure that you have:
Service-linked roles for E-HPC and Elastic Container Instance (created automatically when you first log on to the E-HPC or Elastic Container Instance console and follow the prompts to activate the service)
A Virtual Private Cloud (VPC) and a vSwitch (see Create and manage a VPC and Create and manage a vSwitch)
Limitations
Serverless clusters are not available in the Indonesia (Jakarta) region.
Procedure
Log on to the E-HPC console.
In the upper-left corner of the top navigation bar, select a region.
In the left-side navigation pane, click Cluster.
On the Cluster page, hover over the
icon to the right of Create Cluster and click Cluster Template.In the Basic Configurations section, enter a cluster name, logon password, and repeat password.
In the upper part of the editor section, click Select Default Template and select Batch Serverless.
Update the template parameters to match your environment. The Batch Serverless template uses the following INI-format configuration:
Parameter Type
Parameter
Required
Example
Description
Global
clientVersion
Yes
2.1.0
E-HPC client version. Uses the latest version by default. Keep the default value.
Node
deployMode
Yes
Managed
Cluster deployment mode. Set to
Managed.Network
vpcId
Yes
vpc-wz9lq2oynq8tia5h8****
ID of the VPC for the cluster.
vSwitchId
Yes
vsw-wz992iw34x8on06he****
ID of the vSwitch.
securityGroupId
No
sg-wz94ksuqlwb8iqh8****
ID of the security group for the cluster.
managedVpcCidr
No
172.16.0.0/12
CIDR block for the managed VPC. Keep the default value unless your network requires a different range.
Storage
withoutNas
Yes
true
Set to
true. Apsara File Storage NAS is not used as shared storage.Scheduler
schedulerType
Yes
ServerlessBatch
Scheduler type. Set to
ServerlessBatch.[Global] clientVersion=2.1.0 [Node] deployMode=Managed [Network] vpcId=vpc-bp156zry1g8y8dv99**** vSwitchId=vsw-bp1xu3lkc9c9bpq32**** securityGroupId= managedVpcCidr=172.16.0.0/12 [Storage] withoutNas=true [Scheduler] schedulerType=ServerlessBatchIn the upper-right corner of the page, read and select Alibaba Cloud International Website Product Terms of Service, then click OK.
Go to the Clusters page and check the cluster status. When the status changes to Running, the serverless cluster is ready.
What to do next
After the cluster is running, submit jobs to it. The system automatically creates elastic container instances to execute each job and releases them after completion. For more information, see Submit a job.