All Products
Search
Document Center

Enterprise Distributed Application Service:DeployApplication

Last Updated:Jan 08, 2024

Deploys an application in an Elastic Compute Service (ECS) cluster.

Operation description

Note To deploy an application in a Container Service for Kubernetes (ACK) cluster that is imported into Enterprise Distributed Application Service (EDAS), call the DeployK8sApplication operation provided by EDAS. For more information, see DeployK8sApplication.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Debug

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
edas:ManageApplicationWrite
  • Application
    acs:edas:{#regionId}:{#accountId}:namespace/{#NameSpaceId}/application/{#AppId}
    none
none

Request syntax

POST /pop/v5/changeorder/co_deploy

Request parameters

ParameterTypeRequiredDescriptionExample
AppIdstringYes

The ID of the application. You can call the ListApplication operation to query the application ID. For more information, see ListApplication .

3616cdca-********************
PackageVersionstringYes

The version of the application deployment package. The value can be up to 64 characters in length. We recommend that you use a timestamp.

1.0
DescstringNo

The description of the application deployment.

Deploy by edas pop api
DeployTypestringYes

The deployment mode of the application. Valid values: url and image. The image value is deprecated. You can deploy an application to a Swarm cluster only by using an image.``

URL
WarUrlstringNo

The URL of the application deployment package. The package can be a WAR or JAR package. This parameter is required if you set the DeployType parameter to url. We recommend that you specify the URL of an application deployment package that is stored in an Object Storage Service (OSS) bucket.

https://edas.oss-cn-hangzhou.aliyuncs.com/demo/hello-edas.war
ImageUrlstringNo

The URL of the application image that is used to deploy the application in a Swarm cluster. We recommend that you use an image that is stored in Alibaba Cloud Container Registry. This parameter is deprecated.

registry.cn-hangzhou.aliyuncs.com/mw/testapp:latest
GroupIdstringYes

The ID of the instance group to which the application is deployed. You can call the ListDeployGroup operation to query the ID of the instance group. For more information, see ListDeployGroup .

Set the parameter to all if you want to deploy the application to all instance groups.

all
BatchintegerNo

The number of batches per instance group.

  • If you specify an ID when you set the GroupId parameter, the application is deployed to the specified instance group. The minimum number of batches that can be specified is 1. The maximum number of batches is the maximum number of ECS instances in the Normal state in the instance group. The actual value falls in the range of [1, specified number]. The specified number of batches equals the number of ECS instances in the specified instance group.
  • If you set the GroupId parameter to all, the application is deployed to all instance groups. The minimum number of batches that can be specified is 1. The maximum number of batches is the number of ECS instances in the instance group that has the largest number of ECS instances in the Normal state.
1
BatchWaitTimeintegerNo

The wait time between deployment batches for the application. Unit: minutes.

  • Default value: 0. If no wait time between deployment batches is needed, set this parameter to 0.
  • Maximum value: 5.

If many deployment batches are needed, we recommend that you specify a small value for this parameter. Otherwise, the application deployment is time-consuming.

0
AppEnvstringNo

The environment variables of the application. Specify each environment variable by using two key-value pairs. Example: {"name":"x","value":"y"},{"name":"x2","value":"y2"}. The keys of the two key-value pairs are name and value.

[{\"name\":\"env_name_1\", \"value\":\"env_value_1\"}, {\"name\":\"env_name_2\",\"value\":\"env_value_2\"}]
BuildPackIdlongNo

The build package number of EDAS Container.

  • You do not need to set the parameter if you do not need to change the EDAS Container version during the deployment.
  • Set the parameter if you need to update the EDAS Container version of the application during the deployment.

You can query the build package number by using one of the following methods:

59
ComponentIdsstringNo

The IDs of the components used by the application. The parameter is not applicable to High-Speed Framework (HSF) applications. You can call the ListComponents operation to query the component IDs. For more information, see ListComponents .

  • If you have specified the component IDs when you create the application, you do not need to set the parameter when you deploy the application.
  • Set the parameter if you need to update the component versions for the application during the deployment.

Valid values for common application components:

  • 4: Apache Tomcat 7.0.91
  • 7: Apache Tomcat 8.5.42
  • 5: OpenJDK 1.8.x
  • 6: OpenJDK 1.7.x

For more information, see the Common application parameters section of the InsertApplication topic.

7
ReleaseTypelongNo

The mode in which the deployment batches are triggered. Valid values:

  • 0: automatic.
  • 1: You must manually trigger the next batch. You can manually click Proceed to Next Batch in the console or call the ContinuePipeline operation to proceed to the next batch. We recommend that you choose the automatic mode when you call an API operation to deploy the application. For more information, see ContinuePipeline .
0
GraybooleanNo

Specifies whether canary release is selected as the deployment method. Valid values:

  • true: Canary release is selected.

    • To implement a canary release, specify the GroupId parameter, which specifies the ID of the instance group for the canary release.
    • Canary release can be selected as the deployment method for only one batch.
    • After the canary release is complete, the application is released in regular mode. The Batch parameter specifies the number of batches.
  • false: Single-batch release or phased release is selected.

true
TrafficControlStrategystringNo

The canary release policy. For more information about canary release policies, see DeployK8sApplication .

{"http":{"rules":[{"conditionType":"percent","percent":10}]}}

Response parameters

ParameterTypeDescriptionExample
object
Codeinteger

The HTTP status code that is returned.

200
ChangeOrderIdstring

The change process ID of the application deployment.

adf86823-055b-48a4-a59f-fa5582******
Messagestring

The message returned for the request.

success
RequestIdstring

The ID of the request.

d6834ee9-5045-*************

Examples

Sample success responses

JSONformat

{
  "Code": 200,
  "ChangeOrderId": "adf86823-055b-48a4-a59f-fa5582******",
  "Message": "success",
  "RequestId": "d6834ee9-5045-*************"
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history