Tomcat作为摇篮构建的一部分

Tomcat作为摇篮构建的一部分

本文介绍了本地运行的Apache Web服务器+ Tomcat作为摇篮构建的一部分的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们的当前环境有Tomcat的容器坐在一个Apache Web服务器的后面。基本上,Web服务器有我们使用到Tomcat实例决定路由到基于上下文根的ProxyPass规则。

Our current environment has Tomcat containers sitting behind an Apache Web Server. Basically the web server has ProxyPass rules that we use to decide which Tomcat instance to route to based on the context root.

由于我们的gradle地方构建的一部分,我们使用的是插件来旋转了一个本地的Tomcat容器和部署我们的战争吧。我还没有发现任何将让我们旋转起来Apache网络服务器来测试我们的Apache配置。

As part of our local gradle build, we are using the Cargo plugin to spin up a local tomcat container and deploying our war's to it. I haven't found anything that will let us spin up an Apache WebServer to test our apache config.

我们的目标是有两个Tomcat的容器中,A和B,以及一个Apache网络服务器C,以使得C将路由本地主机/来的appA Tomcat上和本地主机/程序appB到Tomcat B点。

Our goal is to have two Tomcat containers, A and B, and one Apache WebServer C, such that C will route localhost/appA to tomcat A and localhost/appB to tomcat B.

这是所有的努力,以运行自动化验收测试,但我还没有找到一个插件的gradle货物一样会做到这一点。

This is all in an effort to run automated acceptance tests, but I have not found a gradle plugin like cargo that will do this.

谢谢!

推荐答案

您可以用摇篮部署要么是的Apache HTTP泊坞窗或HAProxy的码头工人的做负载均衡,以你的两个和的appA tomcat的程序appB容器。您也可以使用泊坞窗为Tomcat容器。您也可以使用AWS亚马逊两亚马逊的Linux服务器,Tomcat的,要么弹性负载平衡器或负载均衡单独HAProxy的服务器。

You can use Gradle to deploy either an Apache http docker or a haproxy docker http://gitlove.us/p/million12/docker-haproxy to do the load balancing to your two appA and appB tomcat containers. You could also use docker for the tomcat containers. You could also use Amazon AWS for two Amazon Linux tomcat servers and either an elastic load balancer or a separate haproxy server for load balancing.

这篇关于本地运行的Apache Web服务器+ Tomcat作为摇篮构建的一部分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-30 06:05