Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: removed backtick

Table of Contents

Install and Update

Install Controller for Unix

Introduction

JS7 supports automated installation and updates from Installation Scripts:

Install and Update

Install JOC Cockpit for Linux

Install or Update from Download using individual Database

Code Block
languagepowershell
titleExample for use of Installation Script
./Install-JS7Joc.ps1 `
    -Release 2.5.2 `
    -HomeDir /home/sos/joc `
    -HttpPort 4446 `
    -DBMSConfig /home/sos/joc-deployment/hibernate.cfg.xml `
    -JavaHome /opt/java/jdk-17.0.2 `
    -AsUser `
    -MakeDirs

# 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
languagepowershell
titleExample for use of Installation Script
Invoke-WebRequest `
    -Uri 'https://repo1.maven.org/maven2/com/h2database/h2/1.4.200/h2-1.4.200.jar' `
    -Outfile /tmp/h2-1.4.200.jar

./Install-JS7Joc.ps1 `
    -Release 2.5.2 `
    -HomeDir /home/sos/joc `
    -HttpPort 4446 `
    -DBMSConfig H2 `
    -DBMSDriver /tmp/h2-1.4.200.jar `
    -JavaHome /opt/java/jdk-17.0.2 `
    -AsUser `
    -MakeDirs

# downloads the H2 embedded database from Maven Central using Invoke-WebRequest
# 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

Code Block
languagepowershell
titleExample for use of Installation Script
Invoke-WebRequest `
    -Uri 'https://download.sos-berlin.com/JobScheduler.2.5/js7_joc_linux.2.5.2.tar.gz' `
    -Outfile /tmp/js7_joc_linux.2.5.2.tar.gz

./Install-JS7Joc.ps1 `
    -Tarball /tmp/js7_joc_linux.2.5.2.tar.gz `
    -HomeDir /home/sos/joc `
    -HttpPort 4446 `
    -DBMSConfig /home/sos/joc-deployment/hibernate.cfg.xml `
    -JavaHome /opt/java/jdk-17.0.2 `
    -AsUser `
    -MakeDirs

# downloads the JOC Cockpit release tarball from the SOS Web Site
# requires that the user creates a hibernate.cfg.xml file for database access prior to installation
# 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 using separate Home and Data Directories

Code Block
languagepowershell
titleExample for use of Installation Script
Invoke-WebRequest `
    -Uri 'https://download.sos-berlin.com/JobScheduler.2.5/js7_joc_linux.2.5.2.tar.gz' `
    -Outfile /tmp/js7_joc_linux.2.5.2.tar.gz

./Install-JS7Joc.ps1 `
    -Tarball /tmp/js7_joc_linux.2.5.2.tar.gz `
    -HomeDir /opt/sos-berlin.com/js7/joc `
    -Data /var/sos-berlin.com/js7/joc `
    -HttpPort 4446 `
    -DBMSConfig /home/sos/joc-deployment/hibernate.cfg.xml `
    -JavaHome /opt/java/jdk-17.0.2 `
    -AsUser `
    -MakeDirs

# downloads the JOC Cockpit release tarball from the SOS Web Site using Invoke-WebRequest
# users might prefer to store configuration data and log data separately from the home directory
# 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
# 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 Download with Commercial License

Code Block
languagepowershell
titleExample for use of Installation Script
./Install-JS7Joc.ps1 `
    -Releae 2.5.2 `
    -HomeDir /home/sos/joc `
    -HttpPort 4446 `
    -DBMSConfig /home/sos/joc-deployment/hibernate.cfg.xml `
    -LicenseKey /home/sos/joc-deployment/example.pem `
    -JavaHome /opt/java/jdk-17.0.2 `
    -AsUser `
    -MakeDirs

# 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 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 with Commercial License

Code Block
languagepowershell
titleExample for use of Installation Script
Invoke-WebRequest `
    -Uri 'https://download.sos-berlin.com/JobScheduler.2.5/js7_joc_linux.2.5.2.tar.gz' `
    -Outfile /tmp/js7_joc_linux.2.5.2.tar.gz
Invoke-WebRequest `
    -Uri 'https://download.sos-berlin.com/JobScheduler.2.5/js7-license.jar' `
    -Outfile /tmp/js7-license.jar

