Versions Compared

Key

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

...

Install-JS7Joc.ps1 [[-HomeDir] <String>] [[-Data] <String>] [[-ClusterIdInstanceId] <String><Int32>] [[-InstanceIdRelease] <Int32><String>] [[-ReleaseTarball] <String>] [[-TarballPatch] <String>] [[-PatchPatchKey] <String>] [[-JarPatchJar] <String>] [[-User] <String>] [[-SetupDir] <String>] [[-ResponseDir] <String>] [[-LicenseKey] <String>] [[-LicenseBin] <String>] [[-BackupDir] <String>] [[-LogDir] <String>] [[-ExecStart] <String>] [[-ExecStop] <String>] [[-ReturnValues] <String>] [[-DeployDir] <String[]>] [[-Ini] <String[]>] [[-Properties] <String>] [[-Title] <String>] [[-SecurityLevel] <String>] [[-DBMSConfig] <String[]>] [[-DBMSDriver] <String[]>] [[-DBMSInit] <String[]>] [[-HttpPort] <String>] [[-HttpsPort] <String>] [[-Keystore] <String>] [[-KeystorePassword] <SecureString>] [[-KeyAlias] <String>] [[-Truststore] <String>] [[-TruststorePassword] <SecureString>] [[-JavaHome] <String>] [[-JavaOptions] <String>] [[-ServiceDir] <String>] [[-ServiceFile] <String>] [[-ServiceName] <String>] [[-ServiceNameSuffix] <String>] [[-ServiceCredentials] <PSCredential>] [[-ServiceStartMode] <String>] [[-ServiceDisplayName] <String>] [-AsUser] [-PreserveEnv] [-AsApiServer] [-NoConfig] [-NoInstall] [-NoJetty] [-Uninstall] [-ShowLogs] [-MakeDirs] [-MakeService] [-Restart] [-Kill] [-WhatIf] [-Confirm] [<CommonParameters>]

...

Required?false
Position?2
Default value
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

...

InstanceId

-ClusterId <String>InstanceId <Int32>
Specifies the unique identifier of a JOC Cockpit cluster. A number a unique number between 0 and 99 that identifies the JOC Cockpit instance.

The ordering of numbers determines appearence of JOC Cockpit instances can be operated as a cluster using the same Cluster IDin the JOC Cockpit dashboard.

Required?false
Position?3
Default valuejoc0
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

...

Release

-InstanceId <Int32>Release <String>
Specifies a unique number between 0 and 99 that identifies the JOC Cockpit instance.
The ordering of numbers determines appearence of JOC Cockpit instances in the JOC Cockpit dashboard.

Required?false
Position?4
Default value0
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

Release

-Release <String>
Specifies a release number of the release number of the JS7 JOC Cockpit such as 2.3.1 to be used.

The release will be downloaded from the SOS web site if the -Tarball parameter is not used.

Required?false
Position?54
Default value
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

...

-Tarball <String>
Optionally specifies the path to a .zip or .tar.gz file that holds the JOC Cockpit installation files.
If this parameter is not used the installer tarball will be downloaded from the SOS web site for the release indicated with the -Release parameter.

Users can check if the connection to a specific URL is bypassed or is using a proxy with a command such as:
([System.Net.WebRequest]::GetSystemWebproxy()).IsBypassed("https://download.sos-berlin.com")

For use with PowerShell 7 users can specify environment variables to perform download using a proxy:

* HTTP_PROXY - proxy for HTTP requests
* HTTPS_PROXY - proxy for HTTPS requests
* ALL_PROXY - proxy for both HTTP and HTTPS
* NO_PROXY - proxy exclusion address list

Required?false
Position?65
Default value
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

...

-Patch <String>
A patch is identified by an issue key and a specific release a patch key, see -PatchKey parameter, and by an issue key in the SOS Change Management System.

For example the -Patch JS-1984 -PatchKey API-1 -Release 2.2.3 parameters will download an (empty) sample patch from the SOS web site
for the respective operating system that the the cmdlet is operated for:
*
For Unix and Windows the download file is https://download.sos-berlin.com/JobSchedulerpatches/2.2.23-patch/js7_joc_linux.2.2.3-PATCH.API-1.JS-1984.tar.gz
* For windows the downloaded file is https://download.sos-berlin.com/JobScheduler.2.2/js7_joc_windows.2.2.3.JS-1984.zip
Patches can be individually downloaded and can be made available from the -Tarball parameter.
For example the -Patch JS-1984 -
Patches can be individually downloaded and can be made available from the -Tarball parameter.

