Versions Compared

Key

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

...

Security

Secure rollout of JS7 components products is critical. It is therefore recommended that the solution described here is adjusted to suit specific security needs.

  • Rollout of JS7 JOC Cockpit is considered critical as the software allows jobs to be executed on a larger number of servers.
    • Attention should be paid to the integrity of the sources for JS7 component downloadsproduct downloads.
    • This includes intermediate devices on which JS7 software installers are stored in a user's environment.
    • One option is to run the JOC Cockpit Installation Script from sudo and to use the digest functionality that compares the script to a hash value stored with the sudoers file.
  • The solution for updating, upgrading and patching the JS7 JOC Cockpit is based on shell scripting by design
    • to provide readability and to rely only on OS commands,
    • to prohibit the use of any 3rd-party components and additional dependencies that require code to be executed on the machines that run the JOC Cockpit.
  • The JOC Cockpit Installation Script can be integrated in a number of ways:
    • by running one's own SSH script on top of the JOC Cockpit Installation Script,
    • by use of 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 used for deployment purposes, for details see JS7 - Deployment.
      • Access to the Controller and Agent for rollout should be securely managed.

...

  • The script is available for Linux, MacOS®, AIX® and , Solaris® using bash, dash, ksh, and zsh POSIX-compatible shells. For AIX® and , Solaris® automated installation is supported, automated configuration is not.
  • The script can be used to install, update or patch a JOC Cockpit instance using the installation options. In addition it can be used to configure a JOC Cockpit instance, for example in case of certificate renewal.
  • The script terminates with exit code 0 to signal success, with exit code 1 for command line argument errors and with exit code 2 for non-recoverable errors.
  • The script is intended as a baseline example for customization by JS7 users and by SOS within the scope of professional services.
  • Consider information from JS7 - JOC Cockpit Command Line Operation.

...

Code Block
languagetext
titleJOC Cockpit Installation Script: js7_install_joc.sh
Usage: js7_install_joc.sh [Options] [Switches]

  Installation Options:
    --setup-dir=<directory>            | optional: directory to which the JOC Cockpit installer will be extracted
    --response-dir=<directory>         | optional: setup response directory holds joc_install.xml and JDBC Drivers
    --release=<release-number>         | optional: release number such as 2.2.3 for download if --tarball is not used
    --tarball=<tar-gz-archive>         | optional: the path to a .tar.gz archive that holds the JOC Cockpit tarball,
                                       |           if not specified the JOC Cockpit tarball will be downloaded from the SOS web site
    --home=<directory>                 | optional: home directory of JOC Cockpit, required if --patch or --backup-dir is used
    --data=<directory>                 | optional: data directory of JOC Cockpit
    --cluster-id=<identifier>          | optional: Cluster ID of the JOC Cockpit instance, default: joc
    --instance-id=<number>             | optional: unique number of a JOC Cockpit instance in a cluster, range 0 to 99, default: 0
    --user=<account>                   | optional: user account for JOC Cockpit daemon, default: joc_install.xml setting
current user
     --patch=<issue-key>home-owner=<account[:group]>     | optional: account and optionally group owning the home directory, requires |root optional:or identifies a patch for an existing JOC Cockpit installationsudo permissions
    --jar=<jar-file>        data-owner=<account[:group]>     | optional: account and optionally group owning the data directory, requires root or sudo permissions
    --patch=<issue-key>                | optional: identifies thea pathpatch tofrom a .jarChange fileManagement that holds the patchissue key
    --licensepatch-key=<key-file><identifier>           | optional: specifies the pathpatch type toAPI aor licenseGUI keyand filerunning that will be installednumber, API-1, API-2 etc.
    --licensepatch-binjar=<binary<jar-file>             | optional: specifies the path to thea js7-license.jar binary file that holds the patch
    --license-key=<key-file>           | optional: specifies the path to a license key file that will 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
    --backup-dir=<directory>           | optional: backup directory for existing JOC Cockpit home directory
    --log-dir=<directory>              | optional: log directory for log output of this script
    --exec-start=<command>             | optional: specifies the command to start JOC Cockpit, e.g. 'StartService'
    --exec-stop=<command>              | optional: specifies the command to stop the JOC Cockpit, e.g. 'StopService'
    --return-values=<file>             | optional: specifies a file that receives return values such as the path to a log file

  Configuration Options:
    --deploy-dir=<directory>[,<dir>]   | optional: deployment directories from which configuration files will be copied to JOC Cockpit<data>/resources/joc
    --properties=<file>                | optional: specifies the joc.properties file that will be copied to <home><data>/jetty_base/resources/joc/
    --title=<title>                    | optional: title of the JOC Cockpit instance in the GUI, default: joc_install.xml setting
    --security-level=low|medium|high   | optional: security level of JOC Cockpit instance, default: joc_install.xml setting
    --dbms-config=<hibernate-file>     | optional: DBMS Hibernate configuration file, default: joc_install.xml setting
    --dbms-driver=<jdbc-driver-file>   | optional: DBMS JDBC Driver file, default: joc_install.xml setting
    --dbms-init=byInstaller|byJoc|off  | optional: DBMS create objects by installer, on start-up or none, default: joc_install.xml setting
    --http-port=<port>                 | optional: specifies the http port the JOC Cockpit will be operated for, default: 4446
                                                   port can be prefixed by network interface, e.g. localhost:4446
    --https-port=<port>                | optional: specifies the https port the JOC Cockpit will be operated for, default:
                                                   port can be prefixed by network interface, e.g. joc.example.com:4446
    --ini=<ini-file[,ini-file]>        | optional: one or more Jetty config files http.ini, https.ini, ssl.ini etc. will be copied to <home>/jetty_base<data>/start.d/
    --keystore=<path>                  | optional: path to a PKCS12 keystore file that will be copied to <data>/resources/joc/
    --keystore-password=<password>     | optional: password for access to keystore
    --keystore-alias=<alias-name><alias>      | optional:     | optional: alias name for keystore entry
     --client-truststorekeystore=<path>  <file>              | optional: path to a PKCS12 truststoreclient keystore file that will be copied to <data>/resourdesresources/joc/
    --client-truststorekeystore-password=<password><pass>   | optional: password for truststore password
access to the client keystore
    --client-javakeystore-home=<directory>        alias=<alias>    | optional: Javaalias Home directoryname for useclient withkeystore theentry
 Instance Start Script
   --truststore=<path>     --java-options=<options>           | optional: Java Options for use with the Instance Start Script
    --service-dir=<directory>          | optional: path to a PKCS12 truststore file that will be copied to <data>/resources/joc/
    --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>/jetty/bin/
    --service-name=<name>              | optional: name of the systemd service to be created, default js7_joc

  Switches:
    -h | --help                        | displays usage
    -u | --as-user                     | installs configuration directories as current user, other directories as root using sudo
    -E | --preserve-env                | preserves environment variables when switching to root using sudo -E
    --noforce-installsudo                       | skipsforces JOCuse Cockpitof installation,sudo performsfor configurationoperations updateson onlydirectories
    --uninstallas-api-server                    | installs the API |Server uninstallswithout JOC CockpitGUI
     --no-jetty config                        | skips JettyJOC servletCockpit containerconfiguration installationchanges
     --showno-logsinstall                       | |skips JOC showsCockpit loginstallation, outputperforms ofconfiguration thechanges scriptonly
    --make-dirsuninstall                        | createsuninstalls the specified directories if they do not existJOC Cockpit
    --makeno-servicejetty                       | creates the| systemdskips serviceJetty forservlet JOCcontainer Cockpitinstallation
    --restartshow-logs                          | stopsshows alog runningoutput JOCof Cockpit and starts JOC Cockpit after installationthe script
    --make-killdirs                        | creates the specified directories if they do not exist
    --make-service                     | creates the killssystemd aservice runningfor JOC Cockpit if
 used with the --restart switch

Installation Options

                          | stops a running JOC Cockpit and starts JOC Cockpit after installation
    --kill                             | kills a running JOC Cockpit if used with the --restart switch

