Introduction

Multiple instances of the JS7 Agent can be operated the same host. This allows, for example, jobs to be executed for different user accounts assigned the respective Agents.

  • Multiple instances require a full installation of a single Agent to be carried out.
  • Each Agent instance then requires the creation of a separate Instance Start Script and directory for configuration files, log files and journal files.
  • Note that each Agent instance has to use a different port for listening to requests from a JS7 Controller.

Agent Instance Installation

The installation of a first Agent is described in:

Creating the Instance Start Script

Once the first Agent has been installed:

  • Find the agent_instance.sh|cmd-example Instance Start Script template in the ./bin directory of the Agent installation.
  • Copy the template to agent_<port>.sh|cmd where <port> is the port that the Agent is to listen on.
  • The Instance Start Script includes settings for the environment variables and for calling the Agent Start Script  ./bin/agent.sh|cmd.
  • You can start, stop etc. the Agent with the Instance Start Script and you will not have to use command line options such as -http-port-ip-address, -kill-script and -java-options as they are specified by environment variables in the Instance Start Script.
  • On Unix you can use the Instance Start Script for JS7 - systemd Service Files for automated Startup and Shutdown with Unix Systems.
  • On Windows the Instance Start Script is used to create a service for automated start-up and shutdown.

Creating the Data Directory

With the first Agent being installed

  • Find the agent/var directory that holds sub-directories for configuration files, log files and journal files.
  • Copy the agent/var directory to a new agent/var_<port> directory with <port> being the port that the Agent is to listen on.

Example for Installation from the Unix Command Line

A second Agent instance can be installed with a few straightforward commands. The below example assumes the first Agent to be installed in the agent directory.

Example how to install from the Unix command line
# prepare an instance start script from the example using port 4455
cd agent/bin
cp -p agent_instance.sh-example agent_4455.sh

# activate/adjust environment variables in agent_4455.sh
# JS7_AGENT_HTTP_PORT=4455
# JAVA_HOME=...

# copy original var directory to var_<port> indicating the port used by the Agent
cp -p -R ../var ../var_4455

# alternatively for an existing var_4455 directory you can add the default certificate to verify signed workflows
# cp ../var/config/private/trusted-x509-keys/* ../var_4455/config/private/trusted-x509-keys/

# run the Agent
./agent_4455.sh start

# find log output
tail -100 ../var_4455/logs/agent.log




  • No labels