For example the -Patch JS-1984 -PatchKey API-1 -Tarball /tmp/js7_joc_windows.2.2.3-PATCH.API-1.JS-1984.tar.zip gz parameters will apply the patch from the downloaded file.

Patches are applied to the JOC Cockpit's <data>/webapps/joc/available for the JOC Cockpit API and GUI:

* API patches make use of the -PatchKey API-<sequence> parameter and are applied to the JOC Cockpit's <data>/webapps/joc/WEB-INF/classes directory.
* GUI patches make use of the -PatchKey GUI-<sequence> parameter and are applied to the JOC Cockpit's <data>/webapps/joc directory and sub-directories.

Patches with a higher sequene number include any patches with a lower sequence number.

Note that patches will be removed when updating the JOC Cockpit installation.
To apply patches JOC Cockpit has to be restarted. The -Restart or -ExecStart, -ExecStop parameters can be used for automated restart.

Required?false
Position?76
Default value
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

...

PatchKey

-Jar <String>
Opetionally specifies the path to a .jar file that holds a patch.
The patch .jar file is copied to the JOC Cockpit's <data>/webapps/joc/WEB-INF/classes directoryPatchKey <String>
A patch is identified by it's patch key which is specified from [API|GUI]-<sequence>, for example API-1, API-2, GUI-3:

* API specifies a patch that is applicable to the JS7 - REST Web Service API.
* GUI specifies a patch that is applicable to the user JS7 - Browser User Interface.
* <sequence>: specifies the running number of a patch per API or GUI. Patches with higher running numbers include any patches with lower running numbers.

Required?false
Position?87
Default value
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

...

PatchJar

-User PatchJar <String>
Opetionally specifies the path to a .jar file that holds a patch.

The patch .jar file has to be downloaded individually and will be copied to the JOC Cockpit's <data>/webapps/joc/WEB-INF/classes directory.

Required?false
Position?8
Default value
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

User

-User <String>
Specifies the user account for the JOC Cockpit daemon in Unix environments.
Specifies the user account for the JOC Cockpit daemon in Unix environments.
By default the account of the user running the JOC Cockpit Installation Script is used.

For Windows the -User parameter is informative. The -ServiceCredentials parameter can be used to specify credentials for the Windows Service account
that the JOC Cockpit is operated for.

...

-ResponseDir <String>
Specifies a directory that holds files related to the installation of JOC Cockpit.
The files will be copied to the directory indicated with the -SetupDir parameter.

This option is preferably used if an individual version of the joc_install.xml response file should be applied.
In addition, DBMS JDBC Driver files (*.jar), DBMS Hibernate configuration file and license key file files can be used from this directory
if indicated specified with the joc_install.xml response file.

...

-BackupDir <String>
If a backup directory is specified then an the JOC Cockpit's existing installation directory home and data directories will be added to a backup file files in this directory.
The backup file type will be is .tar.gz for Unix and .zip for Windows.

File names are created according to the pattern:

* backup_js7_joc.<hostname>.<release>.home.<yyyy>-<MM>-<dd>T<hh>-<mm>-<ss>.tar.gz|.zip.tar.gz
* backup_js7_joc.<hostname>.<release>.data.<yyyy>-<MM>-<dd>T<hh>-<mm>-<ss>.tar.gz|.tar.gz

For example: backup_js7_joc.centostest_primary.2.3.1.home.2022-03-19T20-50-45.tar.gz

...

ServiceName

-ServiceName <String>
For Unix environments specifies the name of the systemd service that will be created if the -MakeService switch is used.
By default the service name js7_joc will be used.
For Windows the service name is not specified, instead the service name js7_joc will be used.
Optionally a suffix to the service name can be added with the -ServiceNameSuffix parameter
For Unix environments specifies the name of the systemd service that will be created if the -MakeService switch is used.
By default the service name js7_joc will be used.

For Windows the service name is not specified, instead the service name js7_joc will be used.
Optionally a suffix to the service name can be added with the -ServiceNameSuffix parameter.

Required?false
Position?38
Default value
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

ServiceNameSuffix

-ServiceNameSuffix <String>
For Windows environments the Windows service name is not specified. Instead the service name js7_joc will be used.

The parameter optionally specifies a suffix that is appended the Windows service name.

Required?false
Position?39
Default value
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

ServiceCredentials

-ServiceCredentials <PSCredential>
In Windows environments the credentials for the Windows service account can be specified for which the JOC Cockpit should be operated.