Installation Options

    • --setup
    • --setup-dir
      • Specifies the directory in which the installer for the JOC Cockpit should be extracted. This is not the JOC Cockpit installation directory but the directory that holds installer files.
    • --response-dir
      • Specifies the directory that holds a copy of  the JOC Cockpit installer joc_install.xml response file and optionally related files. This file is available after extraction of the installer tarball and specifies options for installation of the JOC Cockpit. Files in the response directory are copied to the working directory specified with the --setup-dir option. and are applied when invoking the installer by ./setup.sh -u joc_install.xml, see JS7 - JOC Cockpit - Headless Installation on Linux and Windows.to which the installer for JOC Cockpit should be extracted. This is not the JOC Cockpit installation directory but a temporary directory used during installation. Users can remove the directory after installation.
      • Without this option the /tmp directory will be used to extract the installation tarball and to run the setup.sh installation script. The temporary directory is removed after installation.
      • Consider that policies in user environments can deny execution of scripts in the /tmp directory. In this situation a different location has to be specified.
    • --response-dir
      • Generally it is discouraged to use a response file for installation as it is preferable to make use the options offered by this script.
      • Specifies the directory that holds a copy of  the JOC Cockpit installer joc_install.xml response file and optionally related files. This file is available after extraction of the installer tarball and specifies options for installation of the JOC Cockpit. Files in the response directory are copied to the working directory specified with the --setup-dir option. and are applied when invoking the installer by ./setup.sh -u joc_install.xml, see JS7 - JOC Cockpit - Headless Installation on Linux and Windows.
      • Users should keep their copy of the response file and specify the directory with this command line option. Response files can be re-used within the same Users should keep their copy of the response file and specify the directory with this command line option. Response files can be re-used within the same minor release of the JOC Cockpit, for example when updating from release 2.2.1 to 2.2.4. When updating, for example, from release 2.2.x to 2.3.x it is recommended to check from the installer tarball if a newer version of the file is available.
      • Users should note that the response file can hold references to a license file and to a JDBC Driver .jar file. The JOC Cockpit setup installation is executed performed from the working setup directory specified with the --setup-dir option and otherwise from a temporary directory. Paths in the joc_install.xml response file can be used relative to the working setup directory, for example using sos.pem for a license file without specifying a directory if the license file is available in the response directory as it will be copied to the working setup directory.
    • --release
      • Specifies a release number such as 2.3.1 for download from the SOS web site if the --tarball option is not used.
    • --tarball
      • Optionally specifies the path to a .tar.gz file that holds the JOC Cockpit 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 which takes account of http_proxy and https_proxy environment variables and the relevant settings from a .curlrc file.
    • --home
      • Specifies the directory in which the JOC Cockpit should be installed.
      • This option overwrites the JOC Cockpit installation directory specified in the joc_install.xml response file with the <installpath> element.
    • --data
      • Specifies Optionally specifies the directory in which the JOC Cockpit installs configuration files. If the option is omitted then the home directory will used.
      • If specified then the The configuration directory is accessible from the jetty_base symlink in the JOC Cockpit home directory.
      • This option overwrites the JOC Cockpit configuration directory specified in the joc_install.xml response file with the <entry key="jettyBaseDir" value="..."/> element.
    • --user
      • The JOC Cockpit joc_install.xml response file holds the runningUser setting that optionally specifies the user account of the JOC Cockpit daemon service. This setting allows to take precedence over the response file setting.
      • The user account specified will be used for the JOC Cockpit installation. 
    • --patch
      • A patch is identified by the release number to which it is applied which is specified with the --release option and by
        • the JOC Cockpit security level: low, medium, high,
        • a sequential number such as patch-1, patch-2.
        • A patch is specified as --patch=low.patch-1, --patch=low.patch-2, --patch=medium.patch-1 etc.
      • For JOC Cockpit patches are consolidated, i.e. patch-2 includes any patches of patch-1.
      • Patches are downloaded from the SOS web site if the --tarball option is not used.
      • Patches are added to the JOC Cockpit's JETTY_BASE/webapps/joc/WEB-INF/classes directory. When updating JOC Cockpit later on then the classes sub-directory will be emptied.
      • If a backup directory is specified then a JOC Cockpit's existing installation directory will be added to a .tar.gz file in this directory.
    • --jar
      • Optionally specifies the path to a .jar file that holds the patch.
    • --license-key
      • Optionally the path to a license key file is specified. Customers with a Commercial License receive the license key file from SOS in .pem or .crt format.
      • For details see JS7 - How to apply a JS7 License Key.
      • This option is an alternative to specifying the license key file with the joc_install.xml response file, see --response-dir option.
    • --license-bin
      • Optionally the path to the js7-license.jar binary file is specified that includes code that is available for use with a Commercial License only, see JS7 - How to apply a JS7 License Key.
      • Should this argument be omitted and a license key file be specified with the --license-key option then the binary file is downloaded from the SOS Web Site, see JS7 - Download.
      • This option is an alternative to specifying the license key file with the joc_install.xml response file, see --respons-dir option. If the response files specifies a license key then the binary file for licensed code is automatically installed.
    • --backup-dir
      • If a backup directory is specified then an existing JOC Cockpit's installation directory will be added to a .tar.gz file in this directory.
      • File names are created according to the pattern: backup_js7_joc.<hostname>.<release>.<yyyy>-<MM>-<dd>T<hh>-<mm>-<ss>.tar.gz
      • For example: backup_js7_joc.centostest_primary.2.3.1.2022-03-19T20-50-45.tar.gz
    • --log-dir
      • If a log directory is specified then the JOC Cockpit Installation Script logs information about processing steps to a log file in this directory.
      • File names are created like this: install_js7_joc.<hostname>.<yyyy>-<MM>-<dd>T<hh>-<mm>-<ss>.log
      • For example: install_js7_joc.centostest_primary.2022-03-19T20-50-45.log
    • --exec-start
      • This option can be used should JOC Cockpit be started after installation. For example, when using systemd then the option --exec-start="StartService" will start the JOC Cockpit 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_joc".
      • For systemd service files see the JS7 - systemd Service Files for automated Startup and Shutdown with Unix Systems article.
      • This option is an alternative for use of the -restart switch that starts the JOC Cockpit from its Start Script. If specified this option overrules the --restart switch.
    • --exec-stop
      • This option can be used should JOC Cockpit be stopped before installation. For example, when using systemd then the option --exec-stop="StopService" will stop the JOC Cockpit 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_joc".
      • For systemd service files see the JS7 - systemd Service Files for automated Startup and Shutdown with Unix Systems article.
      • This option is an alternative to use of the -restart switch that stops the JOC Cockpit from its Start Script. If specified this option overrules the --restart switch.
      • Should the the home or data directory be owned by an account that is different from the one running the Agent Installation Script then consider use of the --home-owner and --data-owner options.
    • --home-owner
      • Optionally specifies the user account and group that should own the home directory. By default the home directory is created and owned by the current user account.
      • Syntactically a user account and optionally a group can be specified, for example --home-owner=sos or --home-owner=sos:sos. If the group is not specified then a group with the name of the user account is assumed.
      • Use of this option requires sudo permissions for the user account that runs the JOC Cockpit Installation Script.
    • --data-owner
      • Optionally specifies the user account and group that should own the data directory. By default the data directory is created and owned by the current user account.
      • Syntactically a user account and optionally a group can be specified, for example --data-owner=sos or --data-owner=sos:sos. If the group is not specified then a group with the name of the user account is assumed.
      • Use of this option requires sudo permissions for the user account that runs the JOC Cockpit Installation Script.
    • --patch
      • Specifies the Change Management issue key that is assigned the patch, for example JS-1984.
      • The patch is identified from its patch key that is specified with the --patch-key option.
      • The release number to which a patch is applicable is specified with the --release option.
      • Patches are downloaded from the SOS web site if the --tarball option is not used.
      • If a backup directory is specified then a backup of the JOC Cockpits installation directory will be created in this directory.
    • --patch-key
    • --patch-jar
      • Optionally specifies the path to a .jar file that holds the patch if a patch is provided in this format.
    • --license-key
      • Optionally the path to a license key file is specified. Customers with a Commercial License receive the license key file in .pem or .crt format.
      • For details see JS7 - How to apply a JS7 License Key.
      • This option is an alternative to specifying the license key file with the joc_install.xml response file, see --response-dir option.
    • --license-bin
      • Optionally the path to the js7-license.jar binary file is specified that includes code that is available for use with a Commercial License only, see JS7 - How to apply a JS7 License Key.
      • Should this option be omitted and a license key file be specified with the --license-key option then the binary file is downloaded from the SOS Web Site, see JS7 - Download.
      • This option is an alternative to specifying the license key file with the joc_install.xml response file, see --respons-dir option. If the response files specifies a license key then the binary file for licensed code is automatically installed.
    • --backup-dir
      • If a backup directory is specified then existing JOC Cockpit's home and data directories will be added to two .tar.gz files in this directory.
      • File names are created according to the pattern: backup_js7_joc.<hostname>.<release>.[home|data].<yyyy>-<MM>-<dd>T<hh>-<mm>-<ss>.tar.gz
        • For example: backup_
      --return-values
      • Optionally specifies the path to a file which return values will be added to in the format <name>=<key>. For example:
        • log_file=install_js7_joc.centostest_primary.2022-03-20T04-54-31.log
        • backup_file=backup_js7_joc.centostest_primary.2.3.1.home.2022-03-20T0419T20-5450-3145.tar.gz
      • An existing file will be overwritten. It is recommended that a unique file name such as /tmp/return.$$.$RANDOM.properties is used.
      • A value from the file can be retrieved like this:
        • backup=$(cat /tmp/return.$$.$RANDOM.properties | grep "backup_file" | cut -d'=' -f2)

