Name

Install-JS7Joc.ps1

SYNOPSIS

Installs, updates, patches or uninstalls the JS7 JOC Cockpit on Windows and Unix platforms supporting PowerShell 5.1, 6, 7

SYNTAX

Install-JS7Joc.ps1 [[-HomeDir] <String>] [[-Data] <String>] [[-InstanceId] <Int32>] [[-Release] <String>] [[-Tarball] <String>] [[-Patch] <String>] [[-PatchKey] <String>] [[-PatchJar] <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>]

DESCRIPTION

The JOC Cockpit Installation Script can be used to automate installing, updating, patching and uninstalling JOC Cockpit.

The script offers the installation options and configuration options available from the JOC Cockpit's graphical installer.

For download see https://kb.sos-berlin.com/display/JS7/JS7+-+Download

PARAMETERS

HomeDir

-HomeDir <String>
Specifies the directory in which the JOC Cockpit should be installed.

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

Data

-Data <String>
Specifies the directory in which JOC Cockpit data such as configuration files should be stored.
By default the <home>/jetty_base directory is used.

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

InstanceId

-InstanceId <Int32>
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?3
Default value0
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

Release

-Release <String>
Specifies a 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?4
Default value
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

Tarball

-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?5
Default value
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

Patch

-Patch <String>
A patch is identified by 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 Unix and Windows the download file is https://download.sos-berlin.com/patches/2.2.3-patch/js7_joc.2.2.3-PATCH.API-1.JS-1984.tar.gz

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.2.2.3-PATCH.API-1.JS-1984.tar.gz parameters will apply the patch from the downloaded file.

Patches are 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?6
Default value
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

PatchKey

-PatchKey <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?7
Default value
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

PatchJar

-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.
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.

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

SetupDir

-SetupDir <String>
Specifies the directory to which the JOC Cockpit installation archive (*.tar.gz, *.zip) will be extracted.
Users can specify a directory, otherwise a temporary directory is created if the -MakeDirs switch is present.

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

ResponseDir

-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 files can be used from this directory
if specified with the joc_install.xml response file.

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

LicenseKey

-LicenseKey <String>
Specifies the path to a license key file (*.pem, *.crt) for use with a commercial license.
A license key file is required should JS7 cluster operations for JOC Cockpit, Controller or Agents be used.

The license key file activates the licensed binary code that implements cluster operations, see -LicenseBin parameter.

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

LicenseBin

-LicenseBin <String>
Specifies the path to a license binary file (*.jar) that implements cluster operations.

Use of licensed binary code is activated by a license key file, see -LicenseKey.

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

BackupDir

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

File names are created according to the pattern:

* backup_js7_joc.<hostname>.<release>.home.<yyyy>-<MM>-<dd>T<hh>-<mm>-<ss>.tar.gz|.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

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

LogDir

-LogDir <String>
If a log directory is specified then the Installation Script will log information about processing steps to a log file in this directory.
File names are created according to the pattern: install_js7_joc.<hostname>.<yyyy>-<MM>-<dd>T<hh>-<mm>-<ss>.log
For example: install_js7_joc.centostest_primary.2022-03-19T20-50-45.log

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

ExecStart

-ExecStart <String>
This parameter can be used should the JOC Cockpit be started after installation.
For example, when using systemd for Unix or using a Windows Service then the -ExecStart "StartService" parameter value
will start the JOC Cockpit service provided that the underlying service has been created manually or by use of the -MakeService switch.

For Unix users can specify individual commands, for example -ExecStart "sudo systemctl start js7_joc".

For Unix systemd service files see the 'JS7 - systemd Service Files for automated Startup and Shutdown with Unix Systems' article.
This parameter is an alternative to use of the -Restart switch which will start the JOC Cockpit from its Instance Start Script.
If specified this parameter overrules the -Restart switch.

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

ExecStop

-ExecStop <String>
This parameter can be used should the JOC Cockpit be stopped before installation.
For example, when using Unix systemd or Windows Services then the -ExecStop "StopService" parameter value
will stop the JOC Cockpit service provided that the underlying service has been created manually or by use of the -MakeService switch.

For Unix users can specify individual commands, for example -ExecStop "sudo systemctl stop js7_joc".
This parameter is an alternative to use of the -Restart switch which stops the JOC Cockpit from its Instance Start Script.
If specified this parameter overrules the -Restart switch.

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

ReturnValues

-ReturnValues <String>
Optionally specifies the path to a file to which return values will be added in the format <name>=<key>. For example:

log_file=install_js7_joc.centostest_primary.2022-03-20T04-54-31.log
backup_file=backup_js7_joc.centostest_primary.2.3.1.2022-03-20T04-54-31.tar.gz

An existing file will be overwritten. It is recommended to use a unique file name such as /tmp/return.$PID.properties.
A value from the file can be retrieved like this:

