If you have an Alibaba Cloud Elastic Compute Service (ECS) instance, you can use Cloud Toolkit to quickly deploy applications. This topic describes how to use Cloud Toolkit in Eclipse to deploy an application to an ECS instance.
Prerequisites
-
An ECS instance is available in the region where you want to deploy the application. For more information, see Purchase an ECS instance.
Note If you purchased your ECS instance before December 1, 2017, you must install the Cloud Assistant client. For more information, see Install the Cloud Assistant client. -
Cloud Toolkit is installed and configured in Eclipse. For more information, see Install and configure Cloud Toolkit in Eclipse.
Notes
Because of a limitation in Alibaba Cloud Assistant, you can use only the root account for deployment. To deploy your application using a different account, use one of the following methods:
- Switch accounts in the command script.
- Use the feature to deploy applications to a server. For more information, see Deploy an application to a Linux server.
Procedure
-
Open your project in Eclipse.
-
Right-click your application project and choose from the shortcut menu.
-
In the Deploy to Alibaba Cloud dialog box, set the deployment parameters, and then click Deploy.

The following list describes the parameters:
-
Deploy File: Select Maven Build or Upload File.
- Maven Build: If your project uses Maven, Cloud Toolkit can build and deploy it.
- Upload File: If your project does not use Maven, or if you have a local compressed deployment package, you can upload the package.
- Gradle Build: Builds and deploys your Gradle project.
-
Target ECS and Account: Select the target account and region. Then, select the target ECS instance.
-
Target Directory: Enter the deployment path on the ECS instance. Examples:
##Deployment path: /root/tomcat/webapps
##Deployment path: /root/springbootdemo
##Deployment path: /root/tomcat/webapps
##Deployment path: /root/nodejs-demo
-
Command: The command to run after the application package is deployed. This is usually a start command. Example:
sh /root/restart.shNote For more information about the command syntax, see Command syntax.
-
Verify the results
After the deployment starts, Eclipse displays logs in the Console pane. You can check the logs to verify the deployment results.