Versions Compared

Key

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

...

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

./Install-JS7Agent.ps1 `
    -HomeDir /opt/sos-berlin.com/js7/agent `
    -Data /var/sos-berlin.com/js7/agent `
    -Tarball /mnt/releases/scheduler_setups/current/js7_agent_unix.2.5.2.tar.gz `
    -HttpPort 4445 `
    -ExecStart StartService `
    -ExecStop StopService `
    -MakeService `
    -JavaHome "/opt/java/jdk-11.0.2+9" `
    -MakeDirs

# Installs Installthe Agent andfrom createthe systemdindicated servicetarball
# Specify JavaOperates from the givenAgent location
#for TheHTTP Agent'sport Windows4445 Servicerunning isin createdthe forcurrent the systemuser account
# TheSpecifies Agent'sJava Windowsfrom Servicethe isgiven stoppedlocation
# andCreates isthe startedAgent's before and after installationsystemd service

Install Agent for Windows

...

Code Block
languagepowershell
titleExample for use of Installation Script
./Install-JS7Agent.ps1 `
    -HomeDir "C:\Program Files\sos-berlin.com\js7\agent" `
    -Data "C:\ProgramData\sos-berlin.com\js7\agent_4445" `
    -Tarball "C:\js7\downloads\js7_agent_windows.2.5.2.zip" `
    -HttpPort 4445 `
    -ExecStart StartService `
    -ExecStop StopService `
    -MakeService `
    -ServiceCredentials ( New-Object -typename System.Management.Automation.PSCredential -ArgumentList '.\sos', ( 'sos' | ConvertTo-SecureString -AsPlainText -Force) ) `
    -MakeDirs

# InstallInstalls the Agent from the indicated .zip tarballarchive
# TheCreates the Agent's Windows Service is created for the local account ".\sos" using the password "sos"
# There are alternative ways how to avoid passwords from being specified in plain text
# TheStops the Agent's Windows Service isbefore stoppedinstallation and isstarts startedthe beforeservice and after installation

Install Agent for HTTPS Connections

Code Block
languagepowershell
titleExample for use of Installation Script
./Install-JS7Agent.ps1 `
    -HomeDir "C:\Program Files\sos-berlin.com\js7\agent" `
    -Data "C:\ProgramData\sos-berlin.com\js7\agent_4445" `
    -Tarball "C:\js7\downloads\js7_agent_windows.2.5.2.zip" `
    -HttpPort localhost:4445 `
    -HttpsPort 444344453 `
    -PrivateConf "C:\js7\templates\private.conf-template-agent" `
    -ControllerPrimaryCert "C:\js7\certs\demo.sos-berlin.comwintest-primary-controller.crt" `
    -Keystore "C:\js7\keys\https-keystore.pfx" `
    -KeystorePassword "jobscheduler" `
    -KeyAlias "centostestwintest-primary-agent" ` 
    -Truststore "C:\js7\certs\https-truststore.pfx" `
    -TruststorePassword "jobscheduler" ` 
    -ExecStart StartService `
    -ExecStop StopService `
    -MakeService `
    -MakeDirs

# Install the Agent from the indicated tarball
# LimitLimits the HTTP port to the localhost network interface, make the HTTPS port available for any network interfaces
# ApplyApplies a template file for SSL/TLS related settings that is automatically updated from arguments to the installation script
# UseSpecifies the server certificate location of the Controller to which the Agent is dedicated
# Makes use of a keystore in PKCS12 format with the given alias name and password and a truststore respectively


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

Patch

Patch Agent for Linux

...

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

./Install-JS7Agent.ps1 `
    -HomeDir /opt/sos-berlin.com/js7/agent `
    -HttpPort 4445 `
    -Release 2.2.3 `
    -Patch JS-1984 `
    -Restart

# PatchPatches the Agent by downloading the indicated Patch patch for the given release from the SOS Web Site
# Restarts Thethe systemd service is restarted

Patch Agent from Tarball

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

./Install-JS7Agent.ps1 `
    -HomeDir /opt/sos-berlin.com/js7/agent `
    -HttpPort 4445 `
    -Tarball  /tmp/js7_agent_unix.2.2.3.JS-1984.tar.gz  `
    -Patch JS-1984 `
    -Restart

# PatchPatches the Agent from a previously downloaded patch archivetarball
# Restarts Thethe systemd service is restarted

Patch Agent for Windows

Patch Agent from Download

Code Block
languagepowershell
titleExample for use of Installation Script
./Install-JS7Agent.ps1 `
    -HomeDir "C:\Program Files\sos-berlin.com\js7\agent" `
    -HttpPort 4445 `
    -Release 2.2.3 `
    -Patch JS-1984 `
    -Restart

# PatchPatches the Agent by downloading the indicated Patch patch for the given release from the SOS Web Site
# Restarts Thethe Agent's Windows Service is restarted to apply the patch

Patch Agent from .zip Archive

Code Block
languagepowershell
titleExample for use of Installation Script
./Install-JS7Agent.ps1 `
    -HomeDir "C:\Program Files\sos-berlin.com\js7\agent" `
    -HttpPort 4445 `
    -Tarball "C:/tmp/js7_agent_windows.2.2.3.JS-1984.zip" `
    -Patch JS-1984 `
    -Restart

# Patches Patchthe Agent using the previously downloaded .zip archive
# TheRestarts the Agent's Windows Service is restarted to apply the patch

Uninstall

...

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

./Install-JS7Agent.ps1 `
    -HomeDir "/opt/sos-berlin.com/js7/agent" `
    -Data "/var/sos-berlin.com/js7/agent" `
    -HttpPort 4445 `
    -ExecStop "StopService" `
    -Uninstall

# UninstallUninstalls the Agent using systemd to stop the Agent service
# Removes Thethe systemd service
# isRemoves removed
#the Homehome directory and data directory are removed during uninstallation

Uninstall Agent for Windows

Code Block
languagepowershell
titleExample for use of Installation Script
./Install-JS7Agent.ps1 `
    -HomeDir "C:\Program Files\sos-berlin.com\js7\agent" `
    -Data "C:\ProgramData\sos-berlin.com\js7\agent_4445" `
    -HttpPort 4445 `
    -StopTimeout 10 `
    -Uninstall

# Uninstalls Uninstallthe Agent waiting for a maximum of 10s for the Agent to terminate before aborting the Agent.
# The Stops and removes the Agent's Windows Service
# isRemoves stopped and removed
# Homethe home directory and data directory are removed during uninstallation