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
- Download the "JobScheduler Universal Agent" tarball for Unix.
- 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 thelive
folder of the JobScheduler Master:SCHEDULER_DATA/config/live
.
- This folder contains the Jobs and Job Chain used to carry out the installation.
batch_install
- This folder contains the configuration files for the Batch Installer.
Extract these files to theconfig
directory of the JobScheduler Master:SCHEDULER_DATA
/config
.
- This folder contains the configuration files for the Batch Installer.
- This archive contains the following folders and sub-folders:
- Copy the JobScheduler Universal Agent installation file to the
SCHEDULER_DATA/config/
batch_install
folder.
Windows Target Systems
- Download the "JobScheduler Universal Agent" for Windows.
- 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 thelive
folder of the JobScheduler Master:SCHEDULER_DATA/config/live
.
- This folder contains the Jobs and Job Chain used to carry out the installation.
- 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
.
- This folder contains the configuration files for the Batch Installer.
- the
- This archive contains the following folders and sub-folders:
- Copy the JobScheduler Universal Agent installation file to the
SCHEDULER_DATA/config/
batch_instal
folderl
.
2. Configure the Transfer of the Universal Agent Installation Files and the Agent Installation
Info | ||
---|---|---|
| ||
|
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
folder unpacked in step 1 above.SCHEDULER_DATA
/config/batch_installer
...
- 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
- Hostname
192.11.0202
- Hostname
- SSHAuthentication
- Account sos
- AuthenticationMethodPassword
- Password
********
- Password
- BasicConnection
- SFTPFragment name="
- ProtocolFragments
- Fragments
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 | ||||
---|---|---|---|---|
|
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.
- We recommended that you use the XML Editor to convert configuration files from XML to the
.ini
format (see the XML Editor for converting YADE configuration files (XML) into YADE setting files (.ini) section below for more information). - The following example shows as an example a
.ini
file that has been converted from the XML file above. You can download the example using this link: yade_agent_batch_installer_settings.ini.
Code Block | ||||
---|---|---|---|---|
| ||||
[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 | ||||
---|---|---|---|---|
|
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
folder unpacked in step 1 above.SCHEDULER_DATA
/config/batch_installer
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<?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
andfilter_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.
...
- Sign in to the JOC Cockpit operating interface with a User Account that has the permissions necessary to start a Job.
- Open the "Jobs" view and open the "batch_installer_universal_agent" folder.
- Click on Action symbol (the ellipsis) alongside the AgentBatchInstaller Job and select the Start Task now option.
- This job will create the appropriate Orders for the JobScheduler Master as explained in the description of the Batch Installer Application and start execution of the Job Chain.
- Progress of the installation procedure can be followed either by clicking on the Expand Details button or by opening the same folder in the JOC Cockpit's Job Chains view, clicking on the Action symbol and selecting the Show Job Chain Details menu item.
Excerpt | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
The XML Editor can be used to manage the Batch Installer configuration file and the YADE configuration file. XML Editor for Batch Installer configuration fileAn example Batch Installer configuration file for the installation of a single Agent is shown in the following screenshot: XML Editor for YADE configuration fileAn example YADE configuration file for the installation of a single Agent is shown in the next screenshot:
The "YADE Xml2Ini Converter" function in the XML Editor is available for converting YADE files from XML to the 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 A pop-up window will show every time a change is saved if the option "Show notification on autotransform" is chosen. |