Configuration Options

  • --deploy-dir
    • Specifies the path to a deployment directory that holds configuration files and sub-directories that will be copied to the <config> folder. A deployment directory allows to manage central copies of configuration files such as hibernate.cfg.xml, log4j2.xml etc.
    • Use of a deployment directory has lower precedence as files can be overwritten by individual options such as --properties etc.
  • --properties
    • Specifies the path to a joc.properties file that will be copied to the JETTY_BASE/resources/joc directory. While any file name can be used for the source file the target file name will be joc.properties.
  • --ini
    • Specifies one or more *.ini files that include settings for the Jetty Servlet Container, for example http.inihttps.ini, ssl.ini. The files will be copied to the JOC Cockpit JETTY_BASE/start.d directory. For use with HTTPS connections the following settings in the ssl.ini file have to be adjusted:
      • jetty.sslContext.keyStorePath
      • jetty.sslContext.keyStorePassword
      • jetty.sslContext.keyManagerPassword
      • jetty.sslContext.trustStorePath
      • jetty.sslContext.trustStorePassword
    • The option takes a number of files as arguments that are separated by comma, for example: --ini="/js7-deployment/ssl.ini,/js7-deployement/https.ini".
  • --title
    • The title of the JOC Cockpit instance is displayed with its dashboard. It serves to distinguish JOC Cockpit instances operated as a cluster.
    • This option has precedence over the respective setting specified in the joc_install.xml response file with the <entry key="jocTitle" value="..."/> element.
  • --security-level
    • The JOC Cockpit is operated in one of the security levels low, medium, high, see JS7 - Security Architecture. By default the low security level is used.
    • This option has precedence over the respective setting specified in the joc_install.xml response file with the <entry key="securityLevel" value="..."/> element.
  • --dbms-config
    • Optionally specifies the path to a Hibernate configuration file that includes settings to access the JS7 - Database.
    • This option has precedence over the respective setting specified in the joc_install.xml response file with the <entry key="hibernateConfFile" value="..."/> element.
  • --dbms-driver
    • Optionally specifies the path to a JDBC Driver .jar file that is used for access to the DBMS. See JS7 - Database to identify JDBC Drivers that ship with JS7.
    • This option has precedence over the respective setting specified in the joc_install.xml response file with the <entry key="connector" value="..."/> element.
  • --dbms-init
    • Optionally specifies the point in time when database objects will be created:
      • byInstaller: Database objects will be created during installation of JOC Cockpit.
      • byJoc: Database objects will be created on start-up of JOC Cockpit, for example when used for Containers.
      • off: Database objects will not be created. This assumes that users create database objects on their own before running JOC Cockpit. The JOC Cockpit installation tarball includes the db sub-directory that holds *.sql files for the respective DBMS that can be used to populate the JS7 - Database independently from installing JOC Cockpit.
  • --http-port
    • Specifies the HTTP port that the JOC Cockpit is operated for. This argument takes precedence over the port setting in the joc_install.xml response file.
    • Users are discouraged to enable both HTTP and HTTPS protocols as it undermines security to operate JOC Cockpit for both protocols.
    • The port can be prefixed by the network interface, for example joc.example.com:4446.
    • When used with the --restart switch, the HTTP port is used to determine if JOC Cockpit is running.
  • --https-port
    • Specifies the HTTPS port that the JOC Cockpit is operated for. This argument takes precedence over the port setting in the joc_install.xml response file.
    • Users are discouraged to enable both HTTP and HTTPS protocols as it undermines security to operate JOC Cockpit for both protocols.
    • The port can be prefixed by the network interface, for example joc.example.com:4448.
    • Use of HTTPS connections requires additional settings, see --ini , --keystore and --truststore options.
    • When used with the --restart switch, the HTTPS port is used to determine if JOC Cockpit is running.
  • --keystore
    • Specifies the path to a PKCS12 keystore file that holds the private key and certificate for HTTPS connections to JOC Cockpit.
    • Users are free to specify any file name, typically the name https-keystore.p12 is used. The keystore file will be copied to the <home>/jetty_base/resources/joc directory.
    • If a keystore file is made available then the JOC Cockpit's <home>/jetty_base/start.d/ssl.ini file has to hold a reference to the keystore location and optionally the keystore password. It is therefore recommended to use the --ini option to deploy an individual ssl.ini file. The following settings are automatically updated in the ssl.ini file:
      • jetty.ssl.host: optionally specifies the network interface that is available from the --http-port option provided that the port is prefixed with the network interface, for example joc.example.com:4446.
      • jetty.ssl.port: specifies the HTTPS port that is automatically updated from the --http-port option.
      • jetty.sslContext.keyStorePath: specifies the path to the keystore relative to the <home>/jetty_base/resources/joc directory.
    • Further settings in the ssl.ini file such as the keystore password have to be deployed from a copy of the file using the --ini option.
    • Assigning a keystore for HTTPS connections disables HTTP access and enables HTTPS access only to JOC Cockpit. The same port is alternatively used for HTTP and HTTPS connections.
    • For automating the creation of keystores see JS7 - How to add SSL TLS Certificates to Keystore and Truststore.
  • --keystore-password
    • Specifies the password for access to the keystore. Use of a keystore password is required.
  • --keystore-alias
    • If a keystore holds more than one private key, for example if separate pairs of private keys/certificates for server authentication and client authentication exist, then it is not determined which private key/certificate will be used. The alias name of a given private key/certificate is specified when the entry is added to the keystore. The alias name allows to indicate a specific private key/certificate to be used.
  • --truststore
    • Specifies the path to a PKCS12 truststore file that holds the certificate(s) for HTTPS connections from JOC Cockpit to a Controller instance, LDAP server etc.
    • Users are free to specify any file name, typically the name https-truststore.p12 is used. The truststore file will be copied to the <home>/jetty_base/resources/joc directory.
    • If a truststore file is made available then the JOC Cockpit's <home>/jetty_base/start.d/ssl.ini file has to hold a reference to the truststore location and optionally the truststore password. It is therefore recommended to use the --ini option to deploy an individual ssl.ini file. The following settings are automatically updated in the ssl.ini file:
      • jetty.sslContext.trustStorePath: specifies the path to the truststore relative to the <home>/jetty_base/resources/joc directory.
    • Further settings in the ssl.ini file such as the truststore password have to be deployed from a copy of the file using the --ini option.
    • For automating the creation of truststores see JS7 - How to add SSL TLS Certificates to Keystore and Truststore.
  • --truststore-password
    • Specifies the password for access to the truststore. Use of a password is recommended as it is not primarily intended to protect access to the truststore. The password is intended to allow verification that truststore entries have been added using the same password.
  • --java-home
    • Specifies the Java home directory that will be made available to JOC Cockpit from the JAVA_HOME environment variable.
  • --java-options
    • Specifies the Java options that will be made available to JOC Cockpit from the JAVA_OPTIONS environment variable.
    • Java options can be used for example to specify Java heap space settings for JOC Cockpit.
    • If more than one Java option is used then the value has to be quoted, for example --java-options="-Xms256m -Xmx512m".
  • --service-dir
    • Specifies the systemd service directory to which the JOC Cockpit'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.
  • --service-file
    • Specifies the path to a systemd service file that acts as a template and that is copied to the JOC Cockpit's <home>/jetty/bin directory.
    • Users are free to choose any file name as a template for the service file. The resulting service file name will be joc.service.
    • The JOC Cockpit Installation Script will perform replacements in the service file to update paths to be used.
  • --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_joc will be used.

Switches

  • -h | --help
    • Displays usage.
  • --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 argument will be applied.
  • --uninstall
    • Uninstalls the JOC Cockpit including the steps to stop & remove a running JOC Cockpit service and to remove the <home> and <data> directories.
  • -u | --as-user
  • -E | --preserve-env
    • When installing for the current user account using the -u switch then environment variables are preserved when switching to the root account using sudo -E. This switch corresponds to use of ./setup.sh -u -E joc_install.xml.
  • --no-jetty
    • Skips installing the Jetty Servlet Container. This option can be used if users wish to operate JOC Cockpit form a different Servlet Container such as Tomcat.
  • --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 JOC Cockpit. The service will be created from the --service-name option or its default value.
  • --restart
    • Stops a running JOC Cockpit before installation and starts the JOC Cockpit after installation using the JOC Cockpit's Start Script. This switch can be used with the --kill switch to control the way how JOC Cockpit is terminated. This switch is ignored if the --exec-start and --exec-stop options are used.
  • --kill
    • Kills a running JOC Cockpit if used with the --restart switch.

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 if a JOC Cockpit instance 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 JOC Cockpit instance cannot be started
    • 6: this exit code is returned when used with the --restart switch and if the JOC Cockpit instance cannot be stopped
    • 7: this exit code indicates that the JOC Cockpit systemd service could not be started or stopped when using the --exec-start="StartService" or --exec-stop="StopService" options.
    • 8: this exit code indicates that the JOC Cockpit installation has failed
    • 9: this exit code indicates failure of the JOC Cockpit installation from logs

Replacements

The JOC Cockpit Installation Script performs replacements of settings in configuration files by option values, for details see chapter Replacements.

Examples

The following examples represent typical use cases. Users should consider to specify current releases, see JS7 - Download.

Install or Update from Download using individual Database

Code Block
languagebash
titleExample for use of JOC Cockpit Installation Script
./js7_install_joc.sh \
    --release=2.5.2 \
    --home=/home/sos/joc \
    --http-port=4446 \
    --dbms-config=/home/sos/joc-deployment/hibernate.cfg.xml \
    --java-home="/opt/java/jdk-11.0.2+9" \
    --as-user \
    --make-dirs

# installs JOC Cockpit for the current user account
# requires that the user creates a hibernate.cfg.xml file for database access prior to installation
# specifies the Java home location
# downloads the JOC Cockpit release tarball from the SOS Web Site
# creates the home directory if it does not exist
# extracts the tarball and runs the JOC Cockpit installer
# operates JOC Cockpit for HTTP port 4446

Note:

Install or Update from Download using embedded Database

Code Block
languagebash
titleExample for use of JOC Cockpit Installation Script
curl 'https://repo1.maven.org/maven2/com/h2database/h2/1.4.200/h2-1.4.200.jar' -o /tmp/h2-1.4.200.jar

./js7_install_joc.sh \
    --release=2.5.2 \
    --home=/home/sos/joc \
    --http-port=4446 \
    --dbms-driver=/tmp/h2-1.4.200.jar \
    --dbms-config=H2 \
    --java-home="/opt/java/jdk-11.0.2+9" \ 
    --as-user \
    --make-dirs

# downloads the H2 embedded database from Maven Central using curl
# downloads the JOC Cockpit release tarball from the SOS Web Site
# specifies the built-in H2 configuration to be used and the location of the JDBC Driver .jar file
# specifies the Java home location
# creates the home directory if it does not exist
# extracts the tarball and runs the JOC Cockpit installer
# operates JOC Cockpit for HTTP port 4446

