我安装了WSO2 ESB实例,并且我试图弄清楚如何根据环境(dev,qa,production)使用动态 endpoints .
我的目标是部署 the same .car file 应用程序(包含所有代码和配置) on all the environments ,并自动调整 endpoints 配置 .
我尝试使用治理注册表(如建议的here)但据我所知,在不同的'deploy paths'上部署相同的 endpoints 还需要创建/部署不同的.car应用程序(使用静态引用修改每个服务到适当的环境,哪种违反了具有可配置 endpoints 的想法 .
哪种方法可以解决在三个环境中部署一个应用程序的问题,而无需对代码进行静态引用并避免使用脚本?
1 回答
你有不同的解决方案:
1)使用ESB嵌入式注册 .
ESB的每个实例都具有嵌入式注册表,其中包含环境的 endpoints . 您需要在每个环境中使用注册表的CAR应用程序(请注意,所有的连接点都具有相同的路径) .
http://wso2.com/library/articles/2014/03/development-and-deployment-of-c-app-based-artifacts-on-multiple-environments/
https://github.com/sohaniwso2/NewRepoArticle/tree/master/StudentRegistrationProject
2)使用Governance注册表 .
治理注册表部署了所有 endpoints (trunk-dev,qa,pro等) .
ESB的每个实例都定义注册表的远程实例并安装到环境的路径 .
安装 endpoints 后,对于ESB,您将拥有环境的 endpoints ,因此相同的 endpoints 可在每个环境中运行 .
http://wso2.com/library/tutorials/2010/04/sharing-registry-space-across-multiple-product-instances/