...
...
Code Block |
---|
language | powershell |
---|
title | Example 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 |
---|
language | powershell |
---|
title | Example 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-1117.0.2+9" `
-JavaOptions "-Xmx512m -Xms256m" `
-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 Java version and Java options to be used
# stops and starts the Controller's Windows service
# operates the Controller for HTTP port 4444 |
...
Code Block |
---|
language | powershell |
---|
title | Example for use of Installation Script |
---|
|
Invoke-WebRequest `
-Uri 'https://download.sos-berlin.com/patches/JobScheduler2.2.23-patches/js7_controller_unix.2.2.3-PATCH.JS-1984.tar.gz' `
-Outfile /tmp/js7_controller_unix.2.2.3-PATCH.JS-1984.tar.gz
./Install-JS7Controller.ps1 `
-Tarball /tmp/js7_controller_unix.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 |
...
Code Block |
---|
language | powershell |
---|
title | Example for use of Installation Script |
---|
|
Invoke-WebRequest `
-Uri 'https://download.sos-berlin.com/patches/JobScheduler2.2.2/patch-20220331-JS-1984-3-patches/js7_controller.2.2.3-PATCH.JS-1984.jar' `
-Outfile /tmp/patch-20220331-JS-1984-js7_controller.2.2.3-PATCH.JS-1984.jar
./Install-JS7Controller.ps1 `
-JarPatchJar /tmp/patch-20220331-JS-1984-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 |
...
Code Block |
---|
language | powershell |
---|
title | Example 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 |
---|
language | powershell |
---|
title | Example for use of Installation Script |
---|
|
Invoke-WebRequest `
-Uri 'https://download.sos-berlin.com/patches/JobScheduler2.2.23-patch/js7_controller_windows.2.2.3-PATCH.JS-1984.tar.zipgz' `
-Outfile C:\tmp\js7_controller_windows.2.2.3-PATCH.JS-1984.tar.zipgz
./Install-JS7Controller.ps1 `
-Tarball "C:\tmp\js7_controller_windows.2.2.3-PATCH.JS-1984.tar.zipgz" `
-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 |
...
Code Block |
---|
language | powershell |
---|
title | Example for use of Installation Script |
---|
|
Invoke-WebRequest `
-Uri 'https://download.sos-berlin.com/patches/JobScheduler2.2.2/patch-20220331-JS-1984-3-patch/js7_controller.2.2.3-PATCH.JS-1984.jar' `
-Outfile C:\tmp\patch-20220331-JS-1984-js7_controller.2.2.3-PATCH.JS-1984.jar
./Install-JS7Controller.ps1 `
-JarPatchJar "C:\tmp\patch-20220331-JS-1984-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 |
...
Code Block |
---|
language | powershell |
---|
title | Example 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 |
ReplacementsThe Controller Installation Script performs replacements of placeholders in installation files and configuration files by option values.
Installation Files
<home>\bin\controller_instance.cmd
Configuration Files
<config>\private\private.conf
Replacements are performed for the following placeholders by respective option values:
Placeholder | Option 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 |
---|
language | yml |
---|
title | private.conf template file with placeholders |
---|
collapse | true |
---|
|
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