Large projects often contain multiple microservices that must be deployed to separate servers. This topic describes how to use Cloud Toolkit to quickly deploy these multi-module applications.
Create a host
- Open your project in IntelliJ IDEA.
- In the top menu bar of IntelliJ IDEA, choose .
- Click Add Host on the right. On the Add Host page, configure the host parameters.

The following table describes the parameters.
Parameter Description Host List The IP address of the host. If you have multiple hosts, enter each IP address on a new line. Port The port of the host. SSH Profile The Secure Shell (SSH) key. - Create new profile: Create a new private key. Set Profile Name, Method, Username, and Password. For Method, select Password or Select a Private Key.
- Use existing profile: Use an existing private key.
Note After you configure the host parameters, click Test Connection to verify the connection. If you specify multiple host IP addresses, only the connection to the first host is tested. - Review the parameters and click Add.
Deployment methods
- In the configuration list in the upper-right corner of IntelliJ IDEA, click Edit Configuration....
- On the Run/Debug Configuration page, click + in the upper-left corner and select Deploy to Host.

The following table describes the deployment parameters.
Parameter Description Name The name of the deployment. Use an English name. File - Maven Build: If your project uses Maven, you can build and deploy it directly.
- Upload File: If your project does not use Maven, or if you have a packaged deployment file on your local machine, select and upload the local file.
- Gradle Build: If your project uses Gradle, you can build and deploy it directly.
Target Host The target host. Target Directory The path on the target host where you want to deploy the microservice. After deploy The command to execute after the file is uploaded. Before launch Packages the project for deployment. - Review the deployment parameters, click Apply, and then click OK.
View deployment logs
You can view the Deploy to Host logs to check whether the deployment file was uploaded successfully and to see the results of the command execution.
该文章对您有帮助吗?