Install or Update from Tarball using individual database

      • A backup is intended to restore files in the JOC Cockpit's installation and data directories. The purpose of a backup is to restore files that are replaced by the JOC Cockpit Installation Script, its purpose is not to restore a JOC Cockpit installation that otherwise is corrupted or removed. No backup will be taken if one of the --uninstall options is used.
    • --log-dir
      • If a log directory is specified then the JOC Cockpit Installation Script will write information about processing steps to a log file in this directory.
      • File names are created like this: install_js7_joc.<hostname>.<yyyy>-<MM>-<dd>T<hh>-<mm>-<ss>.log
      • For example: install_js7_joc.centostest_primary.2022-03-19T20-50-45.log
    • --exec-start
      • This option can be used should JOC Cockpit be started after installation. For example, when using systemd then the option --exec-start="StartService" will start the JOC Cockpit 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_joc".
      • For systemd service files see the JS7 - systemd Service Files for automated Startup and Shutdown with Unix Systems article.
      • This option is an alternative for use of the -restart switch that starts the JOC Cockpit from its Start Script. If specified this option overrules the --restart switch.
    • --exec-stop
      • This option can be used should JOC Cockpit be stopped before installation. For example, when using systemd then the option --exec-stop="StopService" will stop the JOC Cockpit 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_joc".
      • For systemd service files see the JS7 - systemd Service Files for automated Startup and Shutdown with Unix Systems article.
      • This option is an alternative to use of the -restart switch that stops the JOC Cockpit from its Start Script. If specified this option overrules the --restart switch.
    • --return-values
      • Optionally specifies the path to a file which return values will be added to in the format <name>=<key>. For example:
        • log_file=install_js7_joc.centostest_primary.2022-03-20T04-54-31.log
        • backup_file=backup_js7_joc.centostest_primary.2.3.1.2022-03-20T04-54-31.tar.gz
      • An existing file will be overwritten. It is recommended that a unique file name such as /tmp/return.$$.$RANDOM.properties is used.
      • A value from the file can be retrieved like this:
        • backup=$(cat /tmp/return.$$.$RANDOM.properties | grep "backup_file" | cut -d'=' -f2)

Configuration Options

  • --deploy-dir
    • Specifies the path to a deployment directory that holds configuration files and sub-directories that will be copied to the <config> folder. A deployment directory allows to manage central copies of configuration files such as hibernate.cfg.xml, log4j2.xml etc.
    • Use of a deployment directory has lower precedence as files can be overwritten by individual options such as --properties etc.
  • --properties
    • Specifies the path to a joc.properties file that will be copied to the <data>/resources/joc directory. While any file name can be used for the source file the target file name will be joc.properties.
  • --ini
    • Specifies one or more *.ini files that include settings for the Jetty Servlet Container, for example http.inihttps.ini, ssl.ini. The files will be copied to the JOC Cockpit <data>/start.d directory. For use with HTTPS connections the following settings in the ssl.ini file have to be adjusted:
      • jetty.sslContext.keyStorePath
      • jetty.sslContext.keyStorePassword
      • jetty.sslContext.keyManagerPassword
      • jetty.sslContext.trustStorePath
      • jetty.sslContext.trustStorePassword
    • The option takes a number of files as arguments that are separated by comma, for example: --ini="/js7-deployment/ssl.ini,/js7-deployement/https.ini".
  • --title
    • The title of the JOC Cockpit instance is displayed with its dashboard. It serves to distinguish JOC Cockpit instances operated as a cluster.
    • This option has precedence over the respective setting specified in the joc_install.xml response file with the <entry key="jocTitle" value="..."/> element.
  • --security-level
    • The JOC Cockpit is operated in one of the security levels low, medium, high, see JS7 - Security Architecture. By default the low security level is used.
    • This option has precedence over the respective setting specified in the joc_install.xml response file with the <entry key="securityLevel" value="..."/> element.
  • --dbms-config
    • Optionally specifies the path to a Hibernate configuration file that includes settings to access the JS7 - Database.
    • This option has precedence over the respective setting specified in the joc_install.xml response file with the <entry key="hibernateConfFile" value="..."/> element.
    • For use with an H2 database users should specify the value H2 for this option instead of the path to a Hibernate configuration file.
  • --dbms-driver
    • Optionally specifies the path to a JDBC Driver .jar file that is used for access to the DBMS. See JS7 - Database to identify JDBC Drivers that ship with JS7.
    • This option has precedence over the respective setting specified in the joc_install.xml response file with the <entry key="connector" value="..."/> element.
  • --dbms-init
    • Optionally specifies the point in time when database objects will be created:
      • byInstaller: Database objects will be created during installation of JOC Cockpit.
      • byJoc: Database objects will be created on start-up of JOC Cockpit, for example when used for Containers.
      • off: Database objects will not be created. This assumes that users create database objects on their own before running JOC Cockpit. The JOC Cockpit installation tarball includes the db sub-directory that holds *.sql files for the respective DBMS that can be used to populate the JS7 - Database independently from installing JOC Cockpit.
  • --http-port
    • Specifies the HTTP port that the JOC Cockpit is operated for. This option takes precedence over the port setting in the joc_install.xml response file.
    • Users are discouraged to enable both HTTP and HTTPS protocols as it undermines security to operate JOC Cockpit for both protocols.
    • The port can be prefixed by the network interface, for example joc.example.com:4446.
    • When used with the --restart switch, the HTTP port is used to determine if JOC Cockpit is running.
  • --https-port
    • Specifies the HTTPS port that the JOC Cockpit is operated for. This option takes precedence over the port setting in the joc_install.xml response file.
    • Users are discouraged to enable both HTTP and HTTPS protocols as it undermines security to operate JOC Cockpit for both protocols.
    • The port can be prefixed by the network interface, for example joc.example.com:4448.
    • Use of HTTPS connections requires additional settings, see --ini , --keystore and --truststore options.
    • When used with the --restart switch, the HTTPS port is used to determine if JOC Cockpit is running.
  • --keystore
    • Specifies the path to a PKCS12 keystore file that holds the private key and certificate for HTTPS connections to JOC Cockpit.
    • Users are free to specify any file name, typically the name https-keystore.p12 is used. The keystore file will be copied to the <data>/resources/joc directory.
    • If a keystore file is made available then the JOC Cockpit's <data>/start.d/ssl.ini file has to hold a reference to the keystore location and optionally the keystore password. Users can deploy an individual ssl.ini file using the --ini option. The following settings are automatically updated in the ssl.ini file:
      • jetty.ssl.host: optionally specifies the network interface that is available from the --https-port option provided that the port is prefixed with the network interface, for example joc.example.com:4446.
      • jetty.ssl.port: specifies the HTTPS port that is automatically updated from the --https-port option.
      • jetty.sslContext.keyStorePath: specifies the path to the keystore relative to the <data>/resources/joc directory.
    • The path to the keystore file and related settings as specified with the --keystore-password and --keystore-alias options are similarly added to the joc.properties file in the <data>/resources/joc directory. If the --client-keystore, --client-keystore-password, --client-keystore-alias options are used then they will be applied by precedence to the joc.properties file, however, they will not be applied to the ssl.ini configuration file.
    • Assigning a keystore for HTTPS connections requires to use the --https-port option and suggests not to use the --http-port option in order to disable HTTP access and to enable HTTPS access only to JOC Cockpit.
    • For automating the creation of keystores see JS7 - How to add SSL TLS Certificates to Keystore and Truststore.
  • --keystore-password
    • Specifies the password for access to the keystore. Use of a keystore password is required.
    • Consider use of quotes when specifying the password.
  • --keystore-alias
    • If a keystore holds more than one private key, for example if separate pairs of private keys/certificates for server authentication and client authentication exist, then it is not determined which private key/certificate will be used. The alias name of a given private key/certificate is specified when the entry is added to the keystore. The alias name allows to indicate a specific private key/certificate to be used.
  • --client-keystore
    • Use of this setting is optional. It can be used if separate certificates for Server Authentication and Client Authentication are used.
    • The Client Authentication private key and certificate can be added to a client keystore. The location and configuration of a client keystore correspond to the--keystore argument.
  • --client-keystore-password
    • Specifies the password for access to the client keystore. Use of a client keystore password is required if a client keystore is used.
    • Consider explanations for the --keystore-password argument.
  • --client-keystore-alias
    • If a client keystore holds more than one private key, for example if a number of private keys/certificates for client authentication exist, then it is not determined which private key/certificate will be used.
    • Consider explanations for the --keystore-alias argument.
  • --truststore
    • Specifies the path to a PKCS12 truststore file that holds the certificate(s) for HTTPS connections from JOC Cockpit to a Controller instance, LDAP server etc.
    • Users are free to specify any file name, typically the name https-truststore.p12 is used. The truststore file will be copied to the <home>/jetty_base/resources/joc directory.
    • If a truststore file is made available then the JOC Cockpit's <data>/start.d/ssl.ini file has to hold a reference to the truststore location and optionally the truststore password. It is therefore recommended to use the --ini option to deploy an individual ssl.ini file. The following settings are automatically updated in the ssl.ini file:
      • jetty.sslContext.trustStorePath: specifies the path to the truststore relative to the <data>/resources/joc directory.
    • Further settings in the ssl.ini file such as the truststore password have to be deployed from a copy of the file using the --ini option.
    • For automating the creation of truststores see JS7 - How to add SSL TLS Certificates to Keystore and Truststore.
  • --truststore-password
    • Specifies the password for access to the truststore. Use of a password is recommended as it is not primarily intended to protect access to the truststore. The password is intended to allow verification that truststore entries have been added using the same password.
    • Consider use of quotes when specifying the password.
  • --java-home
    • Specifies the Java home directory that will be made available to JOC Cockpit from the JAVA_HOME environment variable.
  • --java-options
    • Specifies the Java options that will be made available to JOC Cockpit from the JAVA_OPTIONS environment variable.
    • Java options can be used for example to specify Java heap space settings for JOC Cockpit, see JS7 - FAQ - Which Java Options are recommended.
    • If more than one Java option is used then the value has to be quoted, for example --java-options="-Xms256m -Xmx512m".
  • --service-dir
    • Specifies the systemd service directory to which the JOC Cockpit's service file will be copied if the --make-service switch is used.
    • By default the /usr/lib/systemd/system directory will be used. Users can specify an alternative location.
  • --service-file
    • Specifies the path to a systemd service file that acts as a template and that is copied to the JOC Cockpit's <home>/jetty/bin directory.
    • Users are free to choose any file name as a template for the service file. The resulting service file name will be joc.service.
    • The JOC Cockpit Installation Script will perform replacements in the service file to update paths to be used.
  • --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_joc will be used.