./Install-JS7Joc.ps1 `
    -Tarball /tmp/js7_joc_linux.2.5.2.tar.gz `
    -HomeDir /home/sos/joc `
    -HttpPort 4446 `
    -DBMSConfig /home/sos/joc-deployment/hibernate.cfg.xml `
    -LicenseKey /home/sos/joc-deployment/example.pem `
    -LicenseBin /tmp/js7_license.jar `
    -JavaHome /opt/java/jdk-17.0.2 `
    -AsUser `
    -MakeDirs

# downloads the JOC Cockpit release tarball from the SOS Web Site using Invoke-WebRequest
# downloads the binary file for licensed code to enable cluster operations using Invoke-WebRequest
# 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 does not exist
# extracts the tarball and runs the JOC Cockpit installer
# operates JOC Cockpit for HTTP port 4446

Install or Update Secondary JOC Cockpit Instance for Cluster Operations

Code Block
languagepowershell
titleExample for use of Installation Script
Invoke-WebRequest `
    -Uri 'https://download.sos-berlin.com/JobScheduler.2.5/js7_joc_linux.2.5.2.tar.gz' `
    -Outfile /tmp/js7_joc_linux.2.5.2.tar.gz
Invoke-WebRequest `
    -Uri 'https://download.sos-berlin.com/JobScheduler.2.5/js7-license.jar' `
    -Outfile /tmp/js7-license.jar

./Install-JS7Joc.ps1 `
    -Tarball /tmp/js7_joc_linux.2.5.2.tar.gz `
    -InstanceId 1 `
    -Title "Secondary JOC Cockpit" `
    -HomeDir /home/sos/joc `  
    -HttpPort 4446 `
    -DBMSConfig /home/sos/joc-deployment/hibernate.cfg.xml `
    -LicenseKey /home/sos/joc-deployment/example.pem `
    -LicenseBin /tmp/js7-license.jar `
    -JavaHome /opt/java/jdk-17.0.2 `
    -AsUser `
    -MakeDirs

# downloads the JOC Cockpit release tarball from the SOS Web Site using Invoke-WebRequest
# downloads the binary file for licensed code to enable cluster operations using Invoke-WebRequest
# 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 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 a Response Directory

Code Block
languagepowershell
titleExample for use of Installation Script
Invoke-WebRequest `
    -Uri 'https://download.sos-berlin.com/JobScheduler.2.5/js7_joc_linux.2.5.2.tar.gz' `
    -Outfile /tmp/js7_joc_linux.2.5.2.tar.gz

./Install-JS7Joc.ps1 `
    -Tarball /tmp/js7_joc_linux.2.5.2.tar.gz `
    -ResponseDir /home/sos/joc-deployment/response `
    -HomeDir /home/sos/joc `
    -HttpPort 4446 `
    -JavaHome /opt/java/jdk-17.0.2 `
    -AsUser `
    -MakeDirs

# downloads the JOC Cockpit release tarball from the SOS Web Site using Invoke-WebRequest
# specifies a response directory that holds
#    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 doe 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
languagepowershell
titleExample for use of Installation Script
Invoke-WebRequest `
    -Uri 'https://download.sos-berlin.com/JobScheduler.2.5/js7_joc_linux.2.5.2.tar.gz' `
    -Outfile /tmp/js7_joc_linux.2.5.2.tar.gz

./Install-JS7Joc.ps1 `
    -Tarball /tmp/js7_joc_linux.2.5.2.tar.gz `
    -HomeDir /home/sos/joc `
    -HttpPort 4446 `
    -DBMSConfig /home/sos/joc-deployment/hibernate.cfg.xml `
    -JavaHome /opt/java/jdk-17.0.2 `
    -ExecStart StartService `
    -ExecStop StopService `
    -MakeService `
    -AsUser `
    -MakeDirs

# downloads the JOC Cockpit release tarball from the SOS Web Site using Invoke-WebRequest
# creates 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
languagepowershell
titleExample for use of Installation Script
Invoke-WebRequest `
    -Uri 'https://download.sos-berlin.com/JobScheduler.2.5/js7_joc_linux.2.5.2.tar.gz' `
    -Outfile /tmp/js7_joc_linux.2.5.2.tar.gz

./Install-JS7Joc.ps1 `
    -Tarball /tmp/js7_joc_linux.2.5.2.tar.gz `
    -HomeDir /home/sos/joc `
    -HttpPort 4446 `
    -DBMSConfig /home/sos/joc-deployment/hibernate.cfg.xml `
    -JavaHome /opt/java/jdk-17.0.2 `
    -ExecStart "sudo systemctl start js7_joc" `
    -ExecStop "sudo systemctl start js7_joc" `
    -AsUser `
    -MakeDirs

# downloads the JOC Cockpit release tarball from the SOS Web Site using Invoke-WebRequest
# creates the home directory if it does 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 and Stop/Start using Instance Start Script

Code Block
languagepowershell
titleExample for use of Installation Script
Invoke-WebRequest `
    -Uri 'https://download.sos-berlin.com/JobScheduler.2.5/js7_joc_linux.2.5.2.tar.gz' `
    -Outfile /tmp/js7_joc_linux.2.5.2.tar.gz

