When you use toolkit-maven-plugin to deploy and upgrade applications, you need to configure various parameters in diverse scenarios. This topic describes how to configure the parameters that are involved when you use toolkit-maven-plugin to deploy applications.
These parameters are divided into the following three categories:
- Basic environment (env)
- Application configuration (app)
- Storage configuration (oss)
Configuration item | Parameter | Required/Example | Description |
---|---|---|---|
env | region_id | Yes | The ID of the region where the application is to be deployed. |
jar_path | target/demo.jar | The path of the package that is used to deploy the application. You can specify an absolute or a relative path. If you specify the path, you do not need to package the application file in Maven. | |
endpoint | No | The gateway point of presence (POP) connected to the gateway for the application that is deployed on Apsara Stack. | |
app | app_id | Yes | The ID of the application. |
release_type | 1 | The release type of the application. Valid values:
|
|
package_version | No | The version of the deployment package. By default, the value is a string that consists
of your pom.xml file version and the time when the current instance is created, such
as 1.0 (2018-09-27 19:00:00) .
|
|
desc | No | The description of the deployment. | |
group_id | No | The ID of the application instance group. By default, the application instance belongs to all the groups. | |
batch | No | The number of batches for the release. The default value is 1 and the maximum value is 5. | |
batch_wait_time | No | The interval between two consecutive batches of the release. Unit: minute. The default value is 0. | |
stage_timeout | No | The time-out period for each stage of the change process. Unit: minute. By default, the time-out period is 5 minutes. If you specify the batch_wait_time value, the specified batch_wait_time value is automatically added to the value of the stage_timeout parameter. When the application is running, the plug-in automatically exits if a stage waits for a time longer than this threshold value. | |
oss | region_id | No | The ID of the region where the bucket is deployed. The default value is the ID of the region where the application is to be deployed. |
bucket | No | The name of the bucket to which you want to upload your data. By default, the free Object Storage Service (OSS) bucket that is provided by Enterprise Distributed Application Service (EDAS) is used. If you use OSS for storage, you must specify the bucket parameter. Otherwise, the free OSS bucket that is automatically allocated by EDAS is used. | |
key | No | The custom path that is used to upload the application package to OSS. By default, the free OSS bucket that is provided by EDAS is used. If you use the specified OSS bucket, you can use this parameter to specify the storage path of the application package. You can also use the following variables to specify the path in a parameterized way: {region_id}, {app_id}, and {version}. For example, you can set the path to pkgs/petstore/{version}/store.war. By default, the value follows the {region_id}/{app_id}/{version} format. | |
access_key_id | No | The AccessKey ID that is used to upload the application package to OSS. | |
access_key_secret | No | The AccessKey secret that is used to upload the application package to OSS. | |
use_vpc_endpoint | true | By default, the plug-in uses the public endpoint of the specified OSS bucket to upload your package. To use the internal endpoint of the specified OSS bucket to upload your package, set the value to true. |