Versions Compared

Key

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

Table of Contents

Introduction

The JobScheduler Universal Agent Batch Installer is a set of files that are used by a JobScheduler Master to install one or more Universal Agents on local and remote servers.

Article Scope

This article is one of a series describing how to configure the JobScheduler Universal Agent Batch Installer. It describes a simple use case for the Universal Agent Batch Installer - to install a single Universal Agent on a remote server. This article describes the installation procedure in detail and is intended as a "getting started" guide. The other articles in this series describe more complex use cases and are listed in the introductory JobScheduler Universal Agent - Batch Installation and Update of Agents article.

...

The Batch Installation - Reference Documentation article provides a detailed guide to configuration of the batch installer with, for example, full lists of parameters.

Installation Environment

This article describes the use of the JobScheduler Universal Agent Batch Installer on a Linux server, working from a Windows system.

Installation Procedure

General requirements:

  • The JobScheduler Master to be used for the installation of the Universal Agents should be up and running.
  • A Java Run-time Environment in version 1.8 or newer should already be installed on the system(s) the Agent is to be installed on.
  • We recommend that you use the SOS XML Editor to manage the configuration files required for the Batch Installer. More information about the installation and use of the XML editor will be provided later in this article.

1. Download and Extract the Batch Installer and Universal Agent Files

Files can be downloaded from http://www.sos-berlin.com/jobscheduler-downloads.

Unix Target Systems

  1. Download the "JobScheduler Universal Agent" tarball for Unix.
  2. Download the "Universal Agent Batch Installer".
    • This archive contains the following folders and sub-folders:
      • live/batch_install_universal_agent
        • This folder contains the Jobs and Job Chain used to carry out the installation.
          Extract these files to the the live folder of the JobScheduler Master: 
          • SCHEDULER_DATA/config/live.
      • batch_install
        • This folder contains the configuration files for the Batch Installer.
          Extract these files to the config directory of the JobScheduler Master: 
          • SCHEDULER_DATA/config.
  3. Copy the JobScheduler Universal Agent installation file to the SCHEDULER_DATA/config/batch_install folder.

Windows Target Systems

  1. Download the "JobScheduler Universal Agent" for Windows.
  2. Download the "Universal Agent Batch Installer".
    • This archive contains the following folders and sub-folders:
      • the live/batch_install_universal_agent folder
        • This folder contains the Jobs and Job Chain used to carry out the installation. 
          Extract these files to the live folder of the JobScheduler Master:
          • SCHEDULER_DATA/config/live.
      • the batch_install folder
        • This folder contains the configuration files for the Batch Installer.  
          Extract these files to the JobScheduler configuration directory:
          • SCHEDULER_DATA/config.
  3. Copy the JobScheduler Universal Agent installation file to the SCHEDULER_DATA/config/batch_install folder.

2. Configure the Transfer of the Universal Agent Installation Files and the Agent Installation

Info
titleHints
  • Configuring complex XML files with a text editor is often a tedious and error-prone procedure. To get around this, we recommend that you use our XML Editor to manage the configuration files required for the Batch Installer. The XML Editor automatically validates configuration files and therefore reduces the possibility of configuration errors. See the Using the XML Editor chapter below for more detailed information about using the XML Editor. 

    After downloading the XML Editor, extract the contents of the downloaded zip file to a convenient folder (an installation routine is not required) and start the sos.xml.editor.exe program.

    The  XML Editor is available for Windows.
  • An overview of the use of the XML Editor is provided in the Using the XML Editor section at the end of this article.
    A more detailed description of the use of the XML Editor can be found in the
  • The JobScheduler Master comes with its own managed file transfer solution, YADE. YADE will be used here for transferring the files from the JobScheduler Master to the Agent servers.
    For more information about YADE, see the YADE product site.

2.1 Configure transfer of the Universal Agent installation files

The transfer of the Universal Agent installation files is configured in the yade_agent_batch_installer_settings.xml file. This file will be located in the SCHEDULER_DATA/config/batch_installer folder unpacked in step 1 above.

...

  • a Protocol Fragment that defines how the file transfer is to be carried out and
  • a Profile that defines the file transfer itself.