./Install-JS7Joc.ps1 `
    -Tarball /tmp/js7_joc_linux.2.5.2.tar.gz `
    -HomeDir /home/sos/joc `
    -HttpPort 4446 `
    -DBMSConfig /home/sos/joc-deployment/hibernate.cfg.xml `
    -JavaHome /opt/java/jdk-17.0.2 `
    -ExecStart "/home/sos/joc/jetty/bin/jetty.sh stop" `
    -ExecStop "/home/sos/joc/jetty/bin/jetty.sh start" `
    -AsUser `
    -MakeDirs

# downloads the JOC Cockpit release tarball from the SOS Web Site using Invoke-WebRequest
# creates the home directory if it does 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.sh
# operates JOC Cockpit for HTTP port 4446

Install or Update and Apply Certificates for HTTPS Connections

Code Block
languagepowershell
titleExample for use of Installation Script
Invoke-WebRequest `
    -Uri 'https://download.sos-berlin.com/JobScheduler.2.5/js7_joc_linux.2.5.2.tar.gz' `
    -Outfile /tmp/js7_joc_linux.2.5.2.tar.gz

./Install-JS7Joc.ps1 `
    -Tarball /tmp/js7_joc_linux.2.5.2.tar.gz `
    -HomeDir /opt/sos-berlin.com/js7/joc `
    -Data /var/sos-berlin.com/js7/joc `  
    -HttpsPort 4446 `
    -DBMSConfig /home/sos/joc-deployment/hibernate.cfg.xml `
    -JavaHome /opt/java/jdk-17.0.2 `
    -Keystore /home/sos/joc-deployment/https-keystore.p12 `
    -KeystorePassword ('jobscheduler' | ConvertTo-SecureString -AsPlainText -Force) `
    -Truststore /home/sos/joc-deployment/https-truststore.p12 `
    -TruststorePassword ('jobscheduler' | ConvertTo-SecureString -AsPlainText -Force) `
    -ExecStart StartService `
    -ExecStop StopService `
    -MakeService `
    -AsUser `
    -MakeDirs

# downloads the JOC Cockpit release tarball from the SOS Web Site using Invoke-WebRequest
# creates the home directory if it does 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

Renew Certificates for HTTPS Connections

Code Block
languagepowershell
titleExample for use of Installation Script
./Install-JS7Joc.ps1 `
    -HomeDir /opt/sos-berlin.com/js7/joc `
    -Data /var/sos-berlin.com/js7/joc ` 
    -HttpsPort 4446 `
    -JavaHome /opt/java/jdk-17.0.2 `
    -Keystore /home/sos/joc-deployment/https-keystore.p12 `
    -KeystorePassword ('jobscheduler' | ConvertTo-SecureString -AsPlainText -Force) `
    -Truststore /home/sos/joc-deployment/https-truststore.p12 `
    -TruststorePassword ('jobscheduler' | ConvertTo-SecureString -AsPlainText -Force) `
    -ExecStart StartService `
    -ExecStop StopService `
    -NoInstall

# 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 Service

Code Block
languagepowershell
titleExample for use of Installation Script
./Install-JS7Joc.ps1 `
    -HomeDir /home/sos/joc `
    -HttpPort 4446 `
    -ExecStart StartService `
    -ExecStop StopService `
    -NoInstall `
    -NoConfig

# stops the JOC Cockpit's systemd service if JOC Cockpit is running
# starts the JOC Cockpit's systemd service

Stop JOC Cockpit Service

Code Block
languagepowershell
titleExample for use of Installation Script
./Install-JS7Joc.ps1 `
    -HomeDir /home/sos/joc `
    -HttpPort 4446 `
    -ExecStop StopService `
    -NoInstall `
    -NoConfig

# stops the JOC Cockpit's systemd service

Install JOC Cockpit for Windows

Install or Update from Download using individual Database

Code Block
languagepowershell
titleExample for use of Installation Script
./Install-JS7Joc.ps1 `
    -Release 2.5.2 `
    -HomeDir "C:\Program Files\sos-berlin.com\js7\joc" `
    -Data "C:\ProgramData\sos-berlin.com\js7\joc" `
    -HttpPort 4446 `
    -DBMSConfig C:\js7\joc-deployment\hibernate.cfg.xml `
    -JavaHome "C:\Program Files\Java\jdk-17.0.2" `
    -AsUser `
    -MakeDirs

# 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
# 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
languagepowershell
titleExample for use of Installation Script
Invoke-WebRequest `
    -Uri 'https://repo1.maven.org/maven2/com/h2database/h2/1.4.200/h2-1.4.200.jar' `
    -Outfile C:\tmp\h2-1.4.200.jar

