Skip to main content Skip to complementary content

Deploying multiple containers using configuration adaption scripts

About this task

In order to avoid conflicts between multiple container instances, there are Karaf configuration adaption scripts which automate the adjustment of potentially conflicting parameters. They are based on the edit and property-set commands described above.

Those scripts are executed within the Karaf container and thus are supported by all platforms compatible with container. Therefore, even if they have an .sh extension, their usage is not limited to Linux based operating systems.

To deploy multiple containers:

Procedure

  1. Make sure that the default container you will copy has never been started before.
    Or if it has already been started, make sure it is stopped (using the system:shutdown or logout commands or Ctrl+D), and that its data directory has been deleted, before copying its directory and files to create containers 1, 2, and 3. Otherwise, the data in the default container (which contains absolute paths relating to the default container) will cause problems in the others.
  2. In a Linux terminal or Windows command line window, change directory to <TalendRuntimePath>.
  3. Copy the directory structure of the default container with all its content to produce the first container by executing the relevant command:
    • cp -r container container1 (Linux)

    • robocopy /e container container1 (Windows)

    • xcopy /e container container1 (older Windows with no robocopy)

    A second container is created in directory container1.
  4. Execute the same command to create the second and the third containers.
  5. Start the first container:
    • Under Linux, go to directory <TalendRuntimePath>/container1 and execute the following command:

      ./bin/trun
    • Under Windows, go to directory <TalendRuntimePath>\container1 and execute the following command:

      .\bin\trun.bat
    Start the second and the third containers in the same way.
  6. When the initialization is complete, run the configuration adaption script at the container prompt to update and save the new settings:
    • source scripts/configureC1.sh for the first container copy

    • source scripts/configureC2.sh for the second container copy

    • source scripts/configureC3.sh for the third container copy

    • source scripts/configureC0.sh resets the parameters to the default values

    All necessary parameters adjustments are done using this single script call. Changes performed by the configuration adaption scripts are persistent and reflected in the configuration files in container/etc.
  7. Shut down and restart the container after applying a configuration adaption script, to make sure the new parameters are used.
    Most of the parameter changes will be adapted "on the fly", but for the Jobserver parameters in Talend ESB this is not yet possible.

Results

The ports which are configured using the configuration scripts are described in the table below:

Parameter configureC0.sh configureC1.sh configureC2.sh configureC3.sh
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

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!