* Unix
** backup=$(cat /tmp/return.$$.properties | grep "backup_file" | cut -d'=' -f2)
* Windows
** $backup = ( Get-Content /tmp/return.$PID.properties | Select-String "^backup_file[ ]*=[ ]*(.*)" ).Matches.Groups[1].value

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

DeployDir

-DeployDir <String[]>
Specifies the path to a deployment directory that holds configuration files and sub-directories that will be copied to the <data>/resources/joc directory.
A deployment directory allows to manage central copies of configuration files such as joc.properties, log4j2.xml etc.

Use of a deployment directory has lower precedence as files can be overwritten by individual parameters such as -Properties etc.

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

Ini

-Ini <String[]>
Specifies an array of *.ini files that will be copied to the <data>/start.d directory.
Typically the following .ini files can be provided:

* http.ini: specifies use of the HTTP module and HTTP Port
* https.ini: specifies use of the HTTPS module and HTTPS Port
* ssl.ini: specifies SSL related settings

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

Properties

-Properties <String>
Specifies the path to a configuration file for global JOC Cockpit configuration items. The file will be copied to the <data>/resources/joc/joc.properties file.

Any path to a file can be used as a value of this parameter, however, the target file name joc.properties will be used.

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

Title

-Title <String>
Specifies the caption of the JOC Cockpit icon in the Dashboard view of the GUI.

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

SecurityLevel

-SecurityLevel <String>
Specifies one of the security levels that are applied to digitally sign scheduling objects such as workflows during deployment:

* low (default): use of a common signing key for all JOC Cockpit user accounts.
* medium: use of an individual signing key per JOC Cockpit user account.
* high: use of an individual signing key per account that is stored outside of JOC Cockpit.

When using the security levels medium or high then users have to manage a Certificate Authority
to create and to sign certificates and have to import certificates to JOC Cockpit.

Required?false
Position?23
Default valuelow
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

DBMSConfig

-DBMSConfig <String[]>
Specifies the path to a hibernate.cfg.xml file that holds credentials and details for the database connection.
Check the 'JS7 - Database' article for details and examples.

When using the H2 DBMS then the shortcut -DBMSConfig 'H2' can be used and no Hibernate configuration file is required.

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

DBMSDriver

-DBMSDriver <String[]>
The JS7 ships with JDBC Drivers for a number of DBMS such as MariaDB, MySQL, Oracle, PostgreSQL.
For other DBMS such as SQL Server and H2 users have to download the JDBC Driver .jar file from the DBMS vendor's site.

See the 'JS7 - Database' article for versions of JDBC Drivers that ship with JS7.

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

DBMSInit

-DBMSInit <String[]>
Specifies the point in time when objects such as tables are created in the database:

* byInstaller (default): at the point in time of installation
* byJoc: on each start-up JOC Cockpit will check if database objects have to be updated
* off: users create database objects from a database client

Required?false
Position?26
Default valuebyInstaller
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

HttpPort

-HttpPort <String>
Specifies the HTTP port that the JOC Cockpit is operated for. The default value is 4446.

The port can be prefixed by the network interface, for example joc.example.com:4446.
When used with the -Restart switch the HTTP port is used to identify if the JOC Cockpit is running.

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

HttpsPort

-HttpsPort <String>
Specifies the HTTPS port that the JOC Cockpit is operated for.

Use of HTTPS requires a keystore and truststore to be present, see -Keystore and -Truststore parameters.
The port can be prefixed by the network interface, for example joc.example.com:4446.

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

Keystore

-Keystore <String>
Specifies the path to a PKCS12 keystore file that holds the private key and certificate for HTTPS connections to the JOC Cockpit.
Users are free to specify any file name, typically the name https-keystore.p12 is used. The keystore file will be copied to the <data>/resources/joc directory.

If a keystore file is made available then the JOC Cockpit's <data>/resources/joc/joc.properties file has to hold a reference to the keystore location and the keystore password.
It is therefore recommended to use the -PrivateConf parameter to deploy an individual private.conf file that holds settings related to a keystore.
For automating the creation of keystores see JS7 - How to add SSL TLS Certificates to Keystore and Truststore.

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

KeystorePassword

-KeystorePassword <SecureString>
Specifies the password for access to the keystore from a secure string. Use of a keystore password is required.

There are a number of ways how to specify secure strings, for example:

-KeystorePassword ( 'secret' | ConvertTo-SecureString -AsPlainText -Force )

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

KeyAlias

-KeyAlias <String>
If a keystore holds more than one private key, for example if separate pairs of private keys/certificates for server authentication and client authentication exist, then it is not determined which private key/certificate will be used.

The alias name of a given private key/certificate is specified when the entry is added to the keystore. The alias name allows to indicate a specific private key/certificate to be used.

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

Truststore

-Truststore <String>
Specifies the path to a PKCS12 truststore file that holds the certificate(s) for HTTPS connections to the JOC Cockpit using mutual authentication .
Users are free to specify any file name, typically the name https-truststore.p12 is used. The truststore file will be copied to the <data>/resources/joc directory.