./Install-JS7Joc.ps1 `
    -Release 2.5.2 `
    -HomeDir "C:\Program Files\sos-berlin.com\js7\joc" `
    -Data "C:\ProgramData\sos-berlin.com\js7\joc" `
    -HttpPort 4446 `
    -DBMSConfig H2 `
    -DBMSDriver C:\tmp\h2-1.4.200.jar `
    -JavaHome "C:\Program Files\Java\jdk-17.0.2" `
    -AsUser `
    -MakeDirs

# downloads the H2 embedded database from Maven Central using Invoke-WebRequest
# 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 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 using individual database

Code Block
languagepowershell
titleExample for use of Installation Script
Invoke-WebRequest `
    -Uri 'https://download.sos-berlin.com/JobScheduler.2.5/js7_joc_windows.2.5.2.zip' `
    -Outfile C:\tmp\js7_joc_windows.2.5.2.zip

./Install-JS7Joc.ps1 `
    -Tarball C:\tmp\js7_joc_windows.2.5.2.zip `
    -HomeDir "C:\Program Files\sos-berlin.com\js7\joc" `
    -Data "C:\ProgramData\sos-berlin.com\js7\joc" `
    -HttpPort 4446 `
    -DBMSConfig C:\js7\joc-deployment\hibernate.cfg.xml ` 
    -JavaHome "C:\Program Files\Java\jdk-17.0.2" `
    -AsUser `
    -MakeDirs

# downloads the H2 embedded database from Maven Central using Invoke-WebRequest
# downloads the JOC Cockpit release tarball from the SOS Web Site
# 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 Download with Commercial License

Code Block
languagepowershell
titleExample for use of Installation Script
./Install-JS7Joc.ps1 `
    -Releae 2.5.2 `
    -HomeDir "C:\Program Files\sos-berlin.com\js7\joc" `
    -Data "C:\ProgramData\sos-berlin.com\js7\joc" `
    -HttpPort 4446 `
    -DBMSConfig C:\js7\joc-deployment\hibernate.cfg.xml `
    -LicenseKey C:\js7\joc-deployment\example.pem `
    -JavaHome "C:\Program Files\Java\jdk-17.0.2" `
    -AsUser `
    -MakeDirs

# 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 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 with Commercial License

Code Block
languagepowershell
titleExample for use of Installation Script
Invoke-WebRequest `
    -Uri 'https://download.sos-berlin.com/JobScheduler.2.5/js7_joc_windows.2.5.2.zip' `
    -Outfile C:\tmp\js7_joc_windows.2.5.2.zip
Invoke-WebRequest `
    -Uri 'https://download.sos-berlin.com/JobScheduler.2.5/js7-license.jar' `
    -Outfile C:\tmp\js7-license.jar

./Install-JS7Joc.ps1 `
    -Tarball C:\tmp\js7_joc_windows.2.5.2.zip `
    -HomeDir "C:\Program Files\sos-berlin.com\js7\joc" `
    -Data "C:\ProgramData\sos-berlin.com\js7\joc" `
    -HttpPort 4446 `
    -DBMSConfig C:\js7\joc-deployment\hibernate.cfg.xml `
    -LicenseKey C:\js7\joc-deployment\example.pem `
    -LicenseBin C:\tmp\js7-license.jar `
    -JavaHome "C:\Program Files\Java\jdk-17.0.2" `
    -AsUser `
    -MakeDirs

# downloads the JOC Cockpit release tarball from the SOS Web Site using Invoke-WebRequest
# downloads the binary file for licensed code to enable cluster operations using Invoke-WebRequest
# 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 does not exist
# extracts the tarball and runs the JOC Cockpit installer
# operates JOC Cockpit for HTTP port 4446

Install or Update Secondary JOC Cockpit Instances for Cluster Operations

Code Block
languagepowershell
titleExample for use of Installation Script
Invoke-WebRequest `
    -Uri 'https://download.sos-berlin.com/JobScheduler.2.5/js7_joc_windows.2.5.2.zip' `
    -Outfile C:\tmp\js7_joc_windows.2.5.2.zip
Invoke-WebRequest `
    -Uri 'https://download.sos-berlin.com/JobScheduler.2.5/js7-license.jar' `
    -Outfile C:\tmp\js7-license.jar

./Install-JS7Joc.ps1 `
    -Tarball C:\tmp\js7_joc_windows.2.5.2.zip `
    -InstanceId 1 `
    -Title "Secondary JOC Cockpit" `
    -HomeDir "C:\Program Files\sos-berlin.com\js7\joc" `
    -Data "C:\ProgramData\sos-berlin.com\js7\joc" `
    -HttpPort 4446 `
    -DBMSConfig C:\js7\joc-deployment\hibernate.cfg.xml `
    -LicenseKey C:\js7\joc-deployment\example.pem `
    -LicenseBin C:\tmp\js7-license.jar `
    -JavaHome "C:\Program Files\Java\jdk-17.0.2" `
    -AsUser `
    -MakeDirs

# downloads the JOC Cockpit release tarball from the SOS Web Site using Invoke-WebRequest
# downloads the binary file for licensed code to enable cluster operations using Invoke-WebRequest
# 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 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 a Response Directory