Protocol Fragment Configuration

A Protocol Fragment in the YADE configuration file is required for each installation. The easiest way to add a Protocol Fragment element using the XML Editor is to copy an already existing element and pasting it to the parent element - in this case <ProtocolFragments>.

...

  • Configurations
    • Fragments
      • ProtocolFragments
        • SFTPFragment name="SFTP_192.11.0202:4441"
          • BasicConnection
            • Hostname192.11.0202
          • SSHAuthentication
            • Account sos
            • AuthenticationMethodPassword
              • Password ********
Profile Configuration

A separate Profile in the YADE configuration file is required for each Agent installation.

...

  • the JobScheduler Universal Agent installation file: jobscheduler_unix_universal_agent.<version>.tar.gz
  • a start script for every Agent instance: jobscheduler_agent_<port>.sh
  • an installation script: jobscheduler_universal_agent_install.sh
Anchor
yade_settings_file
yade_settings_file
YADE Settings File for File Transfer

Note that the file shown above is in the YADE XML format and that YADE versions 1.10 and older require a .ini file to perform the transfer that is specified in the <globals><install_path><transfer><settings> element in the Batch Installer configuration file.

Code Block
title.ini file
collapsetrue
[protocol_fragment_sftp@SFTP_192.11.0.111:4445]
protocol                            = sftp
host                                = 192.11.0.111
user                                = test
ssh_auth_method                     = password
password                            = xxxx

[protocol_fragment_sftp@SFTP_192.11.0.95:4445]
protocol                            = sftp
host                                = 192.11.0.95
user                                = test
ssh_auth_method                     = password
password                            = xxxx

[192.11.0.111:4445]
operation                           = copy
source_protocol                     = local
file_spec                           = .*\.(sh|gz)$
source_dir                          = C:\Program Files (x86)\sos-berlin.com\jobscheduler\vg_4444\scheduler_data\config\batch_installer
target_include                      = protocol_fragment_sftp@SFTP_192.11.0.111:4445
target_dir                          = /home/test/tmp/

[192.11.0.95:4445]
operation                           = copy
source_protocol                     = local
file_spec                           = .*\.(sh|gz)$
source_dir                          = C:\Program Files (x86)\sos-berlin.com\jobscheduler\vg_4444\scheduler_data\config\batch_installer
target_include                      = protocol_fragment_sftp@SFTP_192.11.0.95:4445
target_dir                          = /home/test/tmp/

Anchor
batch_installer_config_file
batch_installer_config_file
2.2 Configure the installation of the Universal Agents

The installation of the Universal Agents on the target servers is configured in the batch_installer_config_file.xml file in the XML Editor. This file will be located in the SCHEDULER_DATA/config/batch_installer folder unpacked in step 1 above.

...

