Skip to main content

Deploy Service

Concept Overview

  • A version is an entity that carries access traffic, corresponding to a set of containers with identical configuration information; it is also a collection of information required for a deployment, including image address, service port, environment variables, auto-scaling settings, etc.
  • Each time you upgrade the service, you can choose to create a new version or edit the configuration of the existing version and redeploy it. For details on the differences and operation guide between these two methods, see Upgrading the Service.

Operation Procedure

Log in to the CloudBase Cloud Run console, select the service you want to deploy, and click the service name to enter the service details page:

Tip

If you do not have any services yet, please click Create Service first. For details, refer to Create Service.

Click New Version, and in the new version window, continue filling in the required configuration information for the version. For details, refer to Version Configuration Instructions:

After filling in the version configuration information, click Start Deployment. If the deployment is successful, the status changes to "Normal". If there is an error, it will change to a specific error status.

Tip
  • If the traffic strategy "Automatically open 100% traffic after deployment completion" is selected when creating a new version, the traffic will change from 0% to 100%.
  • If you selected "Keep traffic at 0 after deployment completion and manually adjust traffic later" or selected "Automatically open 100% traffic after deployment completion" but wish to adjust traffic again, you can perform manual configuration. For details, refer to Traffic Configuration. :::

After completing deployment and traffic configuration, you may want to quickly access your service to view the results. The cloud hosting service automatically assigns a default domain name to your service. You can directly click Access Service to visit your service page via this default domain.

  • The traffic generated by your access to the service is real business traffic.
  • If you selected the "By Percentage" mode when configuring traffic, clicking Access Service will randomly access a version based on the percentage probability you set;
  • If the mode you selected when configuring traffic is "By URL Parameter", clicking Access Service generates a parameterless HTTP request that accesses the default version you set. You can construct requests with parameters for further verification. :::

Usage Limits

  • A service can have up to 10 versions simultaneously.
  • Version names are automatically generated by the system in the format "Service name" + "Sequence number", where the sequence number increments according to the creation order and cannot be modified (e.g., testservice-001, testservice-002, etc.).
  • Unused versions can be manually deleted. Deleted versions are not counted in the total version count, but will not affect the sequence numbers of newly created versions. (For example: after deleting version "testservice-002", the next newly created version will still be "testservice-003".)

Resource Consumption Description

Regardless of which replica mode is adopted, the deployment process itself will consume a certain amount of resources.

Low-Cost Mode

Although the minimum number of replicas is 0 (scaling in to 0 instances incurs no resource consumption or cost when there's no traffic), one instance is created first during the deployment process. After the deployment succeeds, scale-in to 0 is triggered. For example: the replica mode is "Low-Cost", the specification is "1 core 1G", the traffic policy is "automatically enable 100% traffic after deployment completes", deployment takes 5 minutes, and after successful deployment, no business traffic occurs. Because the observation period for scaling in to 0 is half an hour, it will incur CPU usage of 35 (core x minutes) and memory usage of 35 (GiB x minutes).

High Availability Mode

Deployment will create the minimum number of instances at the start, incurring resource consumption. For example: the replica mode is "High Availability", the specification is "1 core 1G", the minimum number of replicas is 5, the traffic policy is "keep traffic at 0 after deployment and adjust it manually later", deployment takes 5 minutes, and after successful deployment, no business traffic occurs. Then it will incur CPU usage of 25 (core x minutes) and memory usage of 25 (GiB x minutes).