Code Block
languagepowershell
titleExample for use of Installation Script
Invoke-WebRequest `
    -Uri 'https://download.sos-berlin.com/JobScheduler.2.5/js7_joc_windows.2.5.2.zip' `
    -Outfile C:\tmp\js7_joc_windows.2.5.2.zip

./Install-JS7Joc.ps1 `
    -Tarball C:\tmp\js7_joc_windows.2.5.2.zip `
    -ResponseDir C:\js7\joc-deployment\response `
    -HomeDir "C:\Program Files\sos-berlin.com\js7\joc" `
    -HttpPort 4446 `
    -JavaHome "C:\Program Files\Java\jdk-17.0.2" `
    -AsUser `
    -MakeDirs

# downloads the JOC Cockpit release tarball from the SOS Web Site using Invoke-WebRequest
# specifies a response directory that holds
#    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 doe 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 Windows Service

Code Block
languagepowershell
titleExample for use of Installation Script
Invoke-WebRequest `
    -Uri 'https://download.sos-berlin.com/JobScheduler.2.5/js7_joc_windows.2.5.2.zip' `
    -Outfile C:\tmp\js7_joc_windows.2.5.2.zip

./Install-JS7Joc.ps1 `
    -Tarball C:\tmp\js7_joc_windows.2.5.2.zip `
    -HomeDir "C:\Program Files\sos-berlin.com\js7\joc" `
    -Data "C:\ProgramData\sos-berlin.com\js7\joc" `
    -HttpPort 4446 `
    -DBMSConfig C:\js7\joc-deployment\hibernate.cfg.xml `
    -JavaHome "C:\Program Files\Java\jdk-17.0.2" `
    -ExecStart StartService `
    -ExecStop StopService `
    -MakeService `
    -AsUser `
    -MakeDirs

# downloads the JOC Cockpit release tarball from the SOS Web Site using Invoke-WebRequest
# creates 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 Apply Certificates for HTTPS Connections

Code Block
languagepowershell
titleExample for use of Installation Script
Invoke-WebRequest `
    -Uri 'https://download.sos-berlin.com/JobScheduler.2.5/js7_joc_windows.2.5.2.zip' `
    -Outfile C:\tmp\js7_joc_windows.2.5.2.zip

./Install-JS7Joc.ps1 `
    -Tarball C:\tmp\js7_joc_windows.2.5.2.zip `
    -HomeDir "C:\Program Files\sos-berlin.com\js7\joc" `
    -Data "C:\ProgramData\sos-berlin.com\js7\joc" `
    -HttpsPort 4446 `
    -DBMSConfig C:\js7\joc-deployment\hibernate.cfg.xml `
    -JavaHome "C:\Program Files\Java\jdk-17.0.2" `
    -Keystore C:\js7\joc-deployment/https-keystore.pfx `
    -KeystorePassword ('jobscheduler' | ConvertTo-SecureString -AsPlainText -Force) `
    -Truststore C:\js7\joc-deployment\https-truststore.pfx `
    -TruststorePassword ('jobscheduler' | ConvertTo-SecureString -AsPlainText -Force) `
    -ExecStart StartService `
    -ExecStop StopService `
    -MakeService `
    -AsUser `
    -MakeDirs

# downloads the JOC Cockpit release tarball from the SOS Web Site using Invoke-WebRequest
# creates the home directory if it does 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 Windows service
# operates JOC Cockpit for HTTPS port 4446

Renew Certificates for HTTPS Connections

Code Block
languagepowershell
titleExample for use of Installation Script
./Install-JS7Joc.ps1 `
    -HomeDir "C:\Program Files\sos-berlin.com\js7\joc" `
    -Data "C:\ProgramData\sos-berlin.com\js7\joc" `
    -HttpsPort 4446 `
    -JavaHome "C:\Program Files\Java\jdk-17.0.2" `
    -Keystore C:\js7\joc-deployment/https-keystore.pfx `
    -KeystorePassword ('jobscheduler' | ConvertTo-SecureString -AsPlainText -Force) `
    -Truststore C:\js7\joc-deployment\https-truststore.pfx `
    -TruststorePassword ('jobscheduler' | ConvertTo-SecureString -AsPlainText -Force) `
    -ExecStart StartService `
    -ExecStop StopService `
    -NoInstall

# 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 Windows service

Start JOC Cockpit Service

Code Block
languagepowershell
titleExample for use of Installation Script
./Install-JS7Joc.ps1 `
    -HomeDir "C:\Program Files\sos-berlin.com\js7\joc" `
    -HttpPort 4446 `
    -ExecStart StartService `
    -ExecStop StopService `
    -NoInstall `
    -NoConfig

# stops the JOC Cockpit's Windows service if JOC Cockpit is running
# starts the JOC Cockpit's Windows service

Stop JOC Cockpit Service