Code Block
languagexml
titleInstaller Configuration File
collapsetrue
<?xml version="1.0" encoding="utf-8"?>
<installations lastRun="2015-11-19 17:11">
  <globals>
    <transfer>
      <settings><![CDATA[C:\Program Files (x86)\sos-berlin.com\jobscheduler\vg_4444\scheduler_data\config\batch_installer\yade_agent_batch_installer_settings.ini]]></settings>
    </transfer>
	<installation_file><![CDATA[jobscheduler_unix_universal_agent.1.10.2.tar.gz]]></installation_file>
  </globals>
  <installation lastRun="2015-11-19 17:11">
    <install_path><![CDATA[/opt]]></install_path>
    <agent_options>
      <scheduler_http_port>4447</scheduler_http_port>
      <scheduler_user><![CDATA[test]]></scheduler_user>
      <scheduler_log_dir><![CDATA[/var/log/sos-berlin.com/jobscheduler/agent]]></scheduler_log_dir>
    </agent_options>
    <ssh>
      <password><![CDATA[test]]></password>
      <sudo_password><![CDATA[xxxx]]></sudo_password>
      <auth_method><![CDATA[password]]></auth_method>
      <host><![CDATA[192.11.0.111]]></host>
      <port><![CDATA[22]]></port>
    </ssh>
    <postprocessing>
      <command><![CDATA[echo ${ssh.sudo_password} | sudo -S cp ${install_path}/jobscheduler_agent/bin/jobscheduler_agent_${agent_options.scheduler_http_port}.sh /etc/init.d/jobscheduler_agent_${agent_options.scheduler_http_port}]]></command>
      <command><![CDATA[echo ${ssh.sudo_password} | sudo -S update-rc.d jobscheduler_agent_${agent_options.scheduler_http_port}]]></command>
    </postprocessing>
  </installation>
  <installation lastRun="2015-11-19 17:11">
    <install_path><![CDATA[/opt/]]></install_path>
    <agent_options>
      <scheduler_http_port>4445</scheduler_http_port>
      <scheduler_user><![CDATA[sos]]></scheduler_user>
      <scheduler_log_dir><![CDATA[/var/log/sos-berlin.com/jobscheduler/agent]]></scheduler_log_dir>
    </agent_options>
    <ssh>
      <user><![CDATA[sos]]></user>
      <password><![CDATA[xxxx]]></password>
      <sudo_password><![CDATA[xxxx]]></sudo_password>
      <auth_method><![CDATA[password]]></auth_method>
      <host><![CDATA[192.11.0.95]]></host>
      <port><![CDATA[22]]></port>
    </ssh>
    <postprocessing>
      <command><![CDATA[echo ${ssh.sudo_password} | sudo  -S cp ${install_path}/jobscheduler_agent/bin/jobscheduler_agent_${agent_options.scheduler_http_port}.sh /etc/init.d/jobscheduler_agent_${agent_options.scheduler_http_port}]]></command>
      <command><![CDATA[echo ${ssh.sudo_password} | sudo -S chkconfig jobscheduler_agent_${agent_options.scheduler_http_port}]]></command>
    </postprocessing>
  </installation>
</installations>

2.3 Configure the JobScheduler Jobs

Agent installation is carried out by the four Jobs in the universal_agent_installer Job Chain. Execution of this Job Chain is started by an Order that is generated by the AgentBatchInstaller Job. A more detailed description of the installation procedure can be found in the JobScheduler Universal Agent - Batch Installation and Update of Agents article.

...

  • Set the installation_definition_file Job parameter to the path that points to the Batch Installer configuration file.
    If the paths recommended in Step 1 of this procedure above were followed this will be:

    • SCHEDULER_DATA/config/batch_install/batch_installer_config_file.xml
  • Similarly, the installation_job_chain parameter should be set to:
    • /batch_install_universal_agent/universal_agent_installer
  • Leave the filter_install_host and filter_install_port parameters blank.
  • Leave the update parameter set to true.

3 Installation of the Agents

The Agents can be installed after the XML configuration files and JobScheduler Jobs have been configured as described above.

...

  1. Sign in to the JOC Cockpit operating interface with a User Account that has the permissions necessary to start a Job.
  2. Open the "Jobs" view and open the "batch_installer_universal_agent" folder.
  3. Click on Action symbol (the ellipsis) alongside the AgentBatchInstaller Job and select the Start Task now option.

 

Excerpt

Anchor
xml_editor
xml_editor
Using the XML Editor

The XML Editor can be used to manage the Batch Installer configuration file and the YADE configuration file.

XML Editor for Batch Installer configuration file

An example Batch Installer configuration file for the installation of a single Agent is shown in the following screenshot:

XML Editor for YADE configuration file

An example YADE configuration file for the installation of a single Agent is shown in the next screenshot:

Anchor
yadexml2ini_converter
yadexml2ini_converter
XML Editor for converting YADE configuration files (XML) into YADE setting files (.ini)

The "YADE Xml2Ini Converter" function in the XML Editor is available for converting YADE files from XML to the .ini format required by versions of YADE before 1.11. Clicking on the button of the same name will open the following form:

Note that it is not necessary to create a Profile for the Batch Installer, as conversion will take place automatically once the "Autotransform" option has been chosen. Every time a change in the XML file is saved the XML file will be automatically converted and saved in .ini format. 

A pop-up window will show every time a change is saved if the option "Show notification on autotransform" is chosen.