Switches

  • -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 JOC Cockpit Installation Script.
  • --as-api-server
    • Installs JOC Cockpit as an API Server without GUI.
      Jira
      serverSOS JIRA
      columnIdsissuekey,summary,issuetype,created,updated,duedate,assignee,reporter,priority,status,resolution
      columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
      serverId6dc67751-9d67-34cd-985b-194a8cdc9602
      keyJOC-1504
  • --no-config
    • Specifies that no configuration changes should be applied. This switch can be used for example if JOC Cockpit should be started or stopped only, using the --restart or --exec-start, --exec-stop options.
  • --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.
  • --uninstall
    • Uninstalls the JOC Cockpit including the steps to stop & remove a running JOC Cockpit systemd service and to remove the <home> and <data> directories.
  • -u | --as-user
  • -E | --preserve-env
    • When installing for the current user account using the -u switch then environment variables are preserved when switching to the root account using sudo -E. This switch corresponds to use of ./setup.sh -u -E joc_install.xml.
  • --no-jetty
    • Skips installing the Jetty Servlet Container. This option can be used if users wish to operate JOC Cockpit from a different Servlet Container such as Tomcat.
  • --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 JOC Cockpit. The service will be created from the --service-name option or its default value.
  • --restart
    • Stops a running JOC Cockpit before installation and starts the JOC Cockpit after installation using the JOC Cockpit's Start Script. This switch can be used with the --kill switch to control the way how JOC Cockpit is terminated. This switch is ignored if the --exec-start and --exec-stop options are used.
  • --kill
    • Kills a running JOC Cockpit if used with the --restart switch.

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 if a JOC Cockpit instance 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 JOC Cockpit instance cannot be started
    • 6: this exit code is returned when used with the --restart switch and if the JOC Cockpit instance cannot be stopped
    • 7: this exit code indicates that the JOC Cockpit systemd service could not be started or stopped when using the --exec-start="StartService" or --exec-stop="StopService" options.
    • 8: this exit code indicates that the JOC Cockpit installation has failed
    • 9: this exit code indicates failure of the JOC Cockpit installation from logs

Replacements

The JOC Cockpit Installation Script performs replacements of settings in configuration files by option values, for details see chapter Replacements.

Examples

The following examples represent typical use cases. Users should consider to specify current releases, see JS7 - Download.

Install or Update from Download using individual Database

Code Block
languagebash
titleExample for use of JOC Cockpit Installation Script
./js7_install_joc.sh \
    --release=2.5.2 \
    --home=/opt/sos-berlin.com/js7/joc \
    --data=/var/sos-berlin.com/js7/joc \
    --http-port=4446 \
    --dbms-config=/home/sos/joc-deployment/hibernate.cfg.xml \
    --java-home="/opt/java/jdk-11.0.2+9" \
    --as-user \
    --make-dirs

# installs JOC Cockpit for the current user account
# requires that the user creates a hibernate.cfg.xml file for database access prior to installation
# specifies the Java home location
# downloads the JOC Cockpit release tarball from the SOS Web Site
# creates the home and data directories if they do not exist
# 
Code Block
languagebash
titleExample for use of JOC Cockpit Installation Script
curl 'https://download.sos-berlin.com/JobScheduler.2.5/js7_joc_linux.2.5.2.tar.gz' -o /tmp/js7_joc_linux.2.5.2.tar.gz

./js7_install_joc.sh \
    --tarball=/tmp/js7_joc_linux.2.5.2.tar.gz \
    --home=/home/sos/joc \
    --http-port=4446 \
    --dbms-config=/home/sos/joc-deployment/hibernate.cfg.xml \
    --java-home="/opt/java/jdk-11.0.2+9" \
    --as-user \
    --make-dirs

# downloads the release tarball from the SOS Web Site using curl
# specifies the Java home location
# creates the home directory if it does not exist
# extracts the tarball and runs the JOC Cockpit installer
# operates JOC Cockpit for HTTP port 4446

Note:

Install or Update

...

from Download using embedded Database

Code Block
languagebash
titleExample for use of JOC Cockpit Installation Script
curl 'https://repo1.maven.org/maven2/com/h2database/h2/1.4.200/h2-1.4.200.jar' \
    -o /tmp/h2-1.4.200.jar

./js7_install_joc.sh \
     --release=2.5.2 \
     --home=/opt/sos-berlin.com/js7/joc \
    --data=/var/sos-berlin.com/js7/joc \ 
     --http-port=4446 \
     --dbms-configdriver=/hometmp/sos/joc-deployment/hibernate.cfg.xmlh2-1.4.200.jar \
    --dbms-config=H2 \
    --java-home="/opt/java/jdk-11.0.2+9" \ 
    --as-user \
    --make-dirs

# usersdownloads mightthe preferH2 toembedded storedatabase configurationfrom dataMaven andCentral logusing data separately fromcurl
# downloads the homeJOC directory
#Cockpit installsrelease JOCtarball Cockpit forfrom the currentSOS userWeb accountSite
# requiresspecifies that the userbuilt-in createsH2 a hibernate.cfg.xml file for database access prior to installation
# specifies the Java home location
# downloads the JOC Cockpit release tarball from the SOS Web Siteconfiguration to be used and the location of the JDBC Driver .jar file
# specifies the Java home location
# creates the home and data directorydirectories if itthey doesdo not exist
# extracts the tarball and runs the JOC Cockpit installer
# operates JOC Cockpit for HTTP port 4446

Install or Update from

...

Tarball using individual database

Code Block
languagebash
titleExample for use of JOC Cockpit Installation Script
curl 'https://download.sos-berlin.com/JobScheduler.2.5/js7_install_joc.shjoc_linux.2.5.2.tar.gz' \
    --release=o /tmp/js7_joc_linux.2.5.2.tar.gz

./js7_install_joc.sh \
    --hometarball=/hometmp/sos/jocjs7_joc_linux.2.5.2.tar.gz \
     --http-port=4446home=/opt/sos-berlin.com/js7/joc \
    --license-keydata=/homevar/sos-berlin.com/js7/joc-deployment/example.pem \
    --http-port=4446 \
     --dbms-config=/home/sos/joc-deployment/hibernate.cfg.xml \
    --java-home="/opt/java/jdk-11.0.2+9" \
    --as-user \
      --make-dirs

# installsdownloads the JOCrelease Cockpittarball forfrom the SOS Web currentSite userusing accountcurl
# requires thatspecifies the userJava creates a hibernate.cfg.xml file for database access prior to installation
# specifies the location of the JS7 license key
# specifies the Java home location
# downloads the JOC Cockpit release tarball from the SOS Web Site
# creates the home directory if it doeshome location
# creates the home and data directories if they do not exist
# extracts the tarball and runs the JOC Cockpit installer
# operates JOC Cockpit for HTTP port 4446

Install or Update

...

owning Home and Data Directories to separate Accounts

Code Block
languagebash
titleExample for use of JOC Cockpit Installation Script
curl 'https://download.sos-berlin.com/JobScheduler.2.5/js7js7_install_joc_linux..sh \
    --release=2.5.2.tar.gz' -o /tmp/js7_joc_linux.2.5.2.tar.gz
curl 'https://download. \
    --home=/opt/sos-berlin.com/JobScheduler.2.5/js7-license.jar' -o /tmp/js7-license.jar

./js7_install_joc.sh \
    --tarball=/tmp/js7_joc_linux.2.5.2.tar.gzjs7/joc \
    --data=/var/sos-berlin.com/js7/joc \
    --user=sos2 \
    --home=/home/sos/joc-owner=sos1:sos1 \
     --data-owner=sos2:sos2 \
    --http-port=4446 \
      --dbms-config=/home/sos/joc-deployment/hibernate.cfg.xml \
    --license-key=/home/sos/joc-deployment/example.pem \
    --license-bin=/tmp/js7-license.jar \
    --java-home="/opt/java/jdk-11.0.2+9" \
    --as-user \
    --force-sudo \
    --make-dirs

# requires that the user creates a hibernate.cfg.xml file for database access prior to installation
# specifies the Java home location
# downloads the JOC Cockpit release tarball from the SOS Web Site using curl
# downloadscreates the binaryhome fileand fordata licenseddirectories codeif tothey enabledo cluster operations using curlnot exist
# specifiesextracts the location of the JS7 license key tarball and ofruns the .jarJOC file for licensed binary codeCockpit installer
# specifiesowns the Java home location
#and createsdata thedirectories hometo directoryseparate ifuser itaccounts doesand not existgroups
# extractsspecifies the tarball and runs 'sos2' run-time account with write access to the JOCdata Cockpit installerdirectory
# operates JOC Cockpit for HTTP port 4446

