Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagetext
titleAgent Installer Script: js7_install_agent.sh
Usage: js7_install_agent.sh [Options] [Switches]

  Installation Options:
    --home=<directory>                  | required: directory to which the Agent will be installed
    --data=<directory>                  | optional: directory for Agent data files, default: <home>/var_4445
    --config=<directory>                | optional: directory from which the Agent reads configuration files, default: <data>/config
    --logs=<directory>                  | optional: directory to which the Agent writes log files, default: <data>/logs
    --work=<directory>                  | optional: working directory of the Agent, default: <data>
    --user=<account>                    | optional: user account for Agent daemon, default: $USER
    --home-owner=<account[:group]>      | optional: account and optionally group owning the home directory, requires root or sudo permissions
    --data-owner=<account[:group]>      | optional: account and optionally group owning the data directory, requires root or sudo permissions
    --release=<release-number>          | optional: release number such as 2.5.0 for download if --tarball is not used
    --tarball=<tar-gz-archive>          | optional: the path to a .tar.gz archive that holds the Agent installation or patch tarball,
                                        |           if not specified the Agent tarball will be downloaded from the SOS web site
    --patch=<issue-key>                 | optional: identifies a patch for a Change Management issue key
    --patch-jar=<jar-file>              | optional: the path to a .jar file that holds the patch
    --license-key=<key-file>            | optional: specifies the path to a license key file to be installed
    --license-bin=<binary-file>         | optional: specifies the path to the js7-license.jar binary file for licensed code to be installed
                                        |           if not specified the file will be downloaded from the SOS web site
    --http-port=<port>                  | optional: specifies the http port the Agent will be operated for, default: 4445
                                                    port can be prefixed by network interface, e.g. localhost:4445
    --https-port=<port>                 | optional: specifies the https port the Agent will be operated for
                                                    port can be prefixed by network interface, e.g. batch.example.com:4445
    --pid-file-dir=<directory>          | optional: directory to which the Agent writes its PID file, default: <data>/logs
    --pid-file-name=<file-name>         | optional: file name used by the Agent to write its PID file, default: agent.pid
    --instance-script=<file>            | optional: path to the Instance Start Script that will be copied to the Agent, default <home>/bin/<instance-script>
    --backup-dir=<directory>            | optional: backup directory for existing Agent home directory
    --log-dir=<directory>               | optional: log directory for log output of this script
    --exec-start=<command>              | optional: command to start the Agent, e.g. 'StartService'
    --exec-stop=<command>               | optional: command to stop the Agent, e.g. 'StopService'
    --return-values=<file>              | optional: path to a file that holds return values such as the path to a log file

  Configuration Options:
    --deploy-dir=<dir>[,<dir>]          | optional: deployment directory from which configuration files are copied to the Agent
    --agent-conf=<file>                 | optional: path to a configuration file that will be copied to <config>/agent.conf
    --private-conf=<file>               | optional: path to a configuration file that will be copied to <config>/private/private.conf
    --controller-id=<identifier>        | optional: Controller ID, default: controller
    --controller-primary-cert=<file>    | optional: path to Primary/Standalone Controller certificate file
    --controller-secondary-cert=<file>  | optional: path to Secondary Controller certificate file
    --controller-primary-subject=<id>   | optional: subject of Primary/Standalone Controller certificate
    --controller-secondary-subject=<id> | optional: subject of Secondary Controller certificate
    --agent-cluster-id=<identifier>     | optional: Agent Cluster ID
    --director-primary-cert=<file>      | optional: path to Primary/Standalone Director Agent certificate file
    --director-secondary-cert=<file>    | optional: path to Secondary Director Agent certificate file
    --director-primary-subject=<id>     | optional: subject of Primary Director Agent certificate
    --director-secondary-subject=<id>   | optional: subject of Secondary Director Agent certificate
    --keystore=<file>                   | optional: path to a PKCS12 keystore file that will be copied to <config>/private/
    --keystore-password=<password>      | optional: password for access to keystore
    --keystore-alias=<alias>            | optional: alias name for keystore entry
    --client-keystore=<file>            | optional: path to a PKCS12 client keystore file that will be copied to <config>/private/
    --client-keystore-password=<pass>   | optional: password for access to the client keystore
    --client-keystore-alias=<alias>     | optional: alias name for client keystore entry
    --truststore=<file>                 | optional: path to a PKCS12 truststore file that will be copied to <config>/private/
    --truststore-password=<password>    | optional: password for access to truststore
    --java-home=<directory>             | optional: Java Home directory for use with the Instance Start Script
    --java-options=<options>            | optional: Java Options for use with the Instance Start Script
    --service-dir=<directory>           | optional: systemd service directory, default: /usr/lib/systemd/system
    --service-file=<file>               | optional: path to a systemd service file that will be copied to <home>/bin/
    --service-name=<identifier>         | optional: name of the systemd service to be created, default js7_agent_<http-port>

    Switches:
    -h | --help                         | displays usage
    --force-sudo                        | forces use of sudo for operations on directories
    --active                            | makes Director Agent instance the default active node in an Agent Cluster
    --standby                           | makes Director Agent instance the default standby node in an Agent Cluster 
    --no-yade                           | excludes YADE from Agent installation
    --no-install                        | skips Agent installation, performs configuration updates only
    --use-install                       | uses existing Agent installation, populates data directory and creates service
    --uninstall                         | uninstalls Agent and removes <home> and <data> directories
    --uninstall_home                    | uninstalls Agent and removes <home> directory only
    --uninstall_data                    | uninstalls Agent and removes <data> directory only
    --service-selinux                   | use SELinux version of systemd service file
    --show-logs                         | shows log output of the script
    --make-dirs                         | creates the specified directories if they do not exist
    --make-service                      | creates the systemd service for the Agent
    --move-libs                         | moves an existing Agent's lib directory instead of removing the directory
    --remove-journal                    | removes an existing Agent's state directory that holds the journal files
    --restart                           | stops a running Agent and starts the Agent after installation
    --abortstop                              | abortsstops a running Agent if used with the --restart switch
    --kill  cancel                            | killscancels a running Agent if used with the --restart switch 

