You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Install and Update

Install Agent for Unix

Example 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 the Agent from the indicated tarball
# Operates the Agent for HTTP port 4445 running in the current user account
# Specifies Java from the given location
# Creates the Agent's systemd service

Install Agent for Windows

Install Agent for HTTP Connections

Example 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

# Installs the Agent from the indicated .zip archive
# Creates the Agent's Windows Service for the local account ".\sos" using the password "sos"
# There are alternative ways how to avoid passwords from being specified in plain text
# Stops the Agent's Windows Service before installation and starts the service after installation

Install Agent for HTTPS Connections

Example 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 44453 `
    -PrivateConf "C:\js7\templates\private.conf-template-agent" `
    -ControllerPrimaryCert "C:\js7\certs\wintest-primary-controller.crt" `
    -Keystore "C:\js7\keys\https-keystore.pfx" `
    -KeystorePassword "jobscheduler" `
    -KeyAlias "wintest-primary-agent" ` 
    -Truststore "C:\js7\certs\https-truststore.pfx" `
    -TruststorePassword "jobscheduler" ` 
    -ExecStart StartService `
    -ExecStop StopService `
    -MakeService `
    -MakeDirs

# Install the Agent from the indicated tarball
# Limits the HTTP port to the localhost network interface, make the HTTPS port available for any network interfaces
# Applies a template file for SSL/TLS related settings that is automatically updated from arguments to the installation script
# Specifies 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

Patch Agent from Download

Example 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

# Patches the Agent by downloading the indicated patch for the given release from the SOS Web Site
# Restarts the systemd service

Patch Agent from Tarball

Example 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

# Patches the Agent from a previously downloaded patch tarball
# Restarts the systemd service

Patch Agent for Windows

Patch Agent from Download

Example 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

# Patches the Agent by downloading the indicated patch for the given release from the SOS Web Site
# Restarts the Agent's Windows Service to apply the patch

Patch Agent from .zip Archive

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

# Patches the Agent using the previously downloaded .zip archive
# Restarts the Agent's Windows Service to apply the patch

Uninstall

Uninstall Agent for Linux

Example 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

# Uninstalls the Agent using systemd to stop the Agent service
# Removes the systemd service
# Removes the home directory and data directory

Uninstall Agent for Windows

Example 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 the Agent waiting for a maximum of 10s for the Agent to terminate before aborting the Agent
# Stops and removes the Agent's Windows Service
# Removes the home directory and data directory
  • No labels