使用负载均衡器部署到多台服务器

Deploy to multiple servers using load balancer

我在负载平衡器后面有多个 tomcat 服务器,我如何才能知道应用程序已部署到哪个服务器以及如何一次部署到多个服务器?

您可以考虑在发布管道中利用 deployment group and a deployment agent phase 进行此类部署。

Deployment groups allow you to:

  • Specify the security context and runtime targets for the agents. As you create a deployment group, you add users and give them appropriate permissions to administer, manage, view, and use the group.

  • Let you view live logs for each server as a deployment takes place, and download logs for all servers to track your deployments down to individual machines.

  • Enable you to use machine tags to limit deployment to specific sets of target servers.

如果您利用部署组,您还可以选择 automatically deploy to new targets that are added.

在Release Pipeline中,有两种部署到多台服务器的方法。

方法一、如matt所说,可以先创建一个Deployment Group。然后您可以为每个 tomcat 服务器创建目标。

您可以在 Release Pipeline 中使用以下设置一次部署到多个服务器:

  1. 在发布管道中添加部署组作业。

  2. Select部署组并设置Targets to deploy to in parallel.

当您运行发布时,您可以检查每个服务器上应用程序的部署情况。

方法 2:您可以为每个 tomcat 服务器创建 an agent pool and self-hosted agents

您可以在 Release Pipeline 中使用以下设置一次部署到多个服务器:

  1. Select 代理作业。

  2. 选择自定义代理池并设置 Multi-agent 号码。