...

  • -h | --help
    • Displays usage.
  • --force-sudo
    • Specifies that sudo is used when performing operations on directories. This switch is required if the home or data directory is not owned by the user account running the Agent Installation Script.
  • --active
    • This setting is used for Director Agents only. It specifies that the Director Agent instance should act as the active node in a Director Agent Cluster during initial operation.
    • This setting is not required for installation of a Primary Director Agent in an Agent Cluster. It can be used to revert a Secondary Director Agent to a Primary Director Agent.
  • --standby
    • This setting is used for Director Agents only. It specifies that the Director Agent instance should act as the standby node in a Director Agent Cluster during initial operation.
    • This setting is required when installing a Secondary Director Agent instance in an Agent Cluster.
  • --no-yade
    • Excludes the YADE file transfer utility from the Agent installation.
    • YADE is available from the yade sub-directory of the Agent's <home> directory. If this switch is used then an existing yade sub-directory will be removed and YADE will not be copied from the installation tarball to the Agent's <home> directory.
  • --no-install
    • Specifies if the Installation Script should be used to update configuration items without changes to the binary files of the installation.
      In fact no installation is performed but configuration changes as for example specified with the --keystore option will be applied.
  • --use-install
    • Resuses an existing Agent installation. No installation files are specified as with the --release or --tarball parameters. Instead, the new Agent's data directory and the respective service will be created.

  • --uninstall
    • Uninstalls the Agent including the steps to stop and to remove a running Agent service and to remove the <home> and <data> directories.
  • --uninstall-home
    • Uninstalls the Agent including the steps to stop and to remove a running Agent service and removes the <home> directory only.
  • --uninstall-data
    • Uninstalls the Agent including the steps to stop and to remove a running Agent service and preserves the <data> directory only.
  • --service-selinux
  • --show-logs
    • Displays the log output created by the script if the --log-dir option is used.
  • --make-dirs
    • If directories are missing that are indicated with the --home, --backup-dir or --log-dir options then they will be created.
  • --make-service
    • Specifies that a systemd service should be created for the Agent. The service will be created from the --service-name option or its default value.
  • --move-libs
    • For an existing Agent installation the lib sub-directory includes .jar files that carry the release number in their file names. If replaced by a newer version the lib directory has to be moved or removed. This switch tries to move the directory to a previous version number as indicated from the .version file in the Agent's home directory, for example to rename lib to lib.2.3.1.
    • Files in the lib/user_lib sub-directory are preserved.
  • --remove-journal
    • If Agents have been installed for the wrong operating mode (standalone, clustered) then the Agent's journal in the JS7_AGENT_DATA/state directory can be removed. This operation removes any orders submitted to an Agent and requires the Agent to be re-registered to a Controller.
  • --restart
    • Stops a running Agent before installation and starts the Agent after installation using the Agent's Instance Start Script. This switch can be used with the --abort and stop and --killcancel switches to control the way how the Agent is terminated. This switch is ignored if the --exec-start or --exec-stop options are used.
  • --stop, --abort
    • Aborts Stops a running Agent and kills any running terminates running tasks including child processes if used with the --restart switch.  Aborting an Agent includes to terminate the Agent in an orderly manner that allows to close files consistently.Users who wish to continue running tasks should not use the switch.
    • Starting from release 2.7.2, the --stop switch is available, the --abort switch is an alias used by previous releases.
  • --cancel, --kill
    • Kills Forcibly terminates a running Agent and any running tasks if used with the --restart switch. This includes killing terminating child processes of running tasks.
    • Starting from release 2.7.2, the --cancel switch is available, the --kill switch is an alias used by previous releases.

Exit Codes

  • 1: argument errors
  • 2: non-recoverable errors
  • 3: this exit code is returned when used with the --restart switch and if it cannot be identified whether an Agent is running
  • 4: this exit code is returned if no --tarball option is used and download of the tarball reports errors
  • 5: this exit code is returned when used with the --restart switch and if the Agent cannot be started
  • 6: this exit code is returned when used with the --restart switch and if the Agent cannot be stopped
  • 7: 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.

...