Project: talendesb
Issue TESB-3983: Runtime: property file search and replace tool (for easier setup of new containers on the same machine
It is fairly easy to setup a new ESB Container by just copy paste the container folder to a new directory. That's it. Even so if multiple container run on the same machine at least various tcp ports needs to be changed. Today this needs to be done manually. -So we should write a small (java) tool (command line no UI) which takes a parameter file and a root path to look for the cfg files as input- -My recommendation would be that this saml java tool does a very simply 'search and replace for each 'entry' in this parameter (so we not limited the tool to port changes.)- -The parameter file should be a simple text file using two kind of search and replace features (one by protery / value and one by simple text search and repace- -(just as an example of a possible structure for the parameter file)- -FILE = org.apache.karaf.management.cfg- -KEY = rmiRegistryPort- -VALUE = 1099- -KEY = rmiServerPort- -VALUE = 44444- -FILE = org.apache.karaf.shell.cfg- -KEY = sshPort- -VALUE = 8101- -FILE = org.xxxx.cfg- -SEARCH=searchstring- -REPLACE=replace the seach string with this one- -Ideally we should provide a bat and sh script to start the tool with the '../etc path and the option to provide the parameter name additionally it would be good if we ship 3 parameter file which does a consitent port change so that 3 containers can be setup easily just by executing this tool with the given parameter files.- -Note: using a java tool should make it easier to use the tool plattform independ which is a plus compared to just providing shell sccripts- We should use the scripting capabilities provided by the Karaf console and follow the proposal in the [comment|#comment-205765] . In addition we should provide three standard configurations with the following port scheme || ||orig. container||container 1||container 2||container 2|| ||HTTP Port|8040|8041|8042|8043| ||HTTPS Port|9001|9002|9003|9004| ||RMI Registry Port|1099|1100|1101|1102| ||RMI Server Port|44444|44445|44446|44447| ||SSH Port|8101|8102|8103|8104| ||Command port|8000|8010|8020|8030| ||File transfer port|8001|8011|8021|8031| ||Monitoring port|8888|8898|8908|8918| If possible provide aliases for the three standard configurations Document the usage of the script and the three standard configurations in the Container Admin Guide. Base section 4.3. "Using OSGi containers" in the Getting Started Guide on the new configuration scripts. reference the Section in the Container Admin Guide.
Story points: 2