Code Block
languagepowershell
titleExample for use of Installation Script
./Install-JS7Joc.ps1 `
    -HomeDir "C:\Program Files\sos-berlin.com\js7\joc" `
    -HttpPort 4446 `
    -ExecStop StopService `
    -NoInstall `
    -NoConfig

# stops the JOC Cockpit's Windows service

Patch

Patch JOC Cockpit for Linux

Patch API from Download

Code Block
languagepowershell
titleExample for use of Installation Script
./Install-JS7Joc.ps1 `
    -Release 2.2.3 `
    -Patch JS-1984 `
    -PatchKey API-1 `
    -HomeDir /opt/sos-berlin.com/js7/joc `
    -Data /var/sos-berlin.com/js7/joc ` 
    -HttpPort 4446 `
    -JavaHome /opt/java/jdk-17.0.2 `
    -ExecStart StartService `
    -ExecStop 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

Patch API from Tarball

Code Block
languagepowershell
titleExample for use of Installation Script
Invoke-WebRequest `
    -Uri 'https://download.sos-berlin.com/patches/2.2.3-patch/js7_joc.2.2.3-PATCH.API-1.JS-1984.tar.gz' `
    -Outfile /tmp/js7_joc.2.2.3-PATCH.API-1.JS-1984.tar.gz

./Install-JS7Joc.ps1 `
    -Tarball /tmp/js7_joc.2.2.3-PATCH.API-1.JS-1984.tar.gz `
    -Patch JS-1984 `
    -PatchKey API-1 `
    -HomeDir /opt/sos-berlin.com/js7/joc `
    -Data /var/sos-berlin.com/js7/joc ` 
    -HttpPort 4446 `
    -JavaHome /opt/java/jdk-17.0.2 `
    -ExecStart StartService `
    -ExecStop StopService
 
# downloads the patch tarball from the SOS Web Site using Invoke-WebRequest
# 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

Patch GUI from Tarball

Code Block
languagepowershell
titleExample for use of Installation Script
Invoke-WebRequest `
    -Uri 'https://download.sos-berlin.com/patches/2.5.3-patch/js7_joc.2.5.3-PATCH.GUI-1.JOC-1550.tar.gz' `
    -Outfile /tmp/js7_joc.2.5.3-PATCH.GUI-1.JOC-1550.tar.gz

./Install-JS7CJoc.ps1 `
    -Tarball /tmp/js7_joc.2.5.3-PATCH.GUI-1.JOC-1550.tar.gz `
    -Patch JS-1550 `
    -PatchKey GUI-1 `
    -HomeDir /opt/sos-berlin.com/js7/joc `
    -Data /var/sos-berlin.com/js7/joc `
    -HttpPort 4446 `
    -JavaHome /opt/java/jdk-17.0.2 `
    -ExecStart StartService `
    -ExecStop StopService
 
# downloads the patch tarball from the SOS Web Site using Invoke-WebRequest
# extracts the tarball to the JOC Cockpit's data 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 Windows service

Patch API from .jar File

Code Block
languagepowershell
titleExample for use of Installation Script
Invoke-WebRequest `
    -Uri 'https://download.sos-berlin.com/patches/2.2.3-patch/js7_joc.2.2.3-PATCH.API-1.JS-1984.jar' `
    -Outfile /tmp/js7_joc.2.2.3-PATCH.API-1.JS-1984.jar

./Install-JS7Joc.ps1 `
    -PatchJar /tmp/js7_joc.2.2.3-PATCH.API-1.JS-1984.jar `
    -PatchKey API-1 `
    -Patch JS-1984 ` 
    -HomeDir /opt/sos-berlin.com/js7/joc `
    -Data /var/sos-berlin.com/js7/joc `
    -HttpPort 4446
Code Block
languagepowershell
titleExample for use of Installation Script
#!/usr/bin/env pwsh

./Install-JS7Controller.ps1 `
    -HomeDir "/opt/sos-berlin.com/js7/controller" `
    -Data "/var/sos-berlin.com/js7/controller/jobscheduler" `
    -Tarball /mnt/releases/scheduler_setups/current/js7_controller_unix.2.5.2.tar.gz `
    -ControllerId "jobscheduler" `
    -HttpPort 4444 `
    -ExecStart StartService `
    -ExecStop StopService `
    -MakeService `
    -JavaHome "/opt/java/jdk-1117.0.2+9" `
    -MakeDirs

# Installs the Controller from the given tarballExecStart StartService `
    -ExecStop StopService
 
# Operatesdownloads the Controllerpatch for.jar HTTPfile portfrom 4444the runningSOS inWeb theSite current user accountusing Invoke-WebRequest
# Specifies Java from the given location
# Creates the Controller stores the patch .jar file to the JOC Cockpit's <data>/webapps/joc/WEB-INF/classes sub-directory
# stops and starts the JOC Cockpit's systemd service

...

Patch JOC Cockpit for Windows