Install or Update

...

using the same Home and Data Directories

Code Block
languagebash
titleExample for use of JOC Cockpit Installation Script
curl 'https://download.sos-berlin.com/JobScheduler.2.5/js7js7_install_joc_linux..sh \
    --release=2.5.2.tar.gz' -o /tmp/js7_joc_linux.2.5.2.tar.gz
curl 'https://download.sos-berlin.com/JobScheduler.2.5/js7-license.jar' -o /tmp/js7-license.jar

./js7_install_joc.sh \
    --tarball=/tmp/js7_joc_linux.2.5.2.tar.gz \
    --home=/home/sos/joc \
    --http-port=4446 \
    --dbms-config=/home/sos/joc-deployment/hibernate.cfg.xml \
    --clusterjava-id=jochome="/opt/java/jdk-11.0.2+9" \
    --instanceas-id=1user \
    --title="Secondary JOC Cockpit" \
    --home=/home/sos/joc \
    --http-port=4446 \
    --dbms-config=/home/sos/joc-deployment/hibernate.cfg.xml \
    --license-key=/home/sos/joc-deployment/example.pem \
    --license-bin=/tmp/js7-license.jar \
    --java-home="/opt/java/jdk-11.0.2+9" \
    --as-user \
    --make-dirs
make-dirs

# users can use the same home and data directory to store configuration data and log data
# installs JOC Cockpit for the current user account
# requires that the user creates a hibernate.cfg.xml file for database access prior to installation
# specifies the Java home location
# downloads the JOC Cockpit release tarball from the SOS Web Site using curl
# downloadscreates the binaryhome filedirectory forif licensedit codedoes to enable cluster operations using curlnot exist
# specifiesextracts the Clustertarball IDand thatruns is the same for all JOC Cockpit instances in a clusterinstaller
# specifiesoperates theJOC InstanceCockpit IDfor thatHTTP is a number between 0 and 99:
#   Instance IDs specify the ordering of JOC Cockpit icons in the Dashboard
#   the first JOC Cockpit started becomes the active node in a cluster independent from its Instance ID
# specifies the title that acts as a caption for JOC Cockpit icons in the Dashbaord
# specifies the location of the JS7 license key and of the .jar file for licensed binary code
# specifies the Java home location
# creates the home directory if it doesport 4446

Install or Update from Download with Commercial License

Code Block
languagebash
titleExample for use of JOC Cockpit Installation Script
./js7_install_joc.sh \
    --release=2.5.2 \
    --home=/opt/sos-berlin.com/js7/joc \
    --data=/var/sos-berlin.com/js7/joc \
    --http-port=4446 \
    --license-key=/home/sos/joc-deployment/example.pem \
    --dbms-config=/home/sos/joc-deployment/hibernate.cfg.xml \
    --java-home="/opt/java/jdk-11.0.2+9" \
    --as-user \
    --make-dirs

# installs JOC Cockpit for the current user account
# requires that the user creates a hibernate.cfg.xml file for database access prior to installation
# specifies the location of the JS7 license key
# specifies the Java home location
# downloads the JOC Cockpit release tarball from the SOS Web Site
# creates the home and data directories if they do not exist
# extracts the tarball and runs the JOC Cockpit installer
# operates JOC Cockpit for HTTP port 4446

Install or Update from Tarball

...

with Commercial License

Code Block
languagebash
titleExample for use of JOC Cockpit Installation Script
curl 'https://download.sos-berlin.com/JobScheduler.2.5/js7_joc_linux.2.5.2.tar.gz' \
    -o /tmp/js7_joc_linux.2.5.2.tar.gz
curl 'https://download.sos-berlin.com/JobScheduler.2.5/js7-license.jar' \
    -o /tmp/js7-license.jar

./js7_install_joc.sh \
    --tarball=/tmp/js7_joc_linux.2.5.2.tar.gz \
    --response-dirhome=/homeopt/sos-berlin.com/js7/joc-deployment/response \
    --java-data=/var/sos-berlin.com/js7/joc \
    --http-port=4446 \
    --dbms-config=/home/sos/joc-deployment/hibernate.cfg.xml \
    --license-key=/home/sos/joc-deployment/example.pem \
    --license-bin=/tmp/js7-license.jar \
    --java-home="/opt/java/jdk-11.0.2+9" \
    --as-user \
    --make-dirs

# downloads the JOC Cockpit release tarball from the SOS Web Site using curl
# specifiesdownloads athe responsebinary directoryfile thatfor holds
#licensed code to enable the joc_install.xml file for installation options such as the HTTP Port
#    the hibernate.cfg.xml configurationcluster operations using curl
# specifies the location of the JS7 license key and of the .jar file for licensed databasebinary accesscode
# specifies the Java home location
# creates the home and data directories if they doedo not exist
# extracts the tarball and runs the JOC Cockpit installer
# operates JOC Cockpit for HTTP port 4446

Note:

...

Install or Update

...

Secondary JOC Cockpit Instances for Cluster Operations

Code Block
languagebash
titleExample for use of JOC Cockpit Installation Script
curl 'https://download.sos-berlin.com/JobScheduler.2.5/js7_joc_linux.2.5.2.tar.gz' \
    -o /tmp/js7_joc_linux.2.5.2.tar.gz

./js7_install_joc.shcurl 'https://download.sos-berlin.com/JobScheduler.2.5/js7-license.jar' \
     --tarball=o /tmp/js7_-license.jar

./js7_install_joc.sh \
    --tarball=/tmp/js7_joc_linux.2.5.2.tar.gz \
    --instance-id=1 \
    --title="Secondary JOC Cockpit" \
    --home=/opt/sos-berlin.com/js7/joc \
    --data=/homevar/sos-berlin.com/js7/joc \
     --http-port=4446 \
      --dbms-config=/home/sos/joc-deployment/hibernate.cfg.xml \
    --javalicense-homekey="/opthome/javasos/jdkjoc-11.0.2+9"deployment/example.pem \ 
    --execlicense-start=StartServicebin=/tmp/js7-license.jar \
    --execjava-stop=StopService \
    --make-servicehome="/opt/java/jdk-11.0.2+9" \
    --as-user \
    --make-dirs

# downloads the JOC Cockpit release tarball from the SOS Web Site using curl
# createsdownloads the home directory if it does not exist
# extracts the tarball and runs the JOC Cockpit installer
# creates the JOC Cockpit's systemd service
# stops and starts the JOC Cockpit's systemd service
# operates JOC Cockpit for HTTP port 4446

Install or Update and Stop/Start using individual Commands

Code Block
languagebash
titleExample for use of JOC Cockpit Installation Script
curl 'https://download.sos-berlin.com/JobScheduler.2.5/js7_joc_linux.2.5.2.tar.gz' -o /tmp/js7_joc_linux.2.5.2.tar.gz

./js7_install_joc.sh \
    --tarball=/tmp/js7_joc_linux.2.5.2.tar.gz \
    --home=/home/sos/joc \
    --http-port=4446 \
    --dbms-config=/home/sos/joc-deployment/hibernate.cfg.xml \
    --java-home="/opt/java/jdk-11.0.2+9" \ 
    --exec-start="sudo systemctl start js7_joc" \
    --exec-stop="sudo systemctl stop js7_joc" \
    --as-user \
    --make-dirs

# downloads the JOC Cockpit release tarball from the SOS Web Site using curl
# creates the home directory if it does not exist
# extracts the tarball  binary file for licensed code to enable cluster operations using curl
# specifies the Instance ID that is a number between 0 and 99:
#   Instance IDs specify the ordering of JOC Cockpit icons in the Dashboard
#   the first JOC Cockpit started becomes the active node in a cluster independent from its Instance ID
# specifies the title that acts as a caption for JOC Cockpit icons in the Dashbaord
# specifies the location of the JS7 license key and of the .jar file for licensed binary code
# specifies the Java home location
# creates the home and data directories if they do not exist
# extracts the tarball and runs the JOC Cockpit installer
# stops and starts the JOC Cockpit by individual commands
# operates JOC Cockpit for HTTP port 4446

Install or Update

...

from Tarball using a Response Directory

Code Block
languagebash
titleExample for use of JOC Cockpit Installation Script
curl 'https://download.sos-berlin.com/JobScheduler.2.5/js7_joc_linux.2.5.2.tar.gz' -\
    -o /tmp/js7_joc_linux.2.5.2.tar.gz

./js7_install_joc.sh \
      --tarball=/tmp/js7_joc_linux.2.5.2.tar.gz \
    --home=/home/sos/joc \
    --http-port=4446 \
    --dbms-config=response-dir=/home/sos/joc-deployment/hibernate.cfg.xmlresponse \
    --java-home="/opt/java/jdk-11.0.2+9" \
    --restart \
    --as-user \
    --make-dirs

# downloads the JOC Cockpit release tarball from the SOS Web Site using curl
# createsspecifies thea homeresponse directory if it does not exist
# extracts that holds
#    the path to the tarballhome and runsdata thedirectories
# JOC Cockpit installer
# stops and starts JOC Cockpit by its instance start script <home>/jetty/bin/jetty.sh
# operates JOC Cockpit for HTTP port 4446

...

the joc_install.xml file for installation options such as the HTTP Port
#    the hibernate.cfg.xml configuration file for database access
# specifies the Java home location
# creates the home and data directories if they do not exist
# extracts the tarball and runs the JOC Cockpit installer
# operates JOC Cockpit for HTTP port 4446

Note:

Install or Update and Stop/Start using systemd