If a truststore file is made available then the JOC Cockpit's <data>/resources/joc/joc.properties file has to hold a reference to the truststore location and the truststore password.
It is therefore recommended to use the -PrivateConf parameter to deploy an individual private.conf file that holds settings related to a truststore.
For automating the creation of truststores see JS7 - How to add SSL TLS Certificates to Keystore and Truststore.

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

TruststorePassword

-TruststorePassword <SecureString>
Specifies the password for access to the truststore from a secure string.
Use of a password is recommended: it is not primarily intended to protect access to the truststore, but to ensure integrity.
The password is intended to allow verification that truststore entries have been added using the same password.

There are a number of ways how to specify secure strings, for example:

-TruststorePassword ( 'secret' | ConvertTo-SecureString -AsPlainText -Force )

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

JavaHome

-JavaHome <String>
Specifies the Java home directory that will be made available to the JOC Cockpit from the JAVA_HOME environment variable
specified with the JOC Cockpit profile typically available from the $HOME/.jocrc script.

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

JavaOptions

-JavaOptions <String>
Specifies the Java options that will be made available to the JOC Cockpit from the JAVA_OPTIONS environment variable specified with the JOC Cockpit profile typically available from the $HOME/.jocrc script.

Java options can be used for example to specify Java heap space settings for the JOC Cockpit.
If more than one Java option is used then the value has to be quoted, for example -JavaOptions "-Xms256m -Xmx512m".

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

ServiceDir

-ServiceDir <String>
For Unix environments specifies the systemd service directory to which the JOC Cockpit's service file will be copied if the -MakeService switch is used.
By default the /usr/lib/systemd/system directory will be used. Users can specify an alternative location.

Required?false
Position?36
Default value/usr/lib/systemd/system
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

ServiceFile

-ServiceFile <String>
For Unix environments specifies the path to a systemd service file that acts as a template and that will be copied to the JOC Cockpit's <home>/jetty/bin directory.
Users are free to choose any file name as a template for the service file. The resulting service file name will be joc.service.
The Installation Script will perform replacements in the service file to update paths and the port to be used, for details see ./bin/jetty.service-example.

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

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.

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?40
Default value
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

ServiceStartMode

-ServiceStartMode <String>
For Windows environemnts 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?41
Default valueAutomatic
Accept pipeline input?true (ByPropertyName)
Accept 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?42
Default value
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

AsUser

-AsUser <SwitchParameter>
Performs the installation for the user account specified with the -User parameter.
Without this switch the installation is performend with administrative privileges.

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

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.

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

AsApiServer

-AsApiServer <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

-NoConfig <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

NoInstall

-NoInstall <SwitchParameter>
Specifies if the Installation Script should be used to update configuration items without changes to the binary files of the installation.
In fact no installation is performed but configuration changes as for example specified with the -Keystore parameter will be applied.

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

NoJetty

-NoJetty <SwitchParameter>
Specifies that JOC Cockpit will be installed without the Jetty Servlet Container.
This option is applicable if users prefer to use an alternative Servlet Container.

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

Uninstall

-Uninstall <SwitchParameter>
Uninstalls JOC Cockpit including the steps to stop and remove a running JOC Cockpit service and to remove the <home> and <data> directories.

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

ShowLogs

-ShowLogs <SwitchParameter>
Displays the log output created by the Installation Script if the -LogDir parameter is used.

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

MakeDirs

-MakeDirs <SwitchParameter>
If directories are missing that are indicated with the -HomeDir, -SetupDir, -BackupDir or -LogDir parameters then they will be created.

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

MakeService

-MakeService <SwitchParameter>
Specifies that for Unix environments a systemd service should be created, for Windows environments a Windows Service should be created.
In Unix environments the service name will be created from the -ServiceName parameter value or from its default value.

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

Restart

-Restart <SwitchParameter>
Stops a running JOC Cockpit before installation and starts the JOC Cockpit after installation using the JOC Cockpit's Instance Start Script.
This switch can be used with the-Kill switch to control the way how the JOC Cockpit is terminated.
This switch is ignored if the -ExecStart or -ExecStop parameters are used.

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

Kill

-Kill <SwitchParameter>
Kills a running JOC Cockpit and any running tasks if used with the -Restart switch.
This includes killing child processes of running tasks.

Killing a JOC Cockpit prevents journal files from being closed in an orderly manner.

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

WhatIf

-WhatIf <SwitchParameter>

Required?false
Position?named
Default value
Accept pipeline input?false
Accept wildcard characters?false

Confirm

-Confirm <SwitchParameter>

Required?false
Position?named
Default value
Accept pipeline input?false
Accept wildcard characters?false

EXAMPLES

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

Downloads and installs the JOC Cockpit release to the indicated location.

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

Applies the JOC Cockpit release from a tarball and installs to the indicated locations. A backup is taken and log files are created.

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

Applies the JOC Cockpit release from a tarball and installs to the indicated locations. HTTP and HTTP port are the same using different network interfaces. The location of Java and Java Options are indicated.

  • No labels