A credentials object can be created in a number of ways, for example:

$cred = ( New-Object -typename System.Management.Automation.PSCredential -ArgumentList '.\sos', ( 'secret' | ConvertTo-SecureString -AsPlainText -Force) )

The first argument '.\sos' specifies the user account, the second argument 'secret' specifies the password of the Windows Service account.
Consider that the user account is specified from a local account using the .\ prefix or from a domain account using account@domain.

Required?false
Position?3840
Default value
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

...

ServiceStartMode

-ServiceNameSuffix ServiceStartMode <String>
For Windows environments the Windows service name is not specified. Instead the service name js7_joc will be used.
The parameter optionally specifies a suffix that is appended the Windows service nameenvironemnts one of the following start modes can be set when used with the -ServiceCredentials parameter:

* System
* Automatic
* Manual
* Disabled

By default automatic start is used.

Required?false
Position?3941
Default valueAutomatic
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

ServiceCredentials

...

wildcard characters?false

ServiceDisplayName

-ServiceDisplayName <String>
For Windows environments allows to specify the display name of the JOC Cockpit's Windows Service.

Required?false
Position?4042
Default value
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

...

AsUser

-ServiceStartMode <String>
For Windows environemnts one of the following start modes can be set when used AsUser <SwitchParameter>
Performs the installation for the user account specified with the -ServiceCredentials User parameter:
* System
* Automatic
* Manual
* Disabled
By default automatic start is used.
Without this switch the installation is performend with administrative privileges.

Required?false
Position?41named
Default valueAutomaticFalse
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

ServiceDisplayName

PreserveEnv

-PreserveEnv <SwitchParameter>
In Unix environments if the -AsUser parameter is not used then 'sudo' will be used to switch to the root account for installation
of files in the <home> directory. The switch specifies if environment variables such as JAVA_HOME that are available with the
current user account will be preserved and forwarded to the 'sudo' session-ServiceDisplayName <String>
For Windows environments allows to specify the display name of the JOC Cockpit's Windows Service.

Required?false
Position?42named
Default valueFalse
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

...

AsApiServer

-AsUser <SwitchParameter>
Performs the installation for the user account specified with the -User parameter.
Without this switch the installation is performend with administrative privilegesAsApiServer <SwitchParameter>
Installs JOC Cockpit for use as an API Server instance without user interface.
Users cannot login to the JOC Cockpit instance as it is used for API requests from jobs and REST Clients only.

Any number of API Servers instances can be operated in parallel, the instances are not subject to clustering.

Required?false
Position?named
Default valueFalse
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

...

NoConfig

-PreserveEnv <SwitchParameter>
In Unix environments if the -AsUser parameter is not used then 'sudo' will be used to switch to the root account for installation
of files in the <home> directory. The switch specifies if environment variables such as JAVA_HOME that are available with the
current user account will be preserved and forwarded to the 'sudo' sessionNoConfig <SwitchParameter>
Specifies that no configuration changes will be applied. This switch can be used for example if JOC Cockpit should be started or stopped only,
using the -Restart or -ExecStart, -ExecStop arguments.

Required?false
Position?named
Default valueFalse
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

...

-------------------------- EXAMPLE BEISPIEL 1 --------------------------

PS C:\> Install-JS7Joc.ps1 -HomeDir "C:\Program Files\sos-berlin.com\js7\joc" -Data "C:\ProgramData\sos-berlin.com\js7\joc" -Release 2.5.1 -HttpPort 4446 -MakeDirs

...

-------------------------- EXAMPLE BEISPIEL 2 --------------------------

PS C:\> Install-JS7Joc.ps1 -HomeDir "C:\Program Files\sos-berlin.com\js7\joc" -Data "C:\ProgramData\sos-berlin.com\js7\joc" -Tarball /tmp/js7_joc_windows.2.5.1.zip -BackupDir /tmp/backups -LogDir /tmp/logs -HttpPort 4446 -MakeDirs

...

-------------------------- EXAMPLE BEISPIEL 3 --------------------------

PS C:\> Install-JS7Joc.ps1 -HomeDir "C:\Program Files\sos-berlin.com\js7\joc" -Data "C:\ProgramData\sos-berlin.com\js7\joc" -Tarball /tmp/js7_joc_windows.2.5.1.zip -HttpPort localhost:4446 -HttpsPort apmacwin:4446 -JavaHome "C:\Program Files\Java\jdk-11.0.12+7-jre" -JavaOptions "-Xmx512m" -MakeDirs

...