...

Patch API from Download

Code Block
languagepowershell
titleExample for use of Installation Script
./Install-JS7Controller.ps1 `
    -HomeDir "C:\Program Files\sos-berlin.com\js7\controller" `
    -Data "C:\ProgramData\sos-berlin.com\js7\controller\jobscheduler"JS7Joc.ps1 `
    -Tarball /js7/downloads/js7_controller_windows.2.5Release 2.2.zip3 `
    -ControllerId "jobscheduler" `
    -HttpPort 4444Patch JS-1984 `
    -ExecStartPatchKey StartServiceAPI-1 `
    -ExecStop StopService `
    -MakeServiceHomeDir "C:\Program Files\sos-berlin.com\js7\joc" `
     -ServiceCredentials ( New-Object -typename System.Management.Automation.PSCredential -ArgumentList '.\sos', ( 'sos' | ConvertTo-SecureString -AsPlainText -Force) )Data "C:\ProgramData\sos-berlin.com\js7\joc" `
    -HttpPort 4446 `
    -MakeDirs
 
# Installs the Controller from the indicated .zip archive
# Creates the Controller's Windows Service for the local account ".\sos" using the password "sos"
# There are alternative ways how to avoid passwords from being specified in plain text
# Stops the Controller's Windows Service before installation and starts the service after installation

...

JavaHome "C:\Program Files\Java\jdk-17.0.2" `
    -ExecStart StartService `
    -ExecStop StopService

# downloads the patch tarball from the SOS Web Site
# extracts the tarball to the JOC Cockpit's data 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 Windows service

Patch API from Tarball

Code Block
languagepowershell
titleExample for use of Installation Script
./Install-JS7Controller.ps1Invoke-WebRequest `
    -HomeDirUri "C:\Program Files\'https://download.sos-berlin.com\js7\controller" `
    -Data "C:\ProgramData\sos-berlin.com\js7\controller\jobscheduler"/patches/2.2.3-patch/js7_joc.2.2.3-PATCH.API-1.JS-1984.tar.gz' `
    -TarballOutfile "C:\js7tmp\downloads\js7_controller_windowsjoc.2.5.2.zip" `
    -ControllerId "jobscheduler" `
    -HttpPort localhost:4444 `
    -HttpsPort 44443 `
    -PrivateConf "C:\js7\templates\private.conf-template-controller"3-PATCH.API-1.JS-1984.tar.gz

./Install-JS7CJoc.ps1 `
    -JocPrimaryCertTarball "C:\js7\certs\wintest-primary-joc.crt" `
    -Keystore "C:\js7\keys\https-keystore.pfxtmp\js7_joc.2.2.3-PATCH.API-1.JS-1984.tar.gz" `
    -Patch JS-KeystorePassword1984 "jobscheduler" `
    -KeyAliasPatchKey "wintest-primary-controller"API-1 `
 
    -TruststoreHomeDir "C:\js7\certs\https-truststore.pfxProgram Files\sos-berlin.com\js7\joc" `
    -TruststorePasswordData "jobschedulerC:\ProgramData\sos-berlin.com\js7\joc" `
 
     -ExecStartHttpPort StartService4446 `
    -ExecStop StopService `
    -MakeServiceJavaHome "C:\Program Files\Java\jdk-17.0.2" `
    -MakeDirs

# Installs the Controller from the indicated tarball
# Limits the HTTP port to the localhost network interface, makes the HTTPS port available for any network interfaces
# Applies a template file for SSL/TLS related settings that is automatically updated from arguments to the installation script
# Specifies the server certificate location of the JOC Cockpit instance that is used to manage the Controller
# Makes use of a keystore in PKCS12 format with the given alias name and password and a truststore respectively

Find an example for a private.conf template file for download: private.conf-template-controller

Patch

Patch Controller for Linux

Patch Controller from Download

ExecStart StartService `
    -ExecStop StopService
 
# downloads the patch tarball from the SOS Web Site using Invoke-WebRequest
# extracts the tarball to the JOC Cockpit's data 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 Windows service

Patch GUI from Tarball

Code Block
languagepowershell
titleExample for use of Installation Script
Invoke-WebRequest `
    -Uri 'https://download.sos-berlin.com/patches/2.5.3-patch/js7_joc.2.5.3-PATCH.GUI-1.JOC-1550.tar.gz' `
    -Outfile C:\tmp\js7_joc.2.5.3-PATCH.GUI-1.JOC-1550.tar.gz

./Install-JS7CJoc
Code Block
languagepowershell
titleExample for use of Installation Script
#!/usr/bin/env pwsh

./Install-JS7Controller.ps1 `
    -HomeDir /opt/sos-berlin.com/js7/controllerTarball "C:\tmp\js7_joc.2.5.3-PATCH.GUI-1.JOC-1550.tar.gz" `
    -Patch JS-HttpPort 44441550 `
    -Release 2.2.3PatchKey GUI-1 `
    -Patch JS-1984HomeDir "C:\Program Files\sos-berlin.com\js7\joc" `
    -Restart

# Patches the Controller by downloading the indicated patch for the given release from the SOS Web Site
# Restarts the systemd service

Patch Controller from Tarball

Code Block
languagepowershell
titleExample for use of Installation Script
#!/usr/bin/env pwsh

./Install-JS7Controller.ps1Data "C:\ProgramData\sos-berlin.com\js7\joc" `
    -HttpPort 4446 `
    -JavaHome "C:\Program Files\Java\jdk-17.0.2" `
    -ExecStart StartService `
    -HomeDir /opt/sos-berlin.com/js7/controller `
    -HttpPort 4444 `
    -Tarball  /tmp/js7_controller_unix.2.2.3.JS-1984.tar.gz `
    -Patch JS-1984 `
    -Restart

# Patches the Controller from a previously downloaded patch tarball
# Restarts the systemd service

Patch Controller for Windows

ExecStop StopService
 
# downloads the patch tarball from the SOS Web Site using Invoke-WebRequest
# extracts the tarball to the JOC Cockpit's data 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 Windows service

Patch API from .jar File

...

Code Block
languagepowershell
titleExample for use of Installation ScriptInstallation Script
Invoke-WebRequest `
    -Uri 'https://download.sos-berlin.com/patches/2.2.3-patch/js7_joc.2.2.3-PATCH.API-1.JS-1984.jar'./Install-JS7Controller.ps1 `
    -HomeDirOutfile "C:\Program Files\sos-berlin.com\js7\controller" `
    -HttpPort 4444 tmp\js7_joc.2.2.3-PATCH.API-1.JS-1984.jar

./Install-JS7CJoc.ps1 `
    -Release PatchJar "C:\tmp\js7_joc.2.2.3.3-PATCH.API-1.JS-1984.jar" `
     -Patch JS-1984 `
    -Restart

# Patches the Controller by downloading the indicated patch for the given release from the SOS Web Site
# Restarts the Controller's Windows Service to apply the patch

Patch Controller from .zip Archive

Code Block
languagepowershell
titleExample for use of Installation Script
./Install-JS7Controller.ps1PatchKey API-1 `
    -HomeDir "C:\Program Files\sos-berlin.com\js7\joc" `
    -HomeDirData "C:\Program FilesProgramData\sos-berlin.com\js7\controllerjoc" `
    -HttpPort 44444446 `
    -TarballJavaHome "C:/tmp/js7_controller_windows.2.2.3.JS-1984.zip" `
    -Patch JS-1984 `
    -Restart

# Patches the Controller using the previously downloaded .zip archive
# Restarts the Controller's Windows Service to apply the patch

Uninstall

\Program Files\Java\jdk-17.0.2" `
    -ExecStart StartService `
    -ExecStop StopService
 
# downloads the patch .jar file from the SOS Web Site using Invoke-WebRequest
# stores the patch .jar file to the JOC Cockpit's <data>\webapps\joc\WEB-INF\classes sub-directory
# stops and starts the JOC Cockpit's Windows service

Uninstall

Uninstall JOC Cockpit

...

for Linux

Code Block
languagepowershell
titleExample for use of Installation Scriptuse of Installation Script
#!/usr/bin/env pwsh

./Install-JS7ControllerJS7Joc.ps1 `
    -HomeDir "/opt/sos-berlin.com/js7/controller"joc `
    -Data "/var/sos-berlin.com/js7/`controller/jobscheduler"joc `
    -ControllerId "jobscheduler"JavaHome /opt/java/jdk-17.0.2 `
    -HttpPort 4445 `
    -ExecStop "StopService" `
    -Uninstall

# Uninstallsstops the ControllerJOC usingCockpit's systemd to stop the Controller service
# Removesremoves the JOC Cockpit's systemd serviceservices
# Removesremoves the home directory and data directorydirectories

Uninstall

...

JOC Cockpit for Windows

Code Block
languagepowershell
titleExample for use of Installation Script
./Install-JS7ControllerJS7Joc.ps1 `
    -HomeDir "C:\Program Files\sos-berlin.com\js7\controllerjoc" `
    -Data "C:\ProgramData\sos-berlin.com\js7\controller\jobschedulerjoc" `
    -ControllerIdJavaHome "jobscheduler" `
    -HttpPort 4445C:\Program Files\Java\jdk-17.0.2" `
    -StopTimeoutExecStop 10StopService `
     -Uninstall

# Uninstallsstops the ControllerJOC waitingCockpit's for a maximum of 10s for the Controller to terminate before aborting the Controller
# Stops andWindows service
# removes the JOC ControllerCockpit's Windows Serviceservice
# Removesremoves the home directory and data directory

...