Page History
...
- Rollout of JS7 Agents is considered critical as the software allows jobs to be executed on a larger number of servers.
- Integrity of the sources for downloads of JS7 components deserves attention.
- This includes intermediate devices to which JS7 software installers are stored in a user's environment.
- It is an option to run the Agent Installer Script from
sudo
and to use the digest functionality that compares the script to a hash value stored with thesudoers
file.
- The solution provided for updating, upgrading and patching JS7 Agents is based on shell scripting by design:
- to provide readability and to rely on OS commands only,
- to deny the use of any 3rd-party components and additional dependencies that require code to be executed on the machines that run Agents.
- The Agent Installer Script can be integrated in a number of ways:
- by running one's own SSH scripts on top of the Agent Installer Script,
- by use with tools such as Ansible®, Puppet® that make use of an SSH Client,
- by use of JS7 workflow automation as explained below.
- It is recommended that a separate standalone Controller and Agent are set up for rollout purposesdeployment purposes, for details see JS7 - Deployment.
- Access to the Controller and Agent for rollout should be securely managed.
- JS7 Agents can be rolled out from a Controller to which the Agents are not registered.
...
--home
- Specifies the directory in which the Agent should be installed.
--data
- Specifies the directory in which Agent data such as configuration files should be stored.
- By default the
<home>/var_<http-port>
directory is used, see options--home
and--http-port
.
--config
- Specifies the directory from which the Agent reads configuration files.
- By default the
<data>/config
directory is used, see option--data
.
--logs
- Specifies the directory to which the Agent stores log files.
- By default the
<data>/logs
directory is used, see option--data
.
--work
- Specifies the working directory of the Agent.
- By default the
<data>
directory is used, see option--data
.
--user
- Specifies the user account for the Agent daemon.
- By default the account of the user running the Agent Installer Script is used.
--release
- Specifies a release number such as 2.3.1 for download from the SOS web site if the
--tarball
option is not used.
- Specifies a release number such as 2.3.1 for download from the SOS web site if the
--tarball
- Optionally specifies the path to a .tar.gz file that holds the Agent installation files. If this option is not used the installer tarball will be downloaded from the SOS web site for the release indicated with the
--release
option. - Download is performed with
curl
that considershttp_proxy
andhttps_proxy
environment variables and respective settings from a.curlrc
file.
- Optionally specifies the path to a .tar.gz file that holds the Agent installation files. If this option is not used the installer tarball will be downloaded from the SOS web site for the release indicated with the
--patch
- A patch is identified by an issue key in the Change Management System, for example JS-1984.
- Patches are downloaded from the SOS web site if the
--tarball
option is not used. - Patches are added to the Agent's
<home>/lib/patches
directory. Note that thepatches
sub-directory will be emptied when updating a Controller installation later on. - If a backup directory is specified then an Agent's existing installation directory will be added in a .tar.gz file in this directory.
--http-port
- Specifies the HTTP port that the Agent is operated for. The default value is 4445. The Agent by default makes use of a configuration directory
./var_<http-port>
that will be excluded from a backup taken with the--backup-dir
option. In addition the HTTP port is used to identify the Agent Instance Start Script typically available from./bin/agent_<http-port>.sh
. and to specify the value of theJS7_AGENT_HTTP_PORT
environment variable in the script. - The port can be prefixed by the network interface, for example
localhost:4445
. - When used with the
--restart
switch the HTTP port is used to identify whether the Agent is running.
- Specifies the HTTP port that the Agent is operated for. The default value is 4445. The Agent by default makes use of a configuration directory
--https-port
- Specifies the HTTPS port that the Agent is operated for. The HTTPS port is specified in the Agent Instance Start Script typically available from
./bin/agent_<http-port>.sh
. with the environment variableJS7_AGENT_HTTPS_PORT
. Use of HTTPS requires a keystore and truststore to be present, see--keystore
and--truststore
options. - The port can be prefixed by the network interface, for example
batch.example.com:4445
.
- Specifies the HTTPS port that the Agent is operated for. The HTTPS port is specified in the Agent Instance Start Script typically available from
--instance-script
- Specifies the path to an Instance Start Script that acts as a template and that is copied to the
bin
directory. Typically the nameagent_<http-port>.sh
. is used. Users are free to choose any name for the Instance Start Script. The script has to be executable for the Agent daemon, see--user
option. Permissions of the script are not changed by the Agent Installer Script. - The Agent Installer Script will perform replacements in the Instance Start Script template for known placeholders such as
<JS7_AGENT_USER>
, for details see./bin/agent_instance.sh-example
.
- Specifies the path to an Instance Start Script that acts as a template and that is copied to the
--pid-file-dir
- Specifies the directory to which the Agent stores its PID file. By default the
<data>/logs
directory is used. - When using SELinux then it is recommended to specify the
/var/run
directory, see JS7 - How to install for SELinux.
- Specifies the directory to which the Agent stores its PID file. By default the
--pid-file-name
- Specifies the name of the PID file. By default the file name
agent.pid
is used. - The PID file is created in the directory specified by the
--pid-file-dir
option.
- Specifies the name of the PID file. By default the file name
--java-home
- Specifies the Java home directory that will be made available to the Agent from the
JAVA_HOME
environment variable specified with the Agent Instance Start Script typically available from./bin/agent_<http-port>.sh
.
- Specifies the Java home directory that will be made available to the Agent from the
--java-options
- Specifies the Java options that will be made available to the Agent from the
JAVA_OPTIONS
environment variable specified with the Agent Instance Start Script typically available from./bin/agent_<http-port>.sh
. - Java options can be used for example to specify Java heap space settings for the Agent.
- If more than one Java option is used then the value has to be quoted, for example
--java-options="-Xms256m -Xmx512m"
.
- Specifies the Java options that will be made available to the Agent from the
--backup-dir
- If a backup directory is specified then an Agent's existing installation directory will be added to a .tar.gz file in this directory.
- File names are created according to the pattern:
backup_js7_agent.<hostname>.<release>.<yyyy>-<MM>-<dd>T<hh>-<mm>-<ss>.tar.gz
- For example:
backup_js7_agent.centostest_primary.2.3.1.2022-03-19T20-50-45.tar.gz
--log-dir
- If a log directory is specified then the installer script will log information about processing steps in a log file in this directory.
- File names are created according to the pattern:
install_js7_agent.<hostname>.<yyyy>-<MM>-<dd>T<hh>-<mm>-<ss>.log
- For example:
install_js7_agent.centostest_primary.2022-03-19T20-50-45.log
--service-dir
- Specifies the systemd service directory to which the Agent's service file will be copied if the
--make-service
switch is used. - By default the
a/usr/lib/systemd/system
will be used. Users can specify an alternative location.
- Specifies the systemd service directory to which the Agent's service file will be copied if the
--service-file
- Specifies the path to a systemd service file that acts as a template and that will be copied to the Agent's
<home>/bin
directory. Users are free to choose any file name as a template for the service file. The resulting service file name will beagent_<http-port>.service
. - The Agent Installer Script will perform replacements in the service file to update paths and the port to be used, for details see
./bin/agent.service-example
.
- Specifies the path to a systemd service file that acts as a template and that will be copied to the Agent's
--service-name
- Specifies the name of the systemd service that will be created if the
--make-service
switch is used. - By default the service name
js7_agent_<http-port>
will be used.
- Specifies the name of the systemd service that will be created if the
--exec-start
- This option can be used should the Agent be started after installation. For example, when using systemd then the option
--exec-start=
"StartService"
will start the Agent service provided that the related systemd service has been created manually or by use of the--make-service
switch. Alternatively users can specify individual commands, for example--exec-start="sudo systemctl start js7_agent_4445"
. - For systemd service files see see the JS7 - systemd Service Files for automated Startup and Shutdown with Unix Systems article.
- This option is an alternative to the use of the
--restart
switch which will start the Agent from its Instance Start Script. If specified this option overrules the--restart
switch.
- This option can be used should the Agent be started after installation. For example, when using systemd then the option
--exec-stop
- This option can be used should the Agent be stopped before installation. For example, when using systemd then the option
--exec-stop="StopService"
will stop the Agent service provided that the related systemd service has been created manually or by use of the--make-service
switch. Alternatively users can specify individual commands, for example--exec-stop="sudo systemctl stop js7_agent_4445"
. - For systemd service files see see the JS7 - systemd Service Files for automated Startup and Shutdown with Unix Systems article.
- This option is an alternative to the use of the -
-restart
switch which stops the Agent from its Instance Start Script. If specified this option overrules the--restart
switch.
- This option can be used should the Agent be stopped before installation. For example, when using systemd then the option
--return-values
- Optionally specifies the path to a file to which return values will be added in the format
<name>=<key>
. For example:log_file=install_js7_agent.centostest_primary.2022-03-20T04-54-31.log
backup_file=backup_js7_agent.centostest_primary.2.3.1.2022-03-20T04-54-31.tar.gz
- An existing file will be overwritten. It is recommended to use a unique file name such as
/tmp/return.$$.$RANDOM.properties
. - A value from the file can be retrieved like this:
backup=$(cat /tmp/return.$$.$RANDOM.properties | grep "backup_file" | cut -d'=' -f2)
- Optionally specifies the path to a file to which return values will be added in the format
...
1
: argument errors2
: non-recoverable errors3
: this exit code is returned when used with the--restart
switch and if it cannot be identified whether an Agent is running4
: this exit code is returned if no--tarball
option is used and download of the tarball reports errors5
: this exit code is returned when used with the--restart
switch and if the Agent cannot be started6
: this exit code is returned when used with the--restart
switch and if the Agent cannot be stopped7
: this exit code indicates that the Agent systemd service could not be started or stopped when using the--exec-start="StartService"
or--exec-stop="StopService"
options.
Replacements
The Agent Installer Script performs replacements of placeholders in installation files and configuration files by option values, for details see chapter Replacements.
...
The Agent Installer Script performs replacements of placeholders in installation files and configuration files by option values.
Installation files
<bin><home>/bin/agent_<http-port>.sh
Replacements are performed for the following placeholders used for environment variables by respective option values:
Placeholder Option Value JS7_AGENT_HOME
--home
JS7_AGENT_DATA
--data
JS7_AGENT_USER
--user
JS7_AGENT_HTTP_PORT
--http-port
JS7_AGENT_HTTPS_PORT
--https-port
JS7_AGENT_CONFIG_DIR
--config
JS7_AGENT_LOGS
--logs
JS7_AGENT_WORK_DIR
--work
JS7_AGENT_PID_FILE_DIR
--pid-file-dir
JS7_AGENT_PID_FILE_NAME
--pid-file-name
JAVA_HOME
--java-home
JAVA_OPTIONS
--java-options
<bin><home>/bin/agent_<http-port>.service
Replacements are performed for the following placeholders by respective option values:
Placeholder Option Value <JS7_AGENT_HTTP_PORT>
--http-port
<JS7_AGENT_PID_FILE_DIR>
--pid-file-dir
<JS7_AGENT_USER>
--user
<INSTALL_PATH>
--home
...
Overview
Content Tools