Code Block
languagebash
titleExample for use of JOC Cockpit Installation Script
curl 'https://download.sos-berlin.com/JobScheduler.2.5/js7_joc_linux.2.5.2.tar.gz' \
    -o /tmp/js7_joc_linux.2.5.2.tar.gz

./js7_install_joc.sh \
     --tarball=/tmp/js7_joc_linux.2.5.2.tar.gz \
    --home=/opt/sos-berlin.com/js7/joc \
    --data=/homevar/sos-berlin.com/js7/joc \
     --http-port=4446 \
    --dbms-config=/home/sos/joc-deployment/hibernate.cfg.xml \
    --java-home="/opt/java/jdk-11.0.2+9" \ 
    --javaexec-options="-Xmx1g -Xms512m"start=StartService \
    --exec-stop=StopService \
     --make-restartservice \
    --as-user \
    --make-dirs

# downloads the JOC Cockpit release tarball from the SOS Web Site using curl
# creates the home and data directorydirectories if itthey doesdo not exist
# extracts specifiesthe tarball Javaand optionsruns forthe JOC Cockpit installer
# extractscreates the tarball and runs the JOC Cockpit's systemd installerservice
# stops and starts the JOC Cockpit's by its instance start script <home>/jetty/bin/jetty.shsystemd service
# operates JOC Cockpit for HTTP port 4446

Install or Update

...

and Stop/Start using individual Commands

Code Block
languagebash
titleExample for use of JOC Cockpit Installation Script
curl 'https://download.sos-berlin.com/JobScheduler.2.5/js7_joc_linux.2.5.2.tar.gz' \
    -o /tmp/js7_joc_linux.2.5.2.tar.gz
retval=/tmp/js7_install_joc.$$.tmp

./js7_install_joc.sh \
     --tarball=/tmp/js7_joc_linux.2.5.2.tar.gz \
    --home=/homeopt/sos-berlin.com/js7/joc \
    --data=/var/sos-berlin.com/js7/joc \
    --http-port=4446 \
    --dbms-config=/home/sos/joc-deployment/hibernate.cfg.xml \
    --java-home="/opt/java/jdk-11.0.2+9" \ 
      --backupexec-dir=/tmp/backupsstart="sudo systemctl start js7_joc" \
    --logexec-dir=/tmp/logs \
    --return-values=$retval stop="sudo systemctl stop js7_joc" \
    --as-user \
    --restart \
    --make-dirs

log_file=$(cat $retval | grep "log_file" | cut -d'=' -f2)
backup_file=$(cat $retval | grep "backup_file" | cut -d'=' -f2)

# downloads the JOC Cockpit # downloads the JOC Cockpit release tarball from the SOS Web Site using curl
# creates the home and data directorydirectories if itthey doesdo not exist
# extracts the tarball and runs the JOC Cockpit installer
# stops and starts the JOC Cockpit by its instance start script <home>/jetty/bin/jetty.shindividual commands
# operates JOC Cockpit for HTTP port 4446
# return values include the path to the log file and to the backup file

Install or Update

...

and Stop/Start using Instance Start Script

Code Block
languagebash
titleExample for use of JOC Cockpit Installation Script
curl 'https://download.sos-berlin.com/JobScheduler.2.5/js7_joc_linux.2.5.2.tar.gz' \
    -o /tmp/js7_joc_linux.2.5.2.tar.gz
retval=/tmp/js7_install_joc.$$.tmp

./js7_install_joc.sh \
    --tarball=/tmp/js7_joc_linux.2.5.2.tar.gz \
    --home=/homeopt/sos-berlin.com/js7/joc \
    --data=/var/sos-berlin.com/js7/joc \
    --http-port=4446 \
    --dbms-config=/home/sos/joc-deployment/hibernate.cfg.xml \
    --java-home="/opt/java/jdk-11.0.2+9" \
     --backup-dir=/tmp/backupsrestart \
    --log-dir=/tmp/logsas-user \
    --return-values=$retval \
    --as-user \
    --restart \
    --show-logs \
    --make-dirs
 || ( backup=$(cat $retval | grep "backup_file" | cut -d'=' -f2) \
      && ( test -e "$backup" ) && \
      ./js7_install_joc.sh \
          --tarball=$backupmake-dirs

# downloads the JOC Cockpit release tarball from the SOS Web Site using curl
# creates the home and data directories if they do not exist
# extracts the tarball and runs the JOC Cockpit installer
# stops and starts JOC Cockpit by its instance start script <home>/jetty/bin/jetty.sh
# operates JOC Cockpit for HTTP port 4446

Install or Update using Java Options

Code Block
languagebash
titleExample for use of JOC Cockpit Installation Script
curl 'https://download.sos-berlin.com/JobScheduler.2.5/js7_joc_linux.2.5.2.tar.gz' \
    -o /tmp/js7_joc_linux.2.5.2.tar.gz

./js7_install_joc.sh \
    --tarball=/tmp/js7_joc_linux.2.5.2.tar.gz \
    --home=/homeopt/sos-berlin.com/js7/joc \
    --data=/var/sos-berlin.com/js7/joc \
      --http-port=4446 \
          --dbms-config=/home/sos/joc-deployment/hibernate.cfg.xml \
          --java-home="/opt/java/jdk-11.0.2+9" \
          --logjava-dir=/tmp/logs \
          --as-useroptions="-Xmx1g -Xms512m" \
           --restart \
          --showas-logsuser )

log_file=$(cat $retval | grep "log_file" | cut -d'=' -f2)
backup_file=$(cat $retval | grep "backup_file" | cut -d'=' -f2)   \
    --make-dirs

# downloads the JOC Cockpit release tarball from the SOS Web Site using curl
# creates the home and data directorydirectories if itthey doesdo not exist
# extractsspecifies theJava tarballoptions andfor runsJOC the JOC Cockpit installer
# revertsextracts the installationtarball and fromruns the backupJOC archive in case of failureCockpit installer
# stops and starts JOC Cockpit by its instance start script <home>/jetty/bin/jetty.sh
# operates JOC Cockpit for HTTP port 4446

Install or Update

...

with Return Values

Code Block
languagebash
titleExample for use of JOC Cockpit Installation Script
curl 'https://download.sos-berlin.com/JobScheduler.2.5/js7_joc_linux.2.5.2.tar.gz' \
    -o /tmp/js7_joc_linux.2.5.2.tar.gz
retval=/tmp/js7_install_joc.$$.tmp

./js7_install_joc.sh \
    --tarball=/tmp/js7_joc_linux.2.35.12.tar.gz \
    --home=/opt/sos-berlin.com/js7/joc \
    --data=/homevar/sos-berlin.com/js7/joc \
     --httpshttp-port=4446 \
    --dbms-config=/home/sos/joc-deployment/hibernate.cfg.xml \
    --java-home="/opt/java/jdk-11.0.2+9" \
      --backup-keystoredir=/home/sos/joc-deployment/https-keystore.p12tmp/backups \
    --keystorelog-password="jobscheduler"dir=/tmp/logs \
    --return-truststore=/home/sos/joc-deployment/https-truststore.p12 values=$retval \
    --truststore-password="jobscheduler"as-user \
    --exec-start=StartServicerestart \
    --exec-stop=StopService \
    --make-service \
    --as-user \
    --make-dirs \make-dirs

log_file=$(cat $retval | grep "log_file" | cut -d'=' -f2)
backup_file=$(cat $retval | grep "backup_file" | cut -d'=' -f2)

# downloads the JOC Cockpit release tarball from the SOS Web Site using curl
# creates the home directoryand data directories if itthey doesdo not exist
# extracts the tarball and runs the JOC Cockpit installer
# deploysstops keystoreand andstarts truststoreJOC files
#Cockpit createsby theits systemd serviceinstance start script <home>/jetty/bin/jetty.sh
# stops and startsoperates JOC Cockpit byfor itsHTTP systemdport service4446
# operates JOC Cockpit for HTTPS port 4446

Note:

  • For details about certificates and HTTPS connections see JS7 - JOC Cockpit HTTPS Connections.
  • The <data>/resources/joc/joc.properties and <data>/start.d/ssl.ini configuration files hold references to the JOC Cockpit's keystore and truststore to verify the connection from JOC Cockpit to the Controller using HTTPS mutual authentication.
  • Users have a choice how to provide the required configuration:
    • The JOC Cockpit Installation Script performs replacements of placeholders in the joc.properties and ssl.ini configuration files from option values, for details see chapter Replacements.
    • Users can manually adjust configuration items in the joc.properties file that they specify for the JOC Cockpit Installation Script., see JS7 - JOC Cockpit Configuration Items.

Renew Certificates for HTTPS Connections

 return values include the path to the log file and to the backup file

Install or Update with Fallback

Code Block
languagebash
titleExample for use of JOC Cockpit Installation Script
curl 'https://download.sos-berlin.com/JobScheduler.2.5/js7_joc_linux.2.5.2.tar.gz' \
    -o /tmp/js7_joc_linux.2.5.2.tar.gz
retval=/tmp/js7_install_joc.$$.tmp

./js7_install_joc.sh \
    --tarball=/tmp/js7_joc_linux.2.5.2.tar.gz \
    --home=/opt/sos-berlin.com/js7/joc \
    --data=/var/sos-berlin.com/js7/joc \
    --http-port=4446 \
    --dbms-config=/home/sos/joc-deployment/hibernate.cfg.xml \
    --java-home="/opt/java/jdk-11.0.2+9" \
    --backup-dir=/tmp/backups \
    --log-dir=/tmp/logs \
    --return-values=$retval \
    --as-user \
    --restart \
    --show-logs \
    --make-dirs
 || ( backup=$(cat $retval | grep "backup_file" | cut -d'=' -f2) \
      && ( test -e "$backup" ) && \
      ./js7_install_joc.sh \
          --tarball=$backup \
          --home=/opt/sos-berlin.com/js7/joc \
          --data=/var/sos-berlin.com/js7/joc \
          --http-port=4446 \
          --dbms-config=/home/sos/joc-deployment/hibernate.cfg.xml \
          --java-home="/opt/java/jdk-11.0.2+9" \
          --log-dir=/tmp/logs \
          --as-user \
          --restart \
          --show-logs )

