Versions Compared

Key

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

...

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
    --patch=<issue-key>                | optional: identifies a patch for an existing JOC Cockpit installation
    --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 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
    --properties=<file>                | optional: specifies the joc.properties file that will be copied to <home>/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/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>      | optional: alias name for keystore entry
    --truststore=<path>                | optional: path to a PKCS12 truststore file that will be copied to <data>/resourdes/joc/
    --truststore-password=<password>   | optional: password for truststore password

    --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
    --no-config                        | skips JOC Cockpit configuration changes
    --no-install                       | skips JOC Cockpit installation, performs configuration updateschanges only
    --uninstall                        | uninstalls JOC Cockpit
    --no-jetty                         | skips Jetty servlet container installation
    --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 JOC Cockpit
    --restart                          | stops a running JOC Cockpit and starts JOC Cockpit after installation
    --kill                             | kills a running JOC Cockpit if used with the --restart switch

...

  • -h | --help
    • Displays usage.
  • --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 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.

...

Code Block
languagebash
titleExample for use of JOC Cockpit Installation Script
./js7_install_joc.sh \
    --home=/home/sos/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 \
    --exec-stop=StopService \
    --no-install \
    --no-config
 
# stops the JOC Cockpit's systemd service if JOC Cockpit is running

Patch from Download

Code Block
languagebash
titleExample for use of JOC Cockpit Installation Script
./js7_install_joc.sh \
    --release=2.2.3 \
    --patch=JS-1984 \
    --home=/home/sos/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 directory
# stores the patch files to the JOC Cockpit's <data>/webapps/joc/WEB-INF/classes sub-directory
# stops and starts the JOC Cockpit's systemd service

...