You can use toolkit-maven-plugin to implement a phased release on a Spring Cloud, Dubbo, or HSF application that is deployed to Enterprise Distributed Application Service (EDAS).
Automated deployment
To use toolkit-maven-plugin for automated application deployment, add the plug-in dependency, configure the plug-in, and build deployment jobs.
More configuration items
Typical scenarios
This section describes some typical deployment scenarios and the related configuration
examples.
- Scenario 1: Build a WAR or FatJar package in your on-premises environment to deploy
your application
Assume that you have an application that is deployed by using a WAR or FatJar package to EDAS in the China (Beijing) region. In this case, you want to build a WAR or FatJar package in your on-premises environment to redeploy the application. The following list describes the packaging and deployment configurations:
- Package file:
apiVersion: V1 kind: AppPackage spec: packageType: War
- Deployment file:
apiVersion: V1 kind: AppDeployment spec: type: kubernetes target: appId: # the ID of the application. The plug-in deploys the specified application. If you do not specify this parameter, the values of namespaceId and appName are used to search for the application to be deployed. namespaceId: # optional. The namespace where the application is to be deployed. If the value of appId is unavailable, the values of namespaceId and appName can be used to identify the application to be deployed. appName: # optional. The name of the application. If the value of appId is unavailable, the values of namespaceId and appName can be used to identify the application to be deployed.
- Package file:
- Scenario 2: Use the address of an existing image to deploy your application
Assume that you have an application that is deployed by using an image in the China (Beijing) region. In this case, you want to use an existing image (registry.cn-beijing.aliyuncs.com/test/gateway:latest) to redeploy the application. The following list describes the packaging and deployment configurations:
- Package file:
apiVersion: V1 kind: AppPackage spec: packageType: Image imageUrl: registry.cn-beijing.aliyuncs.com/test/gateway:latest
- Deployment file:
apiVersion: V1 kind: AppDeployment spec: type: kubernetes target: appId: # the ID of the application. The plug-in deploys the specified application. If you do not specify this parameter, the values of namespaceId and appName are used to search for the application to be deployed. namespaceId: # optional. The namespace where the application is to be deployed. If the value of appId is unavailable, the values of namespaceId and appName can be used to identify the application to be deployed. appName: # optional. The name of the application. If the value of appId is unavailable, the values of namespaceId and appName can be used to identify the application to be deployed.
- Package file:
- Scenario 3: Build an image in your on-premises environment and upload the image to
your repository to deploy your application
Assume that you have an application that is deployed by using an image in the China (Beijing) region. In this case, you want to compile and build an image in your on-premises environment and then upload the image to your Alibaba Cloud image repository to redeploy your application. The following list describes the packaging and deployment configurations:
- Package file:
apiVersion: V1 kind: AppPackage spec: packageType: Image build: docker: dockerfile: Dockerfile # the Dockerfile. imageRepoAddress: # the address of the image repository. imageTag: # the image tag. imageRepoUser: # the username used to access the image repository. imageRepoPassword: # the password used to access the image repository.
- Deployment file:
apiVersion: V1 kind: AppDeployment spec: type: kubernetes target: appId: # the ID of the application. The plug-in deploys the specified application. If you do not specify this parameter, the values of namespaceId and appName are used to search for the application to be deployed. namespaceId: # optional. The namespace where the application is to be deployed. If the value of appId is unavailable, the values of namespaceId and appName can be used to identify the application to be deployed. appName: # optional. The name of the application. If the value of appId is unavailable, the values of namespaceId and appName can be used to identify the application to be deployed.
- Package file: