Versions Compared

Key

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

...

Install or Update

Install Agent for Unix

...

Code Block
languagepowershell
titleExample for use of Installation Script
./Install-JS7Agent.ps1 `
    -Release 2.5.2 `
    -HomeDir /opt/sos-berlin.com/js7/agent `
    -Data /var/sos-berlin.com/js7/agent `
    -HttpPort 4445 `
    -MakeDirs

# downloads the release tarball from the SOS Web Site  
# suggests use of separate home and data directories for configuration data, log data etc.
# creates the home and data directories if they do not exist
# extracts the tarball to the Agent's home directory
# populates the data directory from initial configuration files
# operates the Agent for HTTP port 4445

Install or Update

...

parallel Agent

Code Block
languagepowershell
titleExample for use of Installation Script
./Install-JS7Agent.ps1 `
    -HomeDir /opt/sos-berlin.com/js7/agent `
    -Data /var/sos-berlin.com/js7/agent_44445 `
    -HttpPort 44445 `
    -MakeDirs `
    -UseInstall

# makes use of an existing Agent installation in the home directory
# creates the data directory if it does not exist
# populates the data directory from initial configuration files
# operates the Agent for HTTP port 44445

...

Code Block
languagepowershell
titleExample for use of Installation Script
Invoke-WebRequest `
    -Uri 'https://download.sos-berlin.com/JobScheduler.2.5/js7_agent_unix.2.5.2.tar.gz' `
    -Outfile /tmp/js7_agent_unix.2.5.2.tar.gz

./Install-JS7Agent.ps1 `
    -Tarball /tmp/js7_agent_unix.2.5.2.tar.gz `
    -HomeDir /home/sos/agent `
    -HttpPort 4445 `
    -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 Agent's home directory
# specifies the Java version and Java options to be used
# stops and starts the Agent from its instance start script <home>/bin/agent_4445.sh
# operates the Agent for HTTP port 4445

...

Code Block
languagepowershell
titleExample for use of Installation Script
Invoke-WebRequest `
    -Uri 'https://download.sos-berlin.com/JobScheduler.2.5/js7_agent_unix.2.5.2.tar.gz' `
    -Outfile /tmp/js7_agent_unix.2.5.2.tar.gz

./Install-JS7Agent.ps1 `
    -Tarball /tmp/js7_agent_unix.2.5.2.tar.gz `
    -HomeDir /home/sos/agent `
    -ControllerId controller `
    -HttpPort localhost:4445 `
    -HttpsPort batch.example.com:4445 `
    -PrivateConf /home/sos/agent-deployment/private.conf-template-agent `
    -ControllerPrimaryCert /home/sos/agent-deployment/centostest-primary.crt `
    -ControllerSecondaryCert /home/sos/agent-deployment/centostest-secondary.crt `
    -Keystore /home/sos/agent-deployment/https-keystore.p12 `
    -KeystorePassword ('jobscheduler' | ConvertTo-SecureString -AsPlainText -Force) `
    -Truststore /home/sos/agent-deployment/https-truststore.p12 `
    -TruststorePassword ('jobscheduler' | ConvertTo-SecureString -AsPlainText -Force) ` 
    -ExecStart StartService `
    -ExecStop StopService `
    -MakeService `
    -MakeDirs

# downloads the release tarball from the SOS Web Site using Invoke-WebRequest
# extracts the tarball to the Agent's home directory
# specifies the Controller ID of the Controller to which the Agent is dedicated
# specifies HTTP port 4445 on the localhost network interface and the same HTTPS port on the server network interface
# specifies the paths to the Primary and Secondary Controller's server certificates if a Controller Cluster is used
#     for a Standalone Controller the -ControllerSecondaryCert argument is omitted
# deploys the Agent private configuration file which holds references to keystore and truststore
# deploys keystore and truststore files
# stops and starts the Agent's systemd service

...

  • For details about certificates and HTTPS connections see JS7 - Agent HTTPS Connections.
  • The private.conf configuration file holds references to the Controller's certificate in order to verify the connection from the Controller using HTTPS mutual authentication.
  • Users have a choice how to provide the required configuration:
    • The Download the private.conf-template-agent template, the Agent Installation Script performs replacements of placeholders in the private.conf configuration template file from option argument values, for details see chapter Replacements.
    • Users can manually adjust configuration items in the private.conf file that they specify for the Agent Installation Script., see JS7 - Controller Agent Configuration Items.

Renew Certificates for HTTPS Connections

Code Block
languagepowershell
titleExample for use of Installation Script
./Install-JS7Agent.ps1 `
    -HomeDir /home/sos/agent `
    -ControllerId controller `
    -HttpPort localhost:4445 `
    -HttpsPort batch.example.com:4445 `
    -PrivateConf /home/sos/agent-deployment/private.conf-template-agent `
    -ControllerPrimaryCert /home/sos/agent-deployment/centostest-primary.crt `
    -ControllerSecondaryCert /home/sos/agent-deployment/centostest-secondary.crt `
    -Keystore /home/sos/agent-deployment/https-keystore.p12 `
    -KeystorePassword ('jobscheduler' | ConvertTo-SecureString -AsPlainText -Force) `
    -Truststore /home/sos/agent-deployment/https-truststore.p12 `
    -TruststorePassword ('jobscheduler' | ConvertTo-SecureString -AsPlainText -Force) ` 
    -ExecStart StartService `
    -ExecStop StopService `
    -NoInstall

# performs no installation but certificate renewal only
# specifies the Controller ID of the Controller to which the Agent is dedicated
# addresses an existing Agent operated for HTTP port 4445 on the localhost network interface and the same HTTPS port on the server network interface
# specifies the paths to the Primary and Secondary Controller's server certificates if a Controller Cluster is used
#     for a Standalone Controller the -controller-secondary-cert argument is omitted
# deploys the Agent private configuration file that holds references to keystore and truststore
# deploys keystore and truststore files
# stops and starts the Agent's systemd service

...

Install or Update Primary Director Agent and Apply Certificates for HTTPS Connections

Code Block
languagepowershell
titleExample for use of Installation Script
./Install-JS7Agent.ps1Invoke-WebRequest `
    -HomeDirUri 'https:/home/download.sos-berlin.com/JobScheduler.2.6/js7_agent_unix.2.6.0.tar.gz' `
    -HttpPort 4445 `
    -ExecStart StartService `
    -ExecStop StopService Outfile /tmp/js7_agent_unix.2.6.0.tar.gz
 Invoke-WebRequest `
    -NoInstall

# stops the Agent's systemd service should the Agent be running
# starts the Agent's systemd service

Stop Agent Service

Code Block
languagepowershell
titleExample for use of Installation Script
Uri 'https://download.sos-berlin.com/JobScheduler.2.6/js7-license.jar' `
    -Outfile /tmp/js7-license.jar
 
./Install-JS7Agent.ps1 `
    -HomeDirTarball /hometmp/sos/agentjs7_agent_unix.2.6.0.tar.gz `
      -HttpPort 4445HomeDir /home/sos/agent `
      -ExecStartControllerId StartServicecontroller `
    -NoInstall

# stops the Agent's systemd service should the Agent be running

Install Agent for Windows

Install or Update from Download

Code Block
languagepowershell
titleExample for use of Installation Script
./Install-JS7Agent.ps1 AgentClusterId agent-cluster `
    -HttpPort localhost:4445 `
    -ReleaseHttpsPort 2batch.5example.2com:4445 `
     -HomeDir "C:\Program Files\sos-berlin.com\js7\agent"LicenseKey /home/sos/agent-deployment/example.pem `
    -Data "C:\ProgramData\sos-berlin.com\js7\agent_4445"License-bin /tmp/js7-license.jar `
    -HttpPort 4445PrivateConf /home/sos/agent-deployment/private.conf-template-agent `
    -MakeDirs

# downloads the release tarball from the SOS Web Site
# creates the home and data directories if they doe not exist
# extracts the tarball to the Agent's home directory
# operates the Agent for HTTP port 4445

Install or Update from .zip Archive

Code Block
languagepowershell
titleExample for use of Installation Script
Invoke-WebRequestControllerPrimaryCert /home/sos/agent-deployment/centostest-primary.crt `
    -ControllerSecondaryCert /home/sos/agent-deployment/centostest-secondary.crt `
    -DirectorPrimaryCert /home/sos/agent-deployment/centostest-primary.crt `
    -DirectorSecondaryCert /home/sos/agent-deployment/centostest-secondary.crt `
    -Keystore /home/sos/agent-deployment/https-keystore.p12 `
    -KeystorePassword ('jobscheduler' | ConvertTo-SecureString -AsPlainText -Force) `
     -UriTruststore 'https:/home/download.sos/agent-berlin.com/JobScheduler.2.5/js7_agent_windows.2.5.2.zip' `
    -Outfile C:\tmp\js7_agent_windows.2.5.2.zip

./Install-JS7Agent.ps1deployment/https-truststore.p12 `
    -TruststorePassword ('jobscheduler' | ConvertTo-SecureString -AsPlainText -Force) ` 
    -ExecStart StartService `
    -Tarball C:\tmp\js7_agent_windows.2.5.2.zipExecStop StopService `
    -HomeDir "C:\Program Files\sos-berlin.com\js7\agent" `
    -Data "C:\ProgramData\sos-berlin.com\js7\agent_4445" `
    -HttpPort 4445 MakeService `
    -Active `
    -MakeDirs

# downloads the release tarball from the SOS Web Site using Invoke-WebRequest
# createsdownloads the home directory if it does not existbinary file for licensed code to enable cluster operations
# extracts the release tarball to the Agent's home directory
# specifies the Controller ID of the Controller to which the Agent is dedicated
# operatesspecifies the Agent for Cluster ID
# specifies HTTP port 4445

Install or Update side-by-side Agent

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_44445" `
    -HttpPort 44445 `
    -MakeDirs `
    -UseInstall

# makes use of an existing Agent installation in the home directory
# creates the data directory if it does not exist
# populates the data directory from initial configuration files
# operates the Agent for HTTP port 44445

Install or Update and Stop/Start using Windows Service

Code Block
languagepowershell
titleExample for use of Installation Script
Invoke-WebRequest `
    -Uri 'https://download.sos-berlin.com/JobScheduler.2.5/js7_agent_windows.2.5.2.zip' `
    -Outfile C:\tmp\js7_agent_windows.2.5.2.zip

./Install-JS7Agent.ps1 `
    -Tarball C:\tmp\js7_agent_windows.2.5.2.tar.gz `
    -HomeDir "C:\Program Files\sos-berlin.com\js7\agent" `
    -Data "C:\ProgramData\sos-berlin.com\js7\agent_4445" `
    -HttpPort 4445 `
    -ExecStart StartService `
    -ExecStop StopService `
    -MakeService `
    -MakeDirs

# downloads the release tarball from the SOS Web Site using Invoke-WebRequest
# extracts the tarball to the Agent's home directory
# creates the Agent's Windows service
# stops and starts the Agent's Windows service
# operates the Agent for HTTP port 4445

...

 on the localhost network interface and the same HTTPS port on the server network interface
# specifies the paths to the Primary and Secondary Controller's server certificates if a Controller Cluster is used
#     for a Standalone Controller the --controller-secondary-cert argument is omitted
# specifies the paths to the Primary and Secondary Director Agent's server certificates if an Agent Cluster is used
#     for a Standalone Director Agent the -DirectorSecondaryCert argument is omitted
# deploys the Agent private configuration file which holds references to keystore and truststore
# deploys keystore and truststore files
# makes the Agent the active Director Agent in an Agent Cluster
# stops and starts the Agent's systemd service

Note:

  • For details about certificates and HTTPS connections see JS7 - Agent HTTPS Connections.
  • The private.conf configuration file holds references to the Controller's certificate in order to verify the connection from the Controller using HTTPS mutual authentication.
  • Users have a choice how to provide the required configuration:
    • Download the private.conf-template-agent template, the Agent Installation Script performs replacements of placeholders in the template file from argument values, for details see chapter Replacements.
    • Users can manually adjust configuration items in the private.conf file that they specify for the Agent Installation Script., see JS7 - Agent Configuration Items.

Install or Update Secondary Director Agent and Apply Certificates for HTTPS Connections

Code Block
languagepowershell
titleExample for use of Installation Script
Invoke-WebRequest `
    -Uri 'https://download.sos-berlin.com/JobScheduler.2.56/js7_agent_windowsunix.2.6.50.2tar.zipgz' `
    -Outfile C:\/tmp\/js7_agent_windowsunix.2.5.2.zip
.6.0.tar.gz
 Invoke-WebRequest `
    -Uri 'https://download.sos-berlin.com/JobScheduler.2.6/js7-license.jar' `
    -Outfile /tmp/js7-license.jar
 
./Install-JS7Agent.ps1 `
    -Tarball C:\/tmp\/js7_agent_windowsunix.2.56.20.tar.gz `
     -HomeDir "C:\Program Files\sos-berlin.com\js7\agent"/home/sos/agent `
    -ControllerId controller `
    -Data "C:\ProgramData\sos-berlin.com\js7\agent_4445"AgentClusterId agent-cluster `
    -HttpPort localhost:4445 `
    -ServiceCredentials ( New-Object -typename System.Management.Automation.PSCredentialHttpsPort batch.example.com:4445 `
    -LicenseKey /home/sos/agent-deployment/example.pem `
    -License-bin /tmp/js7-license.jar `
    -PrivateConf /home/sos/agent-deployment/private.conf-template-agent `
    -ControllerPrimaryCert /home/sos/agent-deployment/centostest-primary.crt `
        -ArgumentList '.\sos', ( 'secret' | ConvertTo-SecureString -AsPlainText -Force) ) `
    -MakeService-ControllerSecondaryCert /home/sos/agent-deployment/centostest-secondary.crt `
    -DirectorPrimaryCert /home/sos/agent-deployment/centostest-primary.crt `
    -DirectorSecondaryCert /home/sos/agent-deployment/centostest-secondary.crt `
    -Keystore -ExecStart StartService/home/sos/agent-deployment/https-keystore.p12 `
    -ExecStop StopService `
KeystorePassword ('jobscheduler' | ConvertTo-SecureString -AsPlainText -Force) `
    -Truststore -MakeDirs

# downloads the release tarball from the SOS Web Site using Invoke-WebRequest
# extracts the tarball to the Agent's home directory
# creates the Agent's Windows service  that is running in the local account '.\sos' using the password 'secret' 
#    credentials can be specified in a number of ways
# stops and starts the Agent's Windows service
# operates the Agent for HTTP port 4445

...

/home/sos/agent-deployment/https-truststore.p12 `
    -TruststorePassword ('jobscheduler' | ConvertTo-SecureString -AsPlainText -Force) ` 
    -ExecStart StartService `
    -ExecStop StopService `
    -MakeService `
    -Standby `
    -MakeDirs

# parameterization is the same as from the previous example for a Primary Director Agent
# the one exception being use of the -Standby switch for a Secondary Director Agent

Start Agent Service

Code Block
languagepowershell
titleExample for use of Installation Script
Invoke-WebRequest./Install-JS7Agent.ps1 `
    -UriHomeDir 'https:/home/download.sos-berlin.com/JobScheduler.2.5/js7_agent_windows.2.5.2.zip'/agent `
    -HttpPort 4445 `
      -Outfile C:\tmp\js7_agent_windows.2.5.2.zip

./Install-JS7Agent.ps1ExecStart StartService `
    -Tarball C:\tmp\js7_agent_windows.2.5.2.tar.gzExecStop StopService `
    -HomeDir "C:\Program Files\sos-berlin.com\js7\agent" `
    -Data "C:\ProgramData\sos-berlin.com\js7\agent_4445"NoInstall

# stops the Agent's systemd service should the Agent be running
# starts the Agent's systemd service

Stop Agent Service

Code Block
languagepowershell
titleExample for use of Installation Script
./Install-JS7Agent.ps1 `
    -HomeDir /home/sos/agent `
      -HttpPort 4445 `
    -ExecStop  -RestartStopService `
    -MakeDirsNoInstall

# downloadsstops the Agent's releasesystemd tarballservice fromshould the SOSAgent Web Site using Invoke-WebRequest
# extracts the tarball to the Agent's home directory
# stops and starts the Agent from its instance start script <home>\bin\agent_4445.cmd
# operates the Agent for HTTP port 4445

...

be running

Install Agent for Windows

Install or Update from Download

Code Block
languagepowershell
titleExample for use of Installation Script
Invoke-WebRequest./Install-JS7Agent.ps1 `
    -Uri 'https://download.sos-berlin.com/JobScheduler.Release 2.5/js7_agent_windows.2.5.2.zip'  `
    -Outfile C:\tmp\js7_agent_windows.2.5.2.zip

./Install-JS7Agent.ps1 `
    -Tarball C:\tmp\js7_agent_windows.2.5.2.zip `
    -HomeDir "C:\Program Files\sos-berlin.com\js7\agent" `
    -Data "C:\ProgramData\sos-berlin.com\js7\agent_4445" `
      -HttpPort 4445 `
    -JavaHome "C:\Program Files\Java\jdk-11.0.2+9" `
    -JavaOptions "-Xmx512m -Xms256m" `
    -Restart `
    -MakeDirs

# downloads the release tarball from the SOS Web Site using Invoke-WebRequestMakeDirs

# downloads the release tarball from the SOS Web Site
# creates the home and data directories if they doe not exist
# extracts the tarball to the Agent's home directory
# specifies the Java version and Java options to be used
# stops and starts the Agent from its instance start script <home>\bin\agent_4445.cmd
# operates the Agent for HTTP port 4445

Install or Update

...

from .zip Archive

Code Block
languagepowershell
titleExample for use of Installation Script
Invoke-WebRequest `
    -Uri 'https://download.sos-berlin.com/JobScheduler.2.5/js7_agent_windows.2.5.2.zip' `
    -Outfile C:\tmp\js7_agent_windows.2.5.2.zip

./Install-JS7Agent.ps1 `
    -Tarball "C:\tmp\js7_agent_windows.2.5.2.zip" `
     -HomeDir "C:\Program Files\sos-berlin.com\js7\agent" `
    -Data "C:\ProgramData\sos-berlin.com\js7\agent_4445" `
    -ControllerIdHttpPort controller4445 `
    -HttpPort localhost:4445 `
    -HttpsPort batch.example.com:4445 `
    -PrivateConf "C:\js7\agent-deployment\private.conf" `
    -ControllerPrimaryCert "C:\js7\agent-deployment\wintest-primary.crt" `
    -ControllerSecondaryCert "C:\js7\agent-deployment\wintest-secondary.crtMakeDirs

# downloads the release tarball from the SOS Web Site using Invoke-WebRequest
# creates the home directory if it does not exist
# extracts the tarball to the Agent's home directory
# operates the Agent for HTTP port 4445

Install or Update parallel Agent

Code Block
languagepowershell
titleExample for use of Installation Script
./Install-JS7Agent.ps1 `
    -HomeDir "C:\Program Files\sos-berlin.com\js7\agent" `
     -KeystoreData "C:\ProgramData\sos-berlin.com\js7\agent-deployment\https-keystore.pfx_44445" `
    -KeystorePassword ('jobscheduler' | ConvertTo-SecureString -AsPlainText -Force)HttpPort 44445 `
    -MakeDirs `
    -UseInstall

# makes use of an existing Agent installation in the home directory
# creates the data directory if it does not exist
# populates the data directory from initial configuration files
# operates the Agent for HTTP port 44445

Install or Update and Stop/Start using Windows Service

Code Block
languagepowershell
titleExample for use of Installation Script
Invoke-WebRequest `
    -Uri 'https://download.sos-berlin.com/JobScheduler.2.5/js7_agent_windows.2.5.2.zip' `
    -Outfile C:\tmp\js7_agent_windows.2.5.2.zip

./Install-JS7Agent.ps1 `
    -Tarball C:\tmp\js7_agent_windows.2.5.2.tar.gz `
    -HomeDir "C:\Program Files\sos-berlin.com\js7\agent" `
    -Data "C:\ProgramData\sos-berlin.com\js7\agent_4445" `
    -HttpPort 4445 `
    -ExecStart StartService `
    -ExecStop StopService `
    -MakeService `
    -MakeDirs

# downloads the release tarball from the SOS Web Site using Invoke-WebRequest
# extracts the tarball to the Agent's home directory
# creates the Agent's Windows service -Truststore "C:\js7\agent-deployment\https-truststore.pfx" `
    -TruststorePassword ('jobscheduler' | ConvertTo-SecureString -AsPlainText -Force) ` 
    -ExecStart StartService `
    -ExecStop StopService `
    -MakeService `
    -MakeDirs

# downloads the release tarball from the SOS Web Site using Invoke-WebRequest
# extracts the tarball to the Agent's home directory
# specifies the Controller ID of the Controller to which the Agent is dedicated
# specifies HTTP port 4445 on the localhost network interface and the same HTTPS port on the server network interface
# specifies the paths to the Primary and Secondary Controller's server certificates if a Controller Cluster is used
#     for a Standalone Controller the -ControllerSecondaryCert argument is omitted
# deploys the Agent private configuration file which holds references to keystore and truststore
# deploys keystore and truststore files in PKCS12 format 
# stops and starts the Agent's Windows service

Note:

  • For details about certificates and HTTPS connections see JS7 - Agent HTTPS Connections.
  • The private.conf configuration file holds references to the Controller's certificate in order to verify the connection from the Controller using HTTPS mutual authentication.
  • Users have a choice how to provide the required configuration:
    • The Agent Installation Script performs replacements of placeholders in the private.conf configuration file from option values, for details see chapter Replacements.
    • Users can manually adjust configuration items in the private.conf file that they specify for the Agent Installation Script., see JS7 - Agent Configuration Items.

Renew Certificates for HTTPS Connections


# operates the Agent for HTTP port 4445

Install or Update and Stop/Start using Windows Service for specific Account

Code Block
languagepowershell
titleExample for use of Installation Script
Invoke-WebRequest `
    -Uri 'https://download.sos-berlin.com/JobScheduler.2.5/js7_agent_windows.2.5.2.zip'
Code Block
languagepowershell
titleExample for use of Installation Script
./Install-JS7Agent.ps1 `
    -HomeDir "C:\Program Files\sos-berlin.com\js7\agent" `
    -DataOutfile "C:\ProgramData\sos-berlin.comtmp\js7\agent_4445"_agent_windows.2.5.2.zip

./Install-JS7Agent.ps1 `
    -ControllerId controllerTarball C:\tmp\js7_agent_windows.2.5.2.tar.gz `
    -HttpPortHomeDir localhost"C:4445 `
    -HttpsPort batch.example.com:4445\Program Files\sos-berlin.com\js7\agent" `
    -PrivateConfData "C:\ProgramData\sos-berlin.com\js7\agent-deployment\private.conf_4445" `
     -ControllerPrimaryCert "C:\js7\agent-deployment\wintest-primary.crt"HttpPort 4445 `
    -ControllerSecondaryCert "C:\js7\agent-deployment\wintest-secondary.crt" ` 
    -Keystore "C:\js7\agent-deployment\https-keystore.pfx" `
ServiceCredentials ( New-Object -typename System.Management.Automation.PSCredential `
           -KeystorePassword ('jobscheduler' | ConvertTo-SecureString -AsPlainText -Force) `
    -Truststore "C:\js7\agent-deployment\https-truststore.pfx" `
    -TruststorePasswordArgumentList '.\sos', ( 'jobschedulersecret' | ConvertTo-SecureString -AsPlainText -Force) ) `
    -MakeService `
      -ExecStart StartService `
    -ExecStop StopService `
     -NoInstallMakeDirs

# performsdownloads nothe installationrelease buttarball certificatefrom renewalthe only
#SOS specifiesWeb theSite Controller ID ofusing Invoke-WebRequest
# extracts the Controllertarball to which the Agent's ishome dedicateddirectory
# addressescreates an existingthe Agent's operatedWindows forservice HTTP portthat 4445is on the localhost network interface andrunning in the samelocal HTTPS port onaccount '.\sos' using the serverpassword network'secret' interface
# specifies the paths tocredentials thecan Primarybe andspecified Secondaryin Controller'sa servernumber certificates if a Controller Cluster is usedof ways
# stops and   for a Standalone Controller the -ControllerSecondaryCert argument is omittedstarts the Agent's Windows service
# deploysoperates the Agent privatefor configurationHTTP file that holds references to keystore and truststore
# deploys keystore and truststore files in PKCS12 format
# stops and starts the Agent's Windows service

...

port 4445

Install or Update and Stop/Start using Instance Start Script

Code Block
languagepowershell
titleExample for use of Installation Script
./Install-JS7Agent.ps1Invoke-WebRequest `
    -HomeDirUri "C:\Program Files\'https://download.sos-berlin.com\js7\agent"/JobScheduler.2.5/js7_agent_windows.2.5.2.zip' `
      -HttpPort 4445 `
    -ExecStart StartService Outfile C:\tmp\js7_agent_windows.2.5.2.zip

./Install-JS7Agent.ps1 `
    -ExecStop StopServiceTarball C:\tmp\js7_agent_windows.2.5.2.tar.gz `
    -NoInstall

# stops the Agent's Windows service should the Agent be running
# starts the Agent's Windows service

Stop Agent Service

Code Block
languagepowershell
titleExample for use of Installation Script
./Install-JS7Agent.ps1HomeDir "C:\Program Files\sos-berlin.com\js7\agent" `
    -HomeDirData "C:\Program FilesProgramData\sos-berlin.com\js7\agent_4445" `
      -HttpPort 4445 `
      -ExecStartRestart StartService `
    -NoInstallMakeDirs

# stopsdownloads the release Agent'starball Windowsfrom servicethe shouldSOS theWeb AgentSite be running

Patch

Patch Agent for Unix

...

using Invoke-WebRequest
# extracts the tarball to the Agent's home directory
# stops and starts the Agent from its instance start script <home>\bin\agent_4445.cmd
# operates the Agent for HTTP port 4445

Install or Update using Java Home and Java Options

Code Block
languagepowershell
titleExample for use of Installation Script
./Install-JS7Agent.ps1Invoke-WebRequest `
    -Release 2.2.3 `Uri 'https://download.sos-berlin.com/JobScheduler.2.5/js7_agent_windows.2.5.2.zip' `
    -Patch JS-1984Outfile C:\tmp\js7_agent_windows.2.5.2.zip

./Install-JS7Agent.ps1 `
     -HomeDir /home/sos/agentTarball C:\tmp\js7_agent_windows.2.5.2.zip `
    -HttpPort 4445HomeDir "C:\Program Files\sos-berlin.com\js7\agent" `
    -ExecStart StartServiceData "C:\ProgramData\sos-berlin.com\js7\agent_4445" `
    -HttpPort 4445 `
  -ExecStop StopService
   -JavaHome "C:\Program Files\Java\jdk-17.0.2" `
    -JavaOptions "-Xmx512m -Xms256m" `
    -Restart `
    -MakeDirs

# downloads the patchrelease tarball from the SOS Web Site using Invoke-WebRequest
# extracts the tarball to the Agent's home directory
# specifies the Java version and Java options to be used
# stops and starts the Agent from its instance start script <home>\bin\agent_4445.cmd
# operates the Agent for HTTP port 4445

Install or Update and Apply Certificates for HTTPS Connections

Code Block
languagepowershell
titleExample for use of Installation Script
Invoke-WebRequest `
    -Uri 'https://download.sos-berlin.com/JobScheduler.2.5/js7_agent_windows.2.5.2.zip' `
    -Outfile C:\tmp\js7_agent_windows.2.5.2.zip

./Install-JS7Agent.ps1 `
    -Tarball "C:\tmp\js7_agent_windows.2.5.2.zip" `
    -HomeDir "C:\Program Files\sos-berlin.com\js7\agent" `
    -Data "C:\ProgramData\sos-berlin.com\js7\agent_4445" `
    -ControllerId controller `
    -HttpPort localhost:4445 `
    -HttpsPort batch.example.com:4445 `
    -PrivateConf "C:\js7\agent-deployment\private.conf" `
    -ControllerPrimaryCert "C:\js7\agent-deployment\wintest-primary.crt" `
    -ControllerSecondaryCert "C:\js7\agent-deployment\wintest-secondary.crt" `
    -Keystore "C:\js7\agent-deployment\https-keystore.pfx" `
    -KeystorePassword ('jobscheduler' | ConvertTo-SecureString -AsPlainText -Force) `
    -Truststore "C:\js7\agent-deployment\https-truststore.pfx" `
    -TruststorePassword ('jobscheduler' | ConvertTo-SecureString -AsPlainText -Force) ` 
    -ExecStart StartService `
    -ExecStop StopService `
    -MakeService `
    -MakeDirs

# downloads the release tarball from the SOS Web Site using Invoke-WebRequest
# extracts the tarball to the Agent's home directory
# specifies the Controller ID of the Controller to which the Agent is dedicated
# specifies HTTP port 4445 on the localhost network interface and the same HTTPS port on the server network interface
# specifies the paths to the Primary and Secondary Controller's server certificates if a Controller Cluster is used
#     for a Standalone Controller the -ControllerSecondaryCert argument is omitted
# deploys the Agent private configuration file which holds references to keystore and truststore
# deploys keystore and truststore files in PKCS12 format 
# stops and starts the Agent's Windows service

Note:

  • For details about certificates and HTTPS connections see JS7 - Agent HTTPS Connections.
  • The private.conf configuration file holds references to the Controller's certificate in order to verify the connection from the Controller using HTTPS mutual authentication.
  • Users have a choice how to provide the required configuration:
    • Donwload the private.conf-template-agent template, the Agent Installation Script performs replacements of placeholders in the template file from option values, for details see chapter Replacements.
    • Users can manually adjust configuration items in the private.conf file that they specify for the Agent Installation Script., see JS7 - Agent Configuration Items.

Renew Certificates 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" `
    -ControllerId controller `
    -HttpPort localhost:4445 `
    -HttpsPort batch.example.com:4445 `
    -PrivateConf "C:\js7\agent-deployment\private.conf" `
    -ControllerPrimaryCert "C:\js7\agent-deployment\wintest-primary.crt" `
    -ControllerSecondaryCert "C:\js7\agent-deployment\wintest-secondary.crt" ` 
    -Keystore "C:\js7\agent-deployment\https-keystore.pfx" `
    -KeystorePassword ('jobscheduler' | ConvertTo-SecureString -AsPlainText -Force) `
    -Truststore "C:\js7\agent-deployment\https-truststore.pfx" `
    -TruststorePassword ('jobscheduler' | ConvertTo-SecureString -AsPlainText -Force) ` 
    -ExecStart StartService `
    -ExecStop StopService `
    -NoInstall

# performs no installation but certificate renewal only
# specifies the Controller ID of the Controller to which the Agent is dedicated
# addresses an existing Agent operated for HTTP port 4445 on the localhost network interface and the same HTTPS port on the server network interface
# specifies the paths to the Primary and Secondary Controller's server certificates if a Controller Cluster is used
#     for a Standalone Controller the -ControllerSecondaryCert argument is omitted
# deploys the Agent private configuration file that holds references to keystore and truststore
# deploys keystore and truststore files in PKCS12 format
# stops and starts the Agent's Windows service

Install or Update Primary Director Agent and Apply Certificates for HTTPS Connections

Code Block
languagepowershell
titleExample for use of Installation Script
Invoke-WebRequest `
    -Uri 'https://download.sos-berlin.com/JobScheduler.2.6/js7_agent_windows.2.6.0.zip' `
    -Outfile C:\tmp\js7_agent_windows.2.6.0.zip
Invoke-WebRequest `
    -Uri 'https://download.sos-berlin.com/JobScheduler.2.6/js7-license.jar' `
    -Outfile C:\tmp\js7-license.jar
 
./Install-JS7Agent.ps1 `
    -Tarball "C:\tmp\js7_agent_windows.2.6.0.zip" `
    -HomeDir "C:\Program Files\sos-berlin.com\js7\agent" `
    -Data "C:\ProgramData\sos-berlin.com\js7\agent_4445" `
    -ControllerId controller `
    -AgentClusterId agent-cluster `
    -HttpPort localhost:4445 `
    -HttpsPort batch.example.com:4445 `
    -LicenseKey "C:\js7\agent-deployment\example.pem" `
    -LicenseBin "C:\tmp\js7-license.jar" ` 
    -PrivateConf "C:\js7\agent-deployment\private.conf" `
    -ControllerPrimaryCert "C:\js7\agent-deployment\wintest-primary.crt" `
    -ControllerSecondaryCert "C:\js7\agent-deployment\wintest-secondary.crt" `
    -DirectorPrimaryCert "C:\js7\agent-deployment\wintest-primary.crt" `
    -DirectorSecondaryCert "C:\js7\agent-deployment\wintest-secondary.crt" `
    -Keystore "C:\js7\agent-deployment\https-keystore.pfx" `
    -KeystorePassword ('jobscheduler' | ConvertTo-SecureString -AsPlainText -Force) `
    -Truststore "C:\js7\agent-deployment\https-truststore.pfx" `
    -TruststorePassword ('jobscheduler' | ConvertTo-SecureString -AsPlainText -Force) ` 
    -ExecStart StartService `
    -ExecStop StopService `
    -MakeService `
    -Active `
    -MakeDirs

# downloads the release tarball from the SOS Web Site using Invoke-WebRequest
# downloads the binary file for licensed code to enable cluster operations
# extracts the release tarball to the Agent's home directory
# specifies the Controller ID of the Controller to which the Agent is dedicated
# specifies HTTP port 4445 on the localhost network interface and the same HTTPS port on the server network interface
# specifies the paths to the Primary and Secondary Controller's server certificates if a Controller Cluster is used
#     for a Standalone Controller the -ControllerSecondaryCert argument is omitted
# specifies the paths to the Primary and Secondary Director Agent's server certificates if an Agent Cluster is used
#     for a Standalone Director Agent the -DirectorSecondaryCert argument is omitted
# deploys the Agent private configuration file which holds references to keystore and truststore
# deploys keystore and truststore files in PKCS12 format 
# stops and starts the Agent's Windows service

Note:

  • For details about certificates and HTTPS connections see JS7 - Agent HTTPS Connections.
  • The private.conf configuration file holds references to the Controller's certificate in order to verify the connection from the Controller using HTTPS mutual authentication.
  • Users have a choice how to provide the required configuration:
    • Donwload the private.conf-template-agent template, the Agent Installation Script performs replacements of placeholders in the template file from option values, for details see chapter Replacements.
    • Users can manually adjust configuration items in the private.conf file that they specify for the Agent Installation Script., see JS7 - Agent Configuration Items.

Install or Update Secondary Director Agent and Apply Certificates for HTTPS Connections

Code Block
languagepowershell
titleExample for use of Installation Script
Invoke-WebRequest `
    -Uri 'https://download.sos-berlin.com/JobScheduler.2.6/js7_agent_windows.2.6.0.zip' `
    -Outfile C:\tmp\js7_agent_windows.2.6.0.zip
Invoke-WebRequest `
    -Uri 'https://download.sos-berlin.com/JobScheduler.2.6/js7-license.jar' `
    -Outfile C:\tmp\js7-license.jar
 
./Install-JS7Agent.ps1 `
    -Tarball "C:\tmp\js7_agent_windows.2.6.0.zip" `
    -HomeDir "C:\Program Files\sos-berlin.com\js7\agent" `
    -Data "C:\ProgramData\sos-berlin.com\js7\agent_4445" `
    -ControllerId controller `
    -AgentClusterId agent-cluster `
    -HttpPort localhost:4445 `
    -HttpsPort batch.example.com:4445 `
    -LicenseKey "C:\js7\agent-deployment\example.pem" `
    -LicenseBin "C:\tmp\js7-license.jar" ` 
    -PrivateConf "C:\js7\agent-deployment\private.conf" `
    -ControllerPrimaryCert "C:\js7\agent-deployment\wintest-primary.crt" `
    -ControllerSecondaryCert "C:\js7\agent-deployment\wintest-secondary.crt" `
    -DirectorPrimaryCert "C:\js7\agent-deployment\wintest-primary.crt" `
    -DirectorSecondaryCert "C:\js7\agent-deployment\wintest-secondary.crt" `
    -Keystore "C:\js7\agent-deployment\https-keystore.pfx" `
    -KeystorePassword ('jobscheduler' | ConvertTo-SecureString -AsPlainText -Force) `
    -Truststore "C:\js7\agent-deployment\https-truststore.pfx" `
    -TruststorePassword ('jobscheduler' | ConvertTo-SecureString -AsPlainText -Force) ` 
    -ExecStart StartService `
    -ExecStop StopService `
    -MakeService `
    -Standby `
    -MakeDirs

# parameterization is the same as from the previous example for a Primary Director Agent
# the one exception being use of the -Standby switch for a Secondary Director Agent

Start Agent Service

Code Block
languagepowershell
titleExample for use of Installation Script
./Install-JS7Agent.ps1 `
    -HomeDir "C:\Program Files\sos-berlin.com\js7\agent" `
    -HttpPort 4445 `
    -ExecStart StartService `
    -ExecStop StopService `
    -NoInstall

# stops the Agent's Windows service should the Agent be running
# starts the Agent's Windows service

Stop Agent Service

Code Block
languagepowershell
titleExample for use of Installation Script
./Install-JS7Agent.ps1 `
    -HomeDir "C:\Program Files\sos-berlin.com\js7\agent" `
    -HttpPort 4445 `
    -ExecStop StopService `
    -NoInstall

# stops the Agent's Windows service should the Agent be running

Patch

Patch Agent for Unix

Patch from Download

Code Block
languagebash
titleExample for use of Agent Installation Script
./Install-JS7Agent.ps1 `
    -Release 2.2.3 `
    -Patch JS-1984 `
    -HomeDir /home/sos/agent `
    -HttpPort 4445 `
    -ExecStart StartService `
    -ExecStop StopService
 
# downloads the patch tarball to the Agent's home directory
# stores the patch files to the Agent's <home>/lib/patches sub-directory
# stops and starts the Agent's systemd Service

Patch from Tarball

Code Block
languagepowershell
titleExample for use of Installation Script
Invoke-WebRequest `
    -Uri 'https://download.sos-berlin.com/JobScheduler.2.2/js7_agent_unix.2.2.3.JS-1984.tar.gz' `
    -Outfile /tmp/js7_agent_unix.2.2.3.JS-1984.tar.gz

./Install-JS7Agent.ps1 `
    -Tarball /tmp/js7_agent_unix.2.2.3.JS-1984.tar.gz `
    -Patch JS-1984 `
    -HomeDir /home/sos/agent `
    -HttpPort 4445 `
    -ExecStart StartService `
    -ExecStop StopService

# downloads the patch tarball from the SOS Web Site using Invoke-WebRequest
# extracts the patch tarball to the Agent's home directory
# stores the patch files to the Agent's <home>/lib/patches sub-directory
# stops and starts the Agent's systemd Service

Patch from .jar File

Code Block
languagepowershell
titleExample for use of Installation Script
Invoke-WebRequest `
    -Uri 'https://download.sos-berlin.com/JobScheduler.2.2/patch-20220331-JS-1984-2.2.3.jar' `
    -Outfile /tmp/patch-20220331-JS-1984-2.2.3.jar

./Install-JS7Agent.ps1 `
    -Jar /tmp/patch-20220331-JS-1984-2.2.3.jar `
    -Patch JS-1984 `
    -HomeDir /home/sos/agent `
    -HttpPort 4445 `
    -ExecStart StartService `
    -ExecStop StopService

# downloads the patch .jar file from the SOS Web Site using Invoke-WebRequest
# stores the patch .jar file to the Agent's <home>/lib/patches sub-directory
# stops and starts the Agent's systemd Service

Patch Agent for Windows

Patch from Download

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

# downloads the patch tarball from the SOS Web Site
# extracts the patch tarball to the Agent's home directory
# stores the patch files to the Agent's <home>\lib\patches sub-directory
# stops and starts the Agent's Windows service

Patch from .zip Archive

Code Block
languagepowershell
titleExample for use of Installation Script
Invoke-WebRequest `
    -Uri 'https://download.sos-berlin.com/JobScheduler.2.2/js7_agent_windows.2.2.3.JS-1984.zip' `
    -Outfile C:\tmp\js7_agent_windows.2.2.3.JS-1984.zip

./Install-JS7Agent.ps1 `
    -Tarball "C:\tmp\js7_agent_windows.2.2.3.JS-1984.zip" `
    -Patch JS-1984 `
    -HomeDir "C:\Program Files\sos-berlin.com\js7\agent" `
    -HttpPort 4445 `
    -ExecStart StartService `
    -ExecStop StopService 

# downloads the patch tarball from the SOS Web Site using Invoke-WebRequest
# extracts the patch tarball to the Agent's home directory
# stores patch files to the Agent's <home>\lib\patches sub-directory
# stops and starts the Agent's Windows service

Patch from .jar File

Code Block
languagepowershell
titleExample for use of Installation Script
Invoke-WebRequest `
    -Uri 'https://download.sos-berlin.com/JobScheduler.2.2/patch-20220331-JS-1984-2.2.3.jar' `
    -Outfile C:\tmp\patch-20220331-JS-1984-2.2.3.jar

./Install-JS7Agent.ps1 `
    -Jar "C:\tmp\patch-20220331-JS-1984-2.2.3.jar" `
    -Patch JS-1984 `
    -HomeDir "C:\Program Files\sos-berlin.com\js7\agent" `
    -HttpPort 4445 `
    -ExecStart StartService `
    -ExecStop StopService 

# downloads the patch .jar file from the SOS Web Site using Invoke-WebRequest
# stores the patch .jar file to the Agent's <home>\lib\patches sub-directory
# stops and starts the Agent's Windows service

Uninstall

Uninstall Agent for Unix

Uninstall

Code Block
languagepowershell
titleExample for use of Installation Script
./Install-JS7Agent.ps1 `
    -HomeDir /opt/sos-berlin.com/js7/agent `
    -Data /var/sos-berlin.com/js7/agent `
    -HttpPort 4445 `
    -ExecStop StopService `
    -Uninstall

# stops the Agent's systemd service
# removes the Agent's systemd service
# removes the home directory and data directory

Uninstall and Preserve Home Directory

Code Block
languagepowershell
titleExample for use of Installation Script
./Install-JS7Agent.ps1 `
    -HomeDir /opt/sos-berlin.com/js7/agent `
    -Data /var/sos-berlin.com/js7/agent `
    -HttpPort 4445 `
    -ExecStop StopService `
    -UninstallData

# stops the Agent's systemd service
# removes the Agent's systemd service
# removes the Agent's data directory
# preserves the Agent's home directory that might be used by additional Agents installed side-by-side

Uninstall and Preserve Data Directory

Code Block
languagepowershell
titleExample for use of Installation Script
./Install-JS7Agent.ps1 `
    -HomeDir /opt/sos-berlin.com/js7/agent `
    -Data /var/sos-berlin.com/js7/agent `
    -HttpPort 4445 `
    -ExecStop StopService `
    -UninstallHome

# stops the Agent's systemd service
# removes the Agent's systemd service
# removes the Agent's home directory
# preserves the Agent's data directory

Uninstall Agent for Windows

Uninstall

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 `
    -ExecStop StopService ` 
    -Uninstall

# stops the Agent's Windows service
# removes the Agent's Windows service
# removes the home directory and data directory

Uninstall and Preserve Home Directory

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 `
    -ExecStop StopService ` 
    -UninstallData

# stops the Agent's Windows service
# removes the Agent's Windows service
# removes the Agent's data directory
# preserves the Agent's home directory that might be used by additional Agents installed side-by-side

Uninstall and Preserve Data Directory

...

languagepowershell
titleExample for use of Installation Script

...

 tarball from the SOS Web Site
# extracts the patch tarball to the Agent's home directory
# stores the patch files to the Agent's <home>/lib/patches sub-directory
# stops and starts the Agent's systemd service

Patch from Tarball

Code Block
languagebash
titleExample for use of Agent Installation Script
Invoke-WebRequest `
    -Uri 'https://download.sos-berlin.com/patches/2.2.3-patch/js7_agent.2.2.3-PATCH.JS-1984.tar.gz' `
    -Outfile /tmp/js7_agent.2.2.3-PATCH.JS-1984.tar.gz

./Install-JS7Agent.ps1 `
    -Tarball /tmp/js7_agent.2.2.3-PATCH.JS-1984.tar.gz `
    -Patch JS-1984 `
    -HomeDir /home/sos/agent `
    -HttpPort 4445 `
    -ExecStart StartService `
    -ExecStop StopService

# downloads the patch tarball from the SOS Web Site using Invoke-WebRequest
# extracts the patch tarball to the Agent's home directory
# stores patch files to the Agent's <home>/lib/patches sub-directory
# stops and starts the Agent's systemd service

Patch from .jar File

Code Block
languagebash
titleExample for use of Agent Installation Script
Invoke-WebRequest `
    -Uri 'https://download.sos-berlin.com/patches/2.2.3-patch/js7_agent.2.2.3-PATCH.JS-1984.jar' `
    -Outfile /tmp/js7_agent.2.2.3-PATCH.JS-1984.jar

./Install-JS7Agent.ps1 `
    -PatchJar /tmp/js7_agent.2.2.3-PATCH.JS-1984.jar `
    -Patch JS-1984 `
    -HomeDir /home/sos/agent `
    -HttpPort 4445 ` 
    -ExecStart StartService `
    -ExecStop StopService

# downloads the patch .jar file from the SOS Web Site using Invoke-WebRequest
# stores patch files to the Agent's <home>/lib/patches sub-directory
# stops and starts the Agent's systemd service

Patch Agent for Windows

Patch from Download

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

# downloads the patch tarball from the SOS Web Site
# extracts the patch files to the Agent's <home>\lib\patches sub-directory
# stops and starts the Agent's Windows service

Patch from Tarball

Code Block
languagepowershell
titleExample for use of Installation Script
Invoke-WebRequest `
    -Uri 'https://download.sos-berlin.com/patches/2.2.3-patch/js7_agent.2.2.3-PATCH.JS-1984.tar.gz' `
    -Outfile C:\tmp\js7_agent.2.2.3-PATCH.JS-1984.tar.gz

./Install-JS7Agent.ps1 `
    -Tarball "C:\tmp\js7_agent.2.2.3-PATCH.JS-1984.tar.gz" `
    -Patch JS-1984 `
    -HomeDir "C:\Program Files\sos-berlin.com\js7\agent" `
    -HttpPort 4445 `
    -ExecStart StartService `
    -ExecStop StopService 

# downloads the patch tarball from the SOS Web Site using Invoke-WebRequest
# extracts patch files to the Agent's <home>\lib\patches sub-directory
# stops and starts the Agent's Windows service

Patch from .jar File

Code Block
languagepowershell
titleExample for use of Installation Script
Invoke-WebRequest `
    -Uri 'https://download.sos-berlin.com/patches/2.2.3-patch/js7_agent.2.2.3-PATCH.JS-1984.jar' `
    -Outfile C:\tmp\js7_agent.2.2.3-PATCH.JS-1984.jar 

./Install-JS7Agent.ps1 `
    -PatchJar "C:\tmp\js7_agent.2.2.3-PATCH.JS-1984.jar" `
    -Patch JS-1984 `
    -HomeDir "C:\Program Files\sos-berlin.com\js7\agent" `
    -HttpPort 4445 `
    -ExecStart StartService `
    -ExecStop StopService 

# downloads the patch .jar file from the SOS Web Site using Invoke-WebRequest
# stores the patch .jar file to the Agent's <home>\lib\patches sub-directory
# stops and starts the Agent's Windows service

Uninstall

Uninstall Agent for Unix

Uninstall

Code Block
languagepowershell
titleExample for use of Installation Script
./Install-JS7Agent.ps1 `
    -HomeDir /opt/sos-berlin.com/js7/agent `
    -Data /var/sos-berlin.com/js7/agent `
    -HttpPort 4445 `
    -ExecStop StopService `
    -Uninstall

# stops the Agent's systemd service
# removes the Agent's systemd service
# removes the home directory and data directory

Uninstall and Preserve Home Directory

Code Block
languagepowershell
titleExample for use of Installation Script
./Install-JS7Agent.ps1 `
    -HomeDir /opt/sos-berlin.com/js7/agent `
    -Data /var/sos-berlin.com/js7/agent `
    -HttpPort 4445 `
    -ExecStop StopService `
    -UninstallData

# stops the Agent's systemd service
# removes the Agent's systemd service
# removes the Agent's data directory
# preserves the Agent's home directory that might be used by parallel Agents

Uninstall and Preserve Data Directory

Code Block
languagepowershell
titleExample for use of Installation Script
./Install-JS7Agent.ps1 `
    -HomeDir /opt/sos-berlin.com/js7/agent `
    -Data /var/sos-berlin.com/js7/agent `
    -HttpPort 4445 `
    -ExecStop StopService `
    -UninstallHome

# stops the Agent's systemd service
# removes the Agent's systemd service
# removes the Agent's home directory
# preserves the Agent's data directory

Uninstall Agent for Windows

Uninstall

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 `
    -ExecStop StopService ` 
    -Uninstall

# stops the Agent's Windows service
# removes the Agent's Windows service
# removes the home directory and data directory

Uninstall and Preserve Home Directory

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 `
    -ExecStop StopService ` 
    -UninstallData

# stops the Agent's Windows service
# removes the Agent's Windows service
# removes the Agent's data directory
# preserves the Agent's home directory that might be used by parallel Agents

Uninstall and Preserve Data Directory

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 `
    -ExecStop StopService ` 
    -UninstallHome

# stops the Agent's Windows service
# removes the Agent's Windows service
# removes the Agent's home directory
# preserves the Agent's data directory

Anchor
replacements
replacements
Replacements

The Agent Installation Script performs replacements of placeholders in installation files and configuration files by option values.

Installation files

  • <home>\bin\agent_<http-port>.cmd
    • Replacements are performed for the following placeholders used for environment variables by respective option values:

      PlaceholderOption Value
      JS7_AGENT_HOME-HomeDir
      JS7_AGENT_DATA-Data
      JS7_AGENT_USER-User
      JS7_AGENT_HTTP_PORT-HttpPort
      JS7_AGENT_HTTPS_PORT-HttpsPort
      JS7_AGENT_CONFIG_DIR-Config
      JS7_AGENT_LOGS-Logs
      JS7_AGENT_WORK_DIR-Work
      JS7_AGENT_PID_FILE_DIR-PidFileDir
      JS7_AGENT_PID_FILE_NAME-PidFileName
      JAVA_HOME-JavaHome
      JAVA_OPTIONS-JavaOptions

Configuration files

  • <config>\private\private.conf
    • Replacements are performed for the following placeholders by respective option values:

      PlaceholderOption Value
      {{controller-id}}-ControllerId
      {{controller-primary-distinguished-name}}-ControllerPrimaryCert
      {{controller-secondary-distinguished-name}}-ControllerSecondaryCert
      {{agent-cluster-id}}-AgentClusterId
      {{director-primary-distinguished-name}}-DirectorPrimaryCert
      {{director-secondary-distinguished-name}}-DirectorSecondaryCert
      {{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:

      Code Block
      languageyml
      titleprivate.conf template file with placeholders
      collapsetrue
      js7 {
          auth {
              users {
                  # Controller ID for connections by primary/secondary Controller instance
                  {{controller-id}} {
                      distinguished-names=[
                          "{{controller-primary-distinguished-name}}",
                          "{{controller-secondary-distinguished-name}}"
                      ]
                  }
      
                  # Agent Cluster ID for connections by primary/secondary Director Agent instance
                  {{agent-cluster-id}} {
                      permissions = [ AgentDirector ]
                      distinguished-names=[
                          "{{director-primary-distinguished-name}}",
                          "{{director-secondary-distinguished-name}}"
                      ]
                  }
              }
          }
      
          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"
              }
          }
      
          job {
              # Enable script execution from signed workflows^M
              execution {
                  signed-script-injection-allowed=yes
              }
          }
      
          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}}"
                      }
                  ]
              }
          }
      }

...