log_file=$(cat $retval | grep "log_file" | cut -d'=' -f2)
backup_file=$(cat $retval | grep "backup_file" | cut -d'=' -f2)   

# downloads the JOC Cockpit release tarball from the SOS Web Site using curl
# creates the home and data directories if they do not exist
# extracts the tarball and runs the JOC Cockpit installer
# reverts the installation from the backup archive in case of failure
# stops and starts JOC Cockpit by its instance start script <home>/jetty/bin/jetty.sh
# operates JOC Cockpit for HTTP port 4446

Install or Update and Apply Certificates for HTTPS Connections

Code Block
languagebash
titleExample for use of JOC Cockpit Installation Script
curl 'https://download.sos-berlin.com/JobScheduler.2.5/js7_joc_linux.2.5.2.tar.gz' \
    -o /tmp/js7_joc_linux.2.5.2.tar.gz

./js7_install_joc.sh \
    --tarball=/tmp/js7_joc_linux.2.3.1.tar.gz \
    --home=/opt/sos-berlin.com/js7/joc \
    --data=/var/sos-berlin.com/js7/joc \
    --https-port=4446 \
    --dbms-config=/home/sos/joc-deployment/hibernate.cfg.xml \
    --java-home="/opt/java/jdk-11.0.2+9" \
    --keystore=/home/sos/joc-deployment/https-keystore.p12 \
    --keystore-password="jobscheduler" \
    --truststore=/home/sos/joc-deployment/https-truststore.p12 \
    --truststore-password="jobscheduler" \
    --exec-start=StartService \
    --exec-stop=StopService \
    --make-service \
    --as-user \
    --make-dirs

# downloads the JOC Cockpit release tarball from the SOS Web Site using curl
# creates the home and data directories if they do not exist
# extracts the tarball and runs the JOC Cockpit installer
# deploys keystore and truststore files
# creates the systemd service
# stops and starts JOC Cockpit by its systemd service
# operates JOC Cockpit for HTTPS port 4446

Note:

  • For details about certificates and HTTPS connections see JS7 - JOC Cockpit HTTPS Connections.
  • The <data>/resources/joc/joc.properties and <data>/start.d/ssl.ini configuration files hold references to the JOC Cockpit's keystore and truststore to verify the connection from JOC Cockpit to the Controller using HTTPS mutual authentication.
  • Users have a choice how to provide the required configuration:
    • The JOC Cockpit Installation Script performs replacements of placeholders in the joc.properties and ssl.ini configuration files from option values, for details see chapter Replacements.
    • Users can manually adjust configuration items in the joc.properties file that they specify for the JOC Cockpit Installation Script., see JS7 - JOC Cockpit Configuration Items.

Renew Certificates for HTTPS Connections

Code Block
languagebash
titleExample for use of JOC Cockpit Installation Script
./js7_install_joc.sh \
    --home=/opt/sos-berlin.com/js7/joc \
    --data=/var/sos-berlin.com/js7/joc \
    --https-port=4446 \
    --java-home="/opt/java/jdk-11.0.2+9" \
    --keystore=/home/sos/joc-deployment/https-keystore.p12 \
    --keystore-password="jobscheduler" \
    --truststore=/home/sos/joc-deployment/https-truststore.p12 \
    --truststore-password="jobscheduler" \
    --exec-start=StartService \
    --exec-stop=StopService \
    --no-install

# performs no installation but certificate renewal only
# addresses an existing JOC Cockpit instance operated for HTTPS port 4446
# deploys keystore and truststore files
# stops and starts JOC Cockpit by its systemd service

Start JOC Cockpit

Code Block
languagebash
titleExample for use of JOC Cockpit Installation Script
./js7_install_joc.sh \
    --home=/home/sos/joc \
    --exec-start=StartService \
    --exec-stop=StopService \
    --no-install \
    --no-config
 
# stops the JOC Cockpit's systemd service if JOC Cockpit is running
# starts the JOC Cockpit's systemd service

Stop JOC Cockpit

Code Block
languagebash
titleExample for use of JOC Cockpit Installation Script
./js7_install_joc.sh \
    --home=/home/sos/joc \
      --httpsexec-port=4446stop=StopService \
    --no-install \
    --no-config
 
# stops the JOC Cockpit's systemd service if JOC Cockpit is running

Patch API from Download

Code Block
languagebash
titleExample for use of JOC Cockpit Installation Script
./js7_install_joc.sh \
    --release=2.2.3 \
    --patch=JS-1984java-home="/opt/java/jdk-11.0.2+9" \
    --keystore=/home/sos/joc-deployment/https-keystore.p12 \
    --keystorepatch-password="jobscheduler"key=API-1 \
    --truststorehome=/homeopt/sos-berlin.com/js7/joc-deployment/https-truststore.p12 \
    --data=/var/sos-berlin.com/js7/joc \
     --truststorejava-passwordhome="jobscheduler/opt/java/jdk-11.0.2+9" \
    --exec-start=StartService \
    --exec-stop=StopService
 \
# downloads the  --no-install

# performs no installation but certificate renewal only
# addresses an existing JOC Cockpit instance operated for HTTPS port 4446
# deploys keystore and truststore filespatch tarball from the SOS Web Site
# extracts the patch files to the JOC Cockpit's <data>/webapps/joc/WEB-INF/classes sub-directory
# extracts patch classes to sub-directories
# stops and starts the JOC Cockpit's by its systemd service

Patch API from

...

Tarball

Code Block
languagebash
titleExample for use of JOC Cockpit Installation ScriptInstallation Script
curl 'https://download.sos-berlin.com/patches/2.2.3-patch/js7_joc.2.2.3-PATCH.API-1.JS-1984.tar.gz' \
    -o /tmp/js7_joc.2.2.3-PATCH.API-1.JS-1984.tar.gz
 
./js7_install_joc.sh \
    --release=tarball=/tmp/js7_joc.2.2.3-PATCH.API-1.JS-1984.tar.gz \
    --patch=JS-1984 \
    --patch-key=API-1 \
    --home=/homeopt/sos-berlin.com/js7/joc \
    --data=/var/sos-berlin.com/js7/joc \
    --java-home="/opt/java/jdk-11.0.2+9" \
     --exec-start=StartService \
    --exec-stop=StopService
 
# downloads the patch tarball from the SOS Web Site
# extracts the tarball to the JOC Cockpit's data directory assuming that this corresponds to the home directoryusing curl
# storesextracts the patch files to the JOC Cockpit's <data>/webapps/joc/WEB-INF/classes sub-directory
# extracts patch classes to sub-directories
# stops and starts the JOC Cockpit's systemd service

Patch GUI from Tarball

Code Block
languagebash
titleExample for use of JOC Cockpit Installation Script
curl 'https://download.sos-berlin.com/patches/JobScheduler2.25.23-patch/js7_joc_linux.2.25.3.JS-1984-PATCH.GUI-1.JOC-1550.tar.gz' \
    -o /tmp/js7_joc_linux.2.25.3.JS-1984-PATCH.GUI-1.JOC-1550.tar.gz
 
./js7_install_joc.sh \
    --tarball=/tmp/js7_joc_linux.2.25.3.JS-1984-PATCH.GUI-1.JOC-1550.tar.gz \
    --patch=JS-1984-1550 \
    --patch-key=GUI-1 \
    --home=/homeopt/sos-berlin.com/js7/joc \
    --data=/var/sos-berlin.com/js7/joc \
    --java-home="/opt/java/jdk-11.0.2+9" \
    --exec-start=StartService \
    --exec-stop=StopService

# downloads the patch tarball from the SOS Web Site using curl
# extracts the patch files to the JOC Cockpit's <data>/webapps/joc/WEB-INF/classes sub-directory
# extracts patch classesfiles to sub-directories
# stops and starts the JOC Cockpit's systemd service

Patch API from .jar File

Code Block
languagebash
titleExample for use of JOC Cockpit Installation Script
curl 'https://download.sos-berlin.com/patches/JobScheduler2.2.2//patch-20220331-JS-1984-3-patch/js7_joc.2.2.3-PATCH.API-1.JS-1984.jar' \
    -o /tmp/patch-20220331-js7_joc.2.2.3-PATCH.API-1.JS-1984-2.2.3.jar
 
./js7_install_joc.sh \
    --tarballpatch-jar=/tmp/patch-20220331-js7_joc.2.2.3-PATCH.API-1.JS-1984-2.2.3.jar \
    --patch=JS-1984 \
    --patch-key=API-1 \
    --home=/homeopt/sos-berlin.com/js7/joc \
    --data=/var/sos-berlin.com/js7/joc \
    --java-home="/opt/java/jdk-11.0.2+9" \
    --exec-start=StartService \
    --exec-stop=StopService

# downloads the patch .jar file from the SOS Web Site using curl
# extracts the patch file to the JOC Cockpit's <data>/webapps/joc/WEB-INF/classes sub-directory
# extracts patch classes to sub-directories
# stops and starts the JOC Cockpit's systemd service

...

The steps for automation are similar to updating and upgrading JS7 Agents. You will find instructions for setting up workflow automation from the the JS7 - Automated Installation and Update of Agent article article.

Further Resources

...