简体   繁体   English

WSO2 ESB(或EI)管理特定于环境的变量的最佳实践

[英]WSO2 ESB (or EI) Best practice for managing environment specific variables

In some of my application I have to manage environment specific attributes / variables like: - folder path - rest api urls - credentials - ... 在我的某些应用程序中,我必须管理特定于环境的属性/变量,例如:-文件夹路径-rest api url-凭据-...

At the moment I'm manually setting variables in the configuration registry of each server. 目前,我正在每个服务器的配置注册表中手动设置变量。 This is quite heavy when you've to deploy a new server because you've to recreate everything manually (I haven't find a way to initialize the repository from an xml file for instance) 当您必须部署新服务器时,这非常繁重,因为您必须手动重新创建所有内容(例如,我还没有找到从xml文件初始化存储库的方法)

I've seen different approaches like - writing different version of the endpoints, sequences,... and create different car for distribution on each environment - Using local registry with different entries - Using governance registry (I've no experience with this) 我见过不同的方法,例如-编写不同版本的端点,序列等,并为每个环境创建不同的分发工具-使用带有不同条目的本地注册表-使用治理注册表(我对此没有经验)

What is according to you the best approach for this? 根据您的最佳选择是什么? Thanks for helping 感谢您的帮助

You can find the best practices guide for WSO2 Enterprise Integrator (ESB, DSS, BPS and MB) at [1]. 您可以在[1]中找到WSO2企业集成商(ESB,DSS,BPS和MB)的最佳做法指南。 It also explains how to manage environment specific variables. 它还说明了如何管理环境特定的变量。

[1] https://docs.wso2.com/display/EI611/WSO2+Enterprise+Integrator+Best+Practices [1] https://docs.wso2.com/display/EI611/WSO2+Enterprise+Integrator+Best+Practices

Finally what I've done (and what is working since some weeks now) is for each of my project : 最后,我为每个项目所做的工作(以及自几周以来一直在工作的内容)是:

  • Create a "master" maven project that will contain: 创建一个“主” maven项目,其中将包含:

    • An ESB project 一个ESB项目
    • One registry project per environment that contains all environment dependant variables (like hosts, passwords, paths, ...) 每个环境一个注册表项目,其中包含所有与环境有关的变量(例如主机,密码,路径等)
    • One Composite Application project per environment that will package the ESB project with the correct registry values (Note that if you deploy everything in the ESB event the registry project must be considered as a "EnterpriseServiceBus" Role) 每个环境一个复合应用程序项目,它将用正确的注册表值打包ESB项目(请注意,如果在ESB事件中部署所有内容,则必须将注册表项目视为“ EnterpriseServiceBus”角色)

Next step will be to integrate everything in jenkins and automatize the building of car with maven. 下一步将是整合jenkins中的所有内容,并使用maven自动构建汽车。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM