Versions Compared

Key

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

...

...

  • Considering the fact that PowerShell for Unix based environments misses support for sudo the Controller Installation Script does not own directories to other user accounts. Therefore below examples do not make use of --home-owner and --data-owner arguments that are available from the Unix Shell version of the Installation Script with JS7 - Agent - Unix Shell Installation Script - js7_install_controller.sh.

Install or Update

Install Controller for Unix

...

Code Block
languagepowershell
titleExample for use of Installation Script
./Install-JS7Controller.ps1 `
    -Release 2.5.2 `
    -HomeDir /home/sos/controller `
    -ControllerId "controller" `
    -HttpPort 4444 `
    -MakeDirs

# downloads the Controller release tarball from the SOS Web Site
# creates the home directory if it does not exist
# specifies the Controller ID that is a unique identifier:
#   in a Controller Cluster all Controller instances use the same Controller ID
#   for Standalone Controller instances each instance requires a unique Controller ID
# extracts the tarball to the Controller's home directory
# operates the Controller for HTTP port 4444

...

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

./Install-JS7Controller.ps1 `
    -Tarball /tmp/js7_controller_unix.2.5.2.tar.gz `
    -HomeDir /home/sos/controller `
    -ControllerId "controller" `
    -HttpPort 4444 `
    -MakeDirs

# downloads the Controller release tarball from the SOS Web Site using Invoke-WebRequest
# creates the home directory if it does not exist
# specifies the Controller ID that is a unique identifier:
#   in a Controller Cluster all Controller instances use the same Controller ID
#   for Standalone Controller instances each instance requires a unique Controller ID
# extracts the tarball to the Controller's home directory
# operates the Controller for HTTP port 4444

...

Code Block
languagepowershell
titleExample for use of Installation Script
./Install-JS7Controller.ps1 `
    -Release 2.5.2 `
    -HomeDir /opt/sos-berlin.com/js7/controller `
    -Data /var/sos-berlin.com/js7/controller `
    -ControllerId "controller" `
    -HttpPort 4444 `
    -MakeDirs

# downloads the Controller release tarball from the SOS Web Site
# suggests use of separate home and data directories for configuration data, log data etc.
# creates the home and data directories if they do not exist
# extracts the tarball to the Controller's home directory
# populates the data directory from initial configuration files
# operates the Controller for HTTP port 4444

...

Code Block
languagepowershell
titleExample for use of Installation Script
./Install-JS7Controller.ps1 `
    -Release 2.5.2 `
    -HomeDir /home/sos/controller `
    -ControllerId "controller" `
    -HttpPort 4444 `
    -LicenseKey /home/sos/controller-deployment/example.pem `
    -MakeDirs

# downloads the Controller release tarball from the SOS Web Site
# downloads the binary file for licensed code to enable cluster operations
# creates the home directory if it does not exist
# extracts the tarball to the Controller's home directory
# installs the license key file and binary file for licensed code
# operates the Controller for HTTP port 4444

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_controller_unix.2.5.2.tar.gz' `
    -Outfile /tmp/js7_controller_unix.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-JS7Controller.ps1 `
    -Tarball /tmp/js7_controller_unix.2.5.2.tar.gz `
    -HomeDir /home/sos/controller `
    -ControllerId "controller" `
    -HttpPort 4444 `
    -LicenseKey /home/sos/controller-deployment/example.pem `
    -LicenseBin /tmp/js7-license.jar `
    -MakeDirs

# downloads the Controller release tarball from the SOS Web Site using Invoke-WebRequest
# downloads the binary file for licensed code to enable cluster operations
# creates the home directory if it does not exist
# extracts the tarball to the Controller's home directory
# installs the license key file and binary file for licensed code
# operates the Controller for HTTP port 4444

...

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

./Install-JS7Controller.ps1 `
    -Tarball /tmp/js7_controller_unix.2.5.2.tar.gz `
    -HomeDir /home/sos/controller `
    -ControllerId "controller" `
    -HttpPort 4444 `
    -ExecStart StartService `
    -ExecStop StopService `
    -MakeService `
    -MakeDirs

# downloads the release tarball from the SOS Web Site using Invoke-WebRequest
# extracts the tarball to the Controller's home directory
# creates the Controller's systemd service
# stops and starts the Controller's systemd service
# operates the Controller for HTTP port 4444

...

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

./Install-JS7Controller.ps1 `
    -Tarball /tmp/js7_controller_unix.2.5.2.tar.gz `
    -HomeDir /home/sos/controller `
    -ControllerId "controller" `
    -HttpPort 4444 `
    -ExecStart "/home/sos/controller/bin/controller_instance.sh start" `
    -ExecStop "home/sos/controller/bin/controller_instance.sh stop" `
    -MakeDirs

# downloads the release tarball from the SOS Web Site using Invoke-WebRequest
# extracts the tarball to the Controller's home directory
# stops and starts the Controller instance by use of individual commands
# operates the Controller for HTTP port 4444

...

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

./Install-JS7Controller.ps1 `
    -Tarball /tmp/js7_controller_unix.2.5.2.tar.gz `
    -HomeDir /home/sos/controller `
    -ControllerId "controller" `
    -HttpPort 4444 `
    -Restart `
    -MakeDirs

# downloads the release tarball from the SOS Web Site using Invoke-WebRequest
# extracts the tarball to the Controller's home directory
# creates the Controller's systemd service
# stops and starts the Controller from its instance start script <home>/bin/controller_instance.sh
# operates the Controller for HTTP port 4444

...

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

./Install-JS7Controller.ps1 `
    -Tarball /tmp/js7_controller_unix.2.5.2.tar.gz `
    -HomeDir /home/sos/controller `
    -ControllerId "controller" `
    -HttpPort 4444 `
    -JavaHome /opt/java/jdk-1117.0.2+9 `
    -JavaOptions "-Xmx512m -Xms256m" `
    -Restart `
    -MakeDirs

# downloads the release tarball from the SOS Web Site using Invoke-WebRequest
# extracts the tarball to the Controller's home directory
# specifies the Java version and Java options to be used
# stops and starts the Controller from its instance start script <home>/bin/controller_instance.sh
# operates the Controller for HTTP port 4444

...

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

./Install-JS7Controller.ps1 `
    -Tarball tmp/js7_controller_unix.2.5.2.tar.gz `
    -HomeDir /home/sos/controller `
    -ControllerId "controller" `
    -HttpPort localhost:4444 `
    -HttpsPort batch.example.com:4444 `
    -PrivateConf /home/sos/controller-deployment/private.conf `
    -JocPrimaryCert /home/sos/controller-deployment/centostest-primary.crt `
    -JocSecondaryCert /home/sos/controller-deployment/centostest-secondary.crt `
    -Keystore /home/sos/controller-deployment/https-keystore.p12 `
    -KeystorePassword ('jobscheduler' | ConvertTo-SecureString -AsPlainText -Force) `
    -Truststore /home/sos/controller-deployment/https-truststore.p12 `
    -TruststorePassword ('jobscheduler' | ConvertTo-SecureString -AsPlainText -Force) ` 
    -ExecStart StartService `
    -ExecStop StopService `
    -MakeService `
    -MakeDirs

# downloads the release tarball from the SOS Web Site using Invoke-WebRequest
# extracts the tarball to the Controller's home directory
# specifies the Controller ID
# specifies HTTP port 4444 on the localhost network interface and the same HTTPS port on the server network interface
# specifies the paths to the Primary and Secondary JOC Cockpit's server certificates if a JOC Cockpit Cluster is used
#     for a Standalone JOC Cockpit the -JocSecondaryCert argument is omitted
# deploys the Controller private configuration file which holds references to keystore and truststore
# deploys keystore and truststore files in PKCS12 format 
# stops and starts the Controller's systemd service

...

  • For details about certificates and HTTPS connections see JS7 - Controller HTTPS Connections.
  • The private.conf configuration file holds references to the Controller's certificate in order to verify the connection from the Controller using HTTPS mutual authentication.
  • Users have a choice how to provide the required configuration:
    • The Download the private.conf-template-controller template, the Controller Installation Script performs replacements of placeholders in the private.conf configuration template file from option argument values, for details see chapter Replacements.
    • Users can manually adjust configuration items in the private.conf file that they specify for the Controller Installation Script., see JS7 - Controller Configuration Items.

...

Code Block
languagepowershell
titleExample for use of Installation Script
./Install-JS7Controller.ps1 `
    -HomeDir /home/sos/controller `
    -ControllerId "controller" `
    -HttpPort localhost:4444 `
    -HttpsPort batch.example.com:4444 `
    -PrivateConf /home/sos/controller-deployment/private.conf `
    -JocPrimaryCert /home/sos/controller-deployment/centostest-primary.crt `
    -JocSecondaryCert /home/sos/controller-deployment/centostest-secondary.crt `
    -Keystore /home/sos/controller-deployment/https-keystore.p12 `
    -KeystorePassword ('jobscheduler' | ConvertTo-SecureString -AsPlainText -Force) `
    -Truststore /home/sos/controller-deployment/https-truststore.p12 `
    -TruststorePassword ('jobscheduler' | ConvertTo-SecureString -AsPlainText -Force) ` 
    -ExecStart StartService `
    -ExecStop StopService `
    -MakeService `
    -NoInstall

# performs no installation but certificate renewal only
# specifies the Controller ID
# specifies HTTP port 4444 on the localhost network interface and the same HTTPS port on the server network interface
# specifies the paths to the Primary and Secondary JOC Cockpit's server certificates if a JOC Cockpit Cluster is used
#     for a Standalone JOC Cockpit the -JocSecondaryCert argument is omitted
# deploys the Controller private configuration file which holds references to keystore and truststore
# deploys keystore and truststore files in PKCS12 format
# stops and starts the Controller's systemd service

...

Start Controller

...

Service

Install or Update from Download

Code Block
languagepowershell
titleExample for use of Installation Script
./Install-JS7Controller.ps1 `
     -Release 2.5.2HomeDir /home/sos/controller `
    -HomeDir "C:\Program Files\sos-berlin.com\js7\controller"ControllerId controller `
    -Data "C:\ProgramData\sos-berlin.com\js7\controller" ` 
    -ControllerId "controller"HttpPort 4444 `
    -ExecStart StartService `
    -HttpPortExecStop 4444StopService `
    -MakeDirsNoInstall

# downloadsstops the Controller's releasesystemd tarballservice fromif the SOSController Webis Siterunning
# createsstarts the homeController's and data directories if they do not exist
# specifies the Controller ID that is a unique identifier:
#   in a Controller Cluster all Controller instances use the same Controller ID
#   for Standalone Controller instances each instance requires a unique Controller ID
# extracts the tarball tosystemd service

Stop Controller Service

Code Block
languagepowershell
titleExample for use of Installation Script
./Install-JS7Controller.ps1 `
    -HomeDir /home/sos/controller `
    -ControllerId controller `
    -HttpPort 4444 `
    -ExecStop StopService `
    -NoInstall

# stops the Controller's homesystemd directory
#service operatesif the Controller for HTTP port 4444is running

Install Controller for Windows

Install or Update from

...

Download

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

./Install-JS7Controller.ps1 `Release 2.5.2 `
    -Tarball "C:\tmp\js7_controller_windows.2.5.2.zip `
    -HomeDir "C:\Program Files\sos-berlin.com\js7\controller" `
    -Data "C:\ProgramData\sos-berlin.com\js7\controller" ` 
      -ControllerId "controller" `
     -HttpPort 4444 `
    -MakeDirs
 
# downloads the Controller release tarball from the SOS Web Site using Invoke-WebRequest
# creates the home and data directories if they do not exist
# specifies the Controller ID that is a unique identifier:
#   in a Controller Cluster all Controller instances use the same Controller ID
#   for Standalone Controller instances each instance requires a unique Controller ID
# extracts the tarball to the Controller's home directory
# operates the Controller for HTTP port 4444

Install or Update from

...

.zip Archive

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

./Install-JS7Controller.ps1 `
    -Release Tarball "C:\tmp\js7_controller_windows.2.5.2.zip `
    -HomeDir "C:\Program Files\sos-berlin.com\js7\controller" `
    -Data "C:\ProgramData\sos-berlin.com\js7\controller" `
      -ControllerId "controller" `
     -HttpPort 4444 `
    -LicenseKey "C:\js7\controller-deployment\example.pem" `
    -MakeDirs

MakeDirs
 
# downloads the Controller release tarball from the SOS Web Site using Invoke-WebRequest
# downloadscreates the binaryhome fileand fordata licenseddirectories codeif tothey enabledo clusternot operationsexist
# createsspecifies the homeController directoryID ifthat itis doesa notunique existidentifier:
#  extracts in thea tarballController toCluster theall Controller's home directory
# installsinstances use the licensesame keyController fileID
# and binary file for licensed codeStandalone Controller instances each instance requires a unique Controller ID
# extracts the tarball to the Controller's home directory
# operates the Controller for HTTP port 4444

Install or Update from

...

Download with Commercial License

Code Block
languagepowershell
titleExample for use of Installation Script
Invoke-WebRequest./Install-JS7Controller.ps1 `
    -Uri 'https://download.sos-berlin.com/JobScheduler.Release 2.5/js7_controller_windows.2.5.2.zip' -Outfile C:\tmp\js7_controller_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-JS7Controller.ps1.2 `
    -HomeDir "C:\Program Files\sos-berlin.com\js7\controller" `
    -Data "C:\ProgramData\sos-berlin.com\js7\controller" `
    -ControllerId controller `
    -HttpPort 4444 `
    -TarballLicenseKey "C:\tmpjs7\js7_controller_windows.2.5.2.zipcontroller-deployment\example.pem" `
     -HomeDir "C:\Program Files\sos-berlin.com\js7\controller" `
    -Data "C:\ProgramData\sos-berlin.com\js7\controller" `
    -ControllerId "controller" `
    -HttpPort 4444 `
    -LicenseKey "C:\js7\controller-deployment\example.pem" `
    -LicenseBin "C:\tmp\js7-liclense.jar" ` 
    -MakeDirs

# downloads the Controller release tarball from the SOS Web Site using Invoke-WebRequest
# downloads the binary file for licensed code to enable cluster operations
# creates the home directory if  -MakeDirs

# downloads the Controller release tarball from the SOS Web Site
# downloads the binary file for licensed code to enable cluster operations
# creates the home directory if it does not exist
# extracts the tarball to the Controller's home directory
# installs the license key file and binary file for licensed code
# operates the Controller for HTTP port 4444

Install or Update

...

from .zip Archive with Commercial License

Code Block
languagepowershell
titleExample for use of Installation Script
Invoke-WebRequest `
 -Uri   -Uri 'https://download.sos-berlin.com/JobScheduler.2.5/js7_controller_windows.2.5.2.zip' `
    -Outfile C:\tmp\js7_controller_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-JS7Controller.ps1 `
    -Tarball "C:\tmp\js7_controller_windows.2.5.2.zip" `
    -HomeDir "C:\Program Files\sos-berlin.com\js7\controller" `
    -Data "C:\ProgramData\sos-berlin.com\js7\controller" `
      -ControllerId "controller" `
    -HttpPort 4444 `
    -ExecStart StartService `
    -ExecStop StopService LicenseKey "C:\js7\controller-deployment\example.pem" `
    -MakeService `
    LicenseBin "C:\tmp\js7-license.jar" ` 
    -MakeDirs

# downloads the Controller release tarball from the SOS Web Site using Invoke-WebRequest
# extractsdownloads the tarballbinary file for licensed code to enable the Controller'scluster operations
# creates the home directory if it does not exist
# createsextracts the tarball to the Controller's Windowshome servicedirectory
# that is running in installs the systemlicense account
#key stopsfile and startsbinary thefile Controller'sfor Windowslicensed servicecode
# operates the Controller for HTTP port 4444

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_controller_windows.2.5.2.zip' `
    -Outfile C:\tmp\js7_controller_windows.2.5.2.zip

./Install-JS7Controller.ps1 `
    -Tarball "C:\tmp\js7_controller_windows.2.5.2.zip" `
    -HomeDir "C:\Program Files\sos-berlin.com\js7\controller" `
    -Data "C:\ProgramData\sos-berlin.com\js7\controller" `
    -ControllerId "controller" `
    -HttpPort 4444 `
    -ServiceCredentials ( New-Object -typename System.Management.Automation.PSCredential -ArgumentList '.\sos', ( 'secret' | ConvertTo-SecureString -AsPlainText -Force) ) `
    -ExecStart StartService `
    -ExecStop StopService `
    -MakeService `
    -MakeDirs

# downloads the release tarball from the SOS Web Site using Invoke-WebRequest
# extracts the tarball to the Controller's home directory
# creates the Controller's Windows service that is running in the local account '.\sos' using the password 'secret'
#    credentials can be specified in a number of wayssystem account
# stops and starts the Controller's Windows service
# operates the Controller for HTTP port 4444

Install or Update

...

and Stop/Start using Windows Service and specific Account

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

./Install-JS7Controller.ps1 `
    -Tarball "C:\tmp\js7_controller_windows.2.5.2.zip" `
     -HomeDir "C:\Program Files\sos-berlin.com\js7\controller" `
    -Data "C:\ProgramData\sos-berlin.com\js7\controller\" `
     -ControllerId "controller" `
     -HttpPort 4444 `
    -JavaHome "C:\Program Files\Java\jdk-11.0.2+9"ServiceCredentials ( New-Object -typename System.Management.Automation.PSCredential `
    -JavaOptions "-Xmx512m -Xms256m" `
    -ExecStart StartService `
    -ExecStop StopService `
    -MakeService `
    -MakeDirs

# downloads the release ArgumentList '.\sos', ( 'secret' | ConvertTo-SecureString -AsPlainText -Force) ) `
    -ExecStart StartService `
    -ExecStop StopService `
    -MakeService `
    -MakeDirs

# downloads the release tarball from the SOS Web Site using Invoke-WebRequest
# extracts the tarball to the Controller's home directory
# specifiescreates the Java version and Java options to be used
# stops and starts the Controller's Controller's Windows service that is running in the local account '.\sos' using the password 'secret'
#    credentials can be specified in a number of ways
# stops and starts the Controller's Windows service
# operates the Controller for HTTP port 4444

Install or Update

...

using Java Home and Java Options

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

./Install-JS7Controller.ps1 `
    -Tarball "C:\tmp\js7_controller_windows.2.5.2.zip" `
     -HomeDir "C:\Program Files\sos-berlin.com\js7\controller" `
    -Data "C:\ProgramData\sos-berlin.com\js7\controller\" `
    -ControllerId "controller" `
     -HttpPort localhost:4444 `
    -HttpsPort batch.example.com:4444 `
    -PrivateConf JavaHome "C:\Program Files\js7Java\controller-deployment\private.confjdk-17.0.2" `
    -JocPrimaryCertJavaOptions "C:\js7\controller-deployment\wintest-primary.crt-Xmx512m -Xms256m" `
    -JocSecondaryCert "C:\js7\controller-deployment\wintest-secondary.crt"ExecStart StartService `
    -Keystore "C:\js7\controller-deployment\https-keystore.pfx"ExecStop StopService `
    -MakeService `
    -KeystorePassword ('jobscheduler' | ConvertTo-SecureString -AsPlainText -Force) `
    -Truststore "C:\js7\controller-deployment\https-truststore.pfx" `
    -TruststorePassword ('jobscheduler' | ConvertTo-SecureString -AsPlainText -Force) ` 
    -ExecStart StartService `
    -ExecStop StopService `
    -MakeService `
    -MakeDirs

# downloads the release tarball from the SOS Web Site using Invoke-WebRequest
# extracts the tarball to the Controller's home directory
# specifies the Controller ID
# specifies HTTP port 4444 on the localhost network interface and the same HTTPS port on the server network interface
# specifies the paths to the Primary and Secondary JOC Cockpit's server certificates if a JOC Cockpit Cluster is used
#     for a Standalone JOC Cockpit the -JocSecondaryCert argument is omitted
# deploys the Controller private configuration file which holds references to keystore and truststore
# deploys keystore and truststore files in PKCS12 format 
# stops and starts the Controller's Windows service

Note:

  • For details about certificates and HTTPS connections see JS7 - Controller HTTPS Connections.
  • The private.conf configuration file holds references to the Controller's certificate in order to verify the connection from the Controller using HTTPS mutual authentication.
  • Users have a choice how to provide the required configuration:
    • The Controller Installation Script performs replacements of placeholders in the private.conf configuration file from option values, for details see chapter Replacements.
    • Users can manually adjust configuration items in the private.conf file that they specify for the Controller Installation Script., see JS7 - Controller Configuration Items.

Renew Certificates for HTTPS Connections

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" `
    -ControllerId "controller" `
    -HttpPort localhost:4444 `
    -HttpsPort batch.example.com:4444 `
    -PrivateConf "C:\js7\controller-deployment\private.conf" `
    -JocPrimaryCert "C:\js7\controller-deployment\wintest-primary.crt" `
    -JocSecondaryCert "C:\js7\controller-deployment\wintest-secondary.crt" `
    -Keystore "C:\js7\controller-deployment\https-keystore.pfx" `
    -KeystorePassword ('jobscheduler' | ConvertTo-SecureString -AsPlainText -Force) `
    -Truststore "C:\js7\controller-deployment\https-truststore.pfx" `
    -TruststorePassword ('jobscheduler' | ConvertTo-SecureString -AsPlainText -Force) ` 
    -ExecStart StartService `
    -ExecStop StopService `
    -NoInstall

# performs no installation but certificate renewal only
# specifies the Controller ID
# specifies HTTP port 4444 on the localhost network interface and the same HTTPS port on the server network interface
# specifies the paths to the Primary and Secondary JOC Cockpit's server certificates if a JOC Cockpit Cluster is used
#     for a Standalone JOC Cockpit the -JocSecondaryCert argument is omitted
# deploys the Controller private configuration file which holds references to keystore and truststore
# deploys keystore and truststore files in PKCS12 format
# stops and starts the Controller's Windows service

Patch

Patch Controller for Unix

Patch Controller from Download

Code Block
languagepowershell
titleExample for use of Installation Script
./Install-JS7Controller.ps1 `
    -Release 2.2.3 `
    -Patch JS-1984 `
    -HomeDir /home/sos/controller `
    -HttpPort 4444 `
    -ExecStart StartService `
    -ExecStop StopService

# downloads the patch tarball from the SOS Web Site
# extracts the patch tarball to the Controller's home directory
# stores the patch files to the Controller's <home>/lib/patches sub-directory
# stops and starts the Controller's systemd service

Patch Controller from Tarball

Code Block
languagepowershell
titleExample for use of Installation Script
Invoke-WebRequest -Uri 'https://download.sos-berlin.com/JobScheduler.2.2/js7_controller_unix.2.2.3.JS-1984.tar.gz' -Outfile /tmp/js7_controller_unix.2.2.3.JS-1984.tar.gz

./Install-JS7Controller.ps1 `
    -Tarball  /tmp/js7_controller_unix.2.2.3.JS-1984.tar.gz ` 
    -Patch JS-1984 `
    -HomeDir /home/sos/controller `
    -HttpPort 4444 `
    -ExecStart StartService `
    -ExecStop StopService
 
# downloads the patch tarball from the SOS Web Site using Invoke-WebRequest
# extracts the patch tarball to the Controller's home directory
# stores the patch files to the Controller's <home>/lib/patches sub-directory
# stops and starts the Controller's systemd service

Patch Controller for Windows

Patch from Download

Code Block
languagepowershell
titleExample for use of Installation Script
./Install-JS7Controller.ps1 `
    -Release 2.2.3 `
    -Patch JS-1984 `
    -HomeDir "C:\Program Files\sos-berlin.com\js7\controller" `
    -HttpPort 4444 `
    -ExecStart StartService `
    -ExecStop StopService

# downloads the patch tarball from the SOS Web Site
# extracts the patch tarball to the Controller's home directory
# stores the patch files to the Controller's <home>\lib\patches sub-directory
# stops and starts the Controller's Windows service

Patch from .zip Archive

Code Block
languagepowershell
titleExample for use of Installation Script
Invoke-WebRequest -Uri 'https://download.sos-berlin.com/JobScheduler.2.2/js7_controller_windows.2.2.3.JS-1984.zip' -Outfile C:\tmp\js7_controller_windows.2.2.3.JS-1984.zip

./Install-JS7Controller.ps1 `
    -Tarball "C:\tmp\downloads\js7_controller_windows.2.2.3.JS-1984.zip" `
    -Patch JS-1984 `
    -HomeDir "C:\Program Files\sos-berlin.com\js7\controller" `
    -HttpPort 4444 `
    -ExecStart StartService `
    -ExecStop StopService
 
# downloads the patch tarball from the SOS Web Site using Invoke-WebRequest
# extracts the patch tarball to the Controller's home directory
# stores the patch files to the Controller's <home>\lib\patches sub-directory
# stops and starts the Controller's Windows service

Uninstall

Uninstall Controller for Unix

Code Block
languagepowershell
titleExample for use of Installation Script
./Install-JS7Controller.ps1 `
    -HomeDir "/opt/sos-berlin.com/js7/controller" `
    -Data "/var/sos-berlin.com/js7/`controller" `
    -ControllerId "controller" `
    -HttpPort 4444 `
    -ExecStop StopService `
    -Uninstall

# stops the Controller's systemd service
# removes the Controller's systemd service
# removes the home directory and data directory

Uninstall Controller for Windows

...

languagepowershell
titleExample for use of Installation Script

...

MakeDirs

# downloads the release tarball from the SOS Web Site using Invoke-WebRequest
# extracts the tarball to the Controller's home directory
# specifies the Java version and Java options to be used
# stops and starts the Controller's Windows service
# operates the Controller for HTTP port 4444

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_controller_windows.2.5.2.zip' `
    -Outfile C:\tmp\js7_controller_windows.2.5.2.zip

./Install-JS7Controller.ps1 `
    -Tarball "C:\tmp\js7_controller_windows.2.5.2.zip" `
    -HomeDir "C:\Program Files\sos-berlin.com\js7\controller" `
    -Data "C:\ProgramData\sos-berlin.com\js7\controller" `
    -ControllerId controller `
    -HttpPort localhost:4444 `
    -HttpsPort batch.example.com:4444 `
    -PrivateConf "C:\js7\controller-deployment\private.conf" `
    -JocPrimaryCert "C:\js7\controller-deployment\wintest-primary.crt" `
    -JocSecondaryCert "C:\js7\controller-deployment\wintest-secondary.crt" `
    -Keystore "C:\js7\controller-deployment\https-keystore.pfx" `
    -KeystorePassword ('jobscheduler' | ConvertTo-SecureString -AsPlainText -Force) `
    -Truststore "C:\js7\controller-deployment\https-truststore.pfx" `
    -TruststorePassword ('jobscheduler' | ConvertTo-SecureString -AsPlainText -Force) ` 
    -ExecStart StartService `
    -ExecStop StopService `
    -MakeService `
    -MakeDirs

# downloads the release tarball from the SOS Web Site using Invoke-WebRequest
# extracts the tarball to the Controller's home directory
# specifies the Controller ID
# specifies HTTP port 4444 on the localhost network interface and the same HTTPS port on the server network interface
# specifies the paths to the Primary and Secondary JOC Cockpit's server certificates if a JOC Cockpit Cluster is used
#     for a Standalone JOC Cockpit the -JocSecondaryCert option is omitted
# deploys the Controller private configuration file which holds references to keystore and truststore
# deploys keystore and truststore files in PKCS12 format 
# stops and starts the Controller's Windows service

Note:

  • For details about certificates and HTTPS connections see JS7 - Controller HTTPS Connections.
  • The private.conf configuration file holds references to the Controller's certificate in order to verify the connection from the Controller using HTTPS mutual authentication.
  • Users have a choice how to provide the required configuration:

Renew Certificates for HTTPS Connections

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" `
    -ControllerId controller `
    -HttpPort localhost:4444 `
    -HttpsPort batch.example.com:4444 `
    -PrivateConf "C:\js7\controller-deployment\private.conf" `
    -JocPrimaryCert "C:\js7\controller-deployment\wintest-primary.crt" `
    -JocSecondaryCert "C:\js7\controller-deployment\wintest-secondary.crt" `
    -Keystore "C:\js7\controller-deployment\https-keystore.pfx" `
    -KeystorePassword ('jobscheduler' | ConvertTo-SecureString -AsPlainText -Force) `
    -Truststore "C:\js7\controller-deployment\https-truststore.pfx" `
    -TruststorePassword ('jobscheduler' | ConvertTo-SecureString -AsPlainText -Force) ` 
    -ExecStart StartService `
    -ExecStop StopService `
    -NoInstall

# performs no installation but certificate renewal only
# specifies the Controller ID
# specifies HTTP port 4444 on the localhost network interface and the same HTTPS port on the server network interface
# specifies the paths to the Primary and Secondary JOC Cockpit's server certificates if a JOC Cockpit Cluster is used
#     for a Standalone JOC Cockpit the -JocSecondaryCert option is omitted
# deploys the Controller private configuration file which holds references to keystore and truststore
# deploys keystore and truststore files in PKCS12 format
# stops and starts the Controller's Windows service

Start Controller Service

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

# stops the Controller's Windows service if the Controller is running
# starts the Controller's Windows service

Stop Controller Service

Code Block
languagepowershell
titleExample for use of Installation Script
./Install-JS7Controller.ps1 `
    -HomeDir "C:\Program Files\sos-berlin.com\js7\controller" `
    -ControllerId controller `
    -HttpPort 4444 `
    -ExecStop StopService `
    -NoInstall

# stops the Controller's Windows service if the Controller is running

Patch

Patch Controller for Unix

Patch from Download

Code Block
languagepowershell
titleExample for use of Installation Script
./Install-JS7Controller.ps1 `
    -Release 2.2.3 `
    -Patch JS-1984 `
    -HomeDir /home/sos/controller `
    -ControllerId controller `
    -HttpPort 4444 `
    -ExecStart StartService `
    -ExecStop StopService

# downloads the patch tarball from the SOS Web Site
# extracts the patch tarball to the Controller's home directory
# stores the patch files to the Controller's <home>/lib/patches sub-directory
# stops and starts the Controller's systemd service

Patch from Tarball

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

./Install-JS7Controller.ps1 `
    -Tarball /tmp/js7_controller.2.2.3-PATCH.JS-1984.tar.gz ` 
    -Patch JS-1984 `
    -HomeDir /home/sos/controller `
    -ControllerId controller `
    -HttpPort 4444 `
    -ExecStart StartService `
    -ExecStop StopService
 
# downloads the patch tarball from the SOS Web Site using Invoke-WebRequest
# extracts the patch tarball to the Controller's home directory
# stores the patch files to the Controller's <home>/lib/patches sub-directory
# stops and starts the Controller's systemd service

Patch from .jar File

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

./Install-JS7Controller.ps1 `
    -PatchJar /tmp/js7_controller.2.2.3-PATCH.JS-1984.jar ` 
    -Patch JS-1984 `
    -HomeDir /home/sos/controller `
    -ControllerId controller `
    -HttpPort 4444 `
    -ExecStart StartService `
    -ExecStop StopService
 
# downloads the patch .jar file from the SOS Web Site using Invoke-WebRequest
# stores the patch .jar file to the Controller's <home>/lib/patches sub-directory
# stops and starts the Controller's systemd service

Patch Controller for Windows

Patch from Download

Code Block
languagepowershell
titleExample for use of Installation Script
./Install-JS7Controller.ps1 `
    -Release 2.2.3 `
    -Patch JS-1984 `
    -HomeDir "C:\Program Files\sos-berlin.com\js7\controller" `
    -ControllerId controller `
    -HttpPort 4444 `
    -ExecStart StartService `
    -ExecStop StopService

# downloads the patch tarball from the SOS Web Site
# extracts the patch tarball to the Controller's home directory
# stores the patch files to the Controller's <home>\lib\patches sub-directory
# stops and starts the Controller's Windows service

Patch 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_controller.2.2.3-PATCH.JS-1984.tar.gz' `
    -Outfile C:\tmp\js7_controller.2.2.3-PATCH.JS-1984.tar.gz

./Install-JS7Controller.ps1 `
    -Tarball "C:\tmp\js7_controller.2.2.3-PATCH.JS-1984.tar.gz" `
    -Patch JS-1984 `
    -HomeDir "C:\Program Files\sos-berlin.com\js7\controller" `
    -ControllerId controller `
    -HttpPort 4444 `
    -ExecStart StartService `
    -ExecStop StopService
 
# downloads the patch tarball from the SOS Web Site using Invoke-WebRequest
# extracts the patch tarball to the Controller's home directory
# stores the patch files to the Controller's <home>\lib\patches sub-directory
# stops and starts the Controller's Windows service

Patch 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_controller.2.2.3-PATCH.JS-1984.jar' `
    -Outfile C:\tmp\js7_controller.2.2.3-PATCH.JS-1984.jar

./Install-JS7Controller.ps1 `
    -PatchJar "C:\tmp\js7_controller.2.2.3-PATCH.JS-1984.jar" `
    -Patch JS-1984 `
    -HomeDir "C:\Program Files\sos-berlin.com\js7\controller" `
    -ControllerId controller `
    -HttpPort 4444 `
    -ExecStart StartService `
    -ExecStop StopService
 
# downloads the patch .jar file from the SOS Web Site using Invoke-WebRequest
# stores the patch .jar file to the Controller's <home>\lib\patches sub-directory
# stops and starts the Controller's Windows service

Uninstall

Uninstall Controller for Unix

Code Block
languagepowershell
titleExample for use of Installation Script
./Install-JS7Controller.ps1 `
    -HomeDir "/opt/sos-berlin.com/js7/controller" `
    -Data "/var/sos-berlin.com/js7/controller" `
    -ControllerId controller `
    -HttpPort 4444 `
    -ExecStop StopService `
    -Uninstall

# stops the Controller's systemd service
# removes the Controller's systemd service
# removes the home directory and data directory

Uninstall Controller for Windows

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" `
    -ControllerId controller `
    -HttpPort 4444 `
    -ExecStop StopService `
    -Uninstall

# stops the Controller's Windows service
# removes the Controller's Windows service
# removes the home directory and data directory


Anchor
replacements
replacements
Replacements

The Controller Installation Script performs replacements of placeholders in installation files and configuration files by option values.

Installation Files

  • <home>\bin\controller_instance.cmd
    • Replacements are performed for the following placeholders used for environment variables by respective option values:

      PlaceholderOption Value
      JS7_CONTROLLER_HOME-HomeDir
      JS7_CONTROLLER_DATA-Data
      JS7_CONTROLLER_ID-ControllerId
      JS7_CONTROLLER_USER-User
      JS7_CONTROLLER_HTTP_PORT-HttpPort
      JS7_CONTROLLER_HTTPS_PORT-HttpsPort
      JS7_CONTROLLER_CONFIG_DIR-Config
      JS7_CONTROLLER_LOGS-Logs
      JS7_CONTROLLER_PID_FILE_DIR-PidFileDir
      JS7_CONTROLLER_PID_FILE_NAME-PidFileName
      JAVA_HOME-JavaHome
      JAVA_OPTIONS-JavaOptions

Configuration Files

  • <config>\private\private.conf
    • Replacements are performed for the following placeholders by respective option values:

      PlaceholderOption Value
      {{controller-id}} -ControllerId
      {{controller-primary-distinguished-name}}-ControllerPrimaryCert
      {{controller-secondary-distinguished-name}}-ControllerSecondaryCert
      {{joc-primary-distinguished-name}}-JocPrimaryCert
      {{joc-secondary-distinguished-name}}-JocSecondaryCert
      {{keystore-file}}-Keystore
      {{keystore-password}}

      -KeystorePassword

      {{keystore-alias}}-KeystoreAlias
      {{client-keystore-file}}-ClientKeystore
      {{client-keystore-password}}-ClientKeystorePassword
      {{client-keystore-alias}}-ClientKeystoreAlias
      {{truststore-file}}-Truststore
      {{truststore-password}}-TruststorePassword



    • Find a template for a private.conf file using placeholders for HTTPS mutual authentication:

      Download: private.conf-template-controller

      Code Block
      languageyml
      titleprivate.conf template file with placeholders
      collapsetrue
      js7 {
          auth {
              users {
                  # History account (used to release events)
                  History {
                      distinguished-names=[
                          "{{joc-primary-distinguished-name}}",
                          "{{joc-secondary-distinguished-name}}"
                      ]
                      password="sha512:B793649879D61613FD3F711B68F7FF3DB19F2FE2D2C136E8523ABC87612219D5AECB4A09035AD88D544E227400A0A56F02BC990CF0D4CB348F8413DE00BCBF08"
                  }
       
                  # JOC account (needs UpdateItem permission for deployment)
                  JOC {
                      distinguished-names=[
                          "{{joc-primary-distinguished-name}}",
                          "{{joc-secondary-distinguished-name}}"
                      ]
                      password="sha512:3662FD6BF84C6B8385FC15F66A137AB75C755147A81CC7AE64092BFE8A18723A7C049D459AB35C059B78FD6028BB61DCFC55801AE3894D2B52401643F17A07FE"
                      permissions=[
                          UpdateItem
                      ]
                  }
       
                  # Controller ID and distinguished names for connections by primary/secondary Controller instance
                  {{controller-id}} {
                      distinguished-names=[
                          "{{controller-primary-distinguished-name}}",
                          "{{controller-secondary-distinguished-name}}"
                      ]
                      password="plain:"
                  }
              }
              cluster.password=""
          }
       
          configuration {
              # Locations of certificates and public keys used for signature verification
              trusted-signature-keys {
                  # PGP=${js7.config-directory}"/private/trusted-pgp-keys"
                  X509=${js7.config-directory}"/private/trusted-x509-keys"
              }
          }
       
          journal {
              # allow History account to release unused journals
              users-allowed-to-release-events=[
                  History
              ]
          }
       
          web {
              # Locations of keystore and truststore files for HTTPS connections
              https {
                  keystore {
                      # Default: ${js7.config-directory}"/private/https-keystore.p12"
                      file=${js7.config-directory}"/private/{{keystore-file}}"
                      key-password="{{keystore-password}}"
                      store-password="{{keystore-password}}"
                      # alias="{{keystore-alias}}"
                  }
      
                  client-keystore {
                      # Default: ${js7.config-directory}"/private/https-client-keystore.p12"
                      file=${js7.config-directory}"/private/{{client-keystore-file}}"
                      key-password="{{client-keystore-password}}"
                      store-password="{{client-keystore-password}}"
                      # alias="{{client-keystore-alias}}"
                  }
      
                  truststores=[
                      {
                          # Default: ${js7.config-directory}"/private/https-truststore.p12"
                          file=${js7.config-directory}"/private/{{truststore-file}}"
                          store-password="{{truststore-password}}"
                      }
                  ]
              }
          }
      }

Automation

The Controller Installation Script can be executed from a job for automated update and upgrade of JS7 Controllers.

The steps for automation are similar to update and upgrade of JS7 Agents. Find instructions how to set up workflow automation from the JS7 - Automated Installation and Update article.

Further Resources