...
The Batch Installer solution is available for the installation and update of the JobScheduler Universal Agent. The Batch Installer It allows installation of any number of Agents on multiple servers across a range of environments.
Article Scope
A general This article provides a detailed description of the configuration and use of this solution. installation of the JobScheduler Universal Agent can be found in the JobScheduler Universal Agent - Installation & Operation article.
In addition, a number of "How to ..." articles are available describing the use of the Batch Installer in different environments. These are linked from the JobScheduler Universal Agent - Batch Installation - Use Cases articleand Update of Agents article.
This article contains reference information for users seeking more detailed information than provided in the batch installation in different environments articles.
Feature Availability
Display feature availability | ||
---|---|---|
|
...
The AgentBatchInstaller
job is responsible for creating the JobScheduler orders for the job chain. Each of these orders is named according to the pattern <host>:<port>
to convey the host and port of the server where each Agent is to be installed.
The Universal Agent Batch Installer Job Chain
The universal_agent_installer
job chain has four job nodes configured in series as follows:
Download the Batch Installer and Agent Files
Windows and Unix versions of the Batch Installer can be downloaded from the SOS Downloads page along with the appropriate Agent version.
The Universal Agent Batch Installer Job Chain
shown in the code block and diagram below:
Job ChainJob Chain: universal_agent_installer.job_chain.xml
...
Code Block | ||||
---|---|---|---|---|
| ||||
<job_chain name="universal_agent_installer"> <job_chain_node state="CheckPreRequisite" job="CheckPreRequisite" next_state="Sync" error_state="error"/> <job_chain_node state="Sync" job="Sync" next_state="TransferInstallationSetup" error_state="error"/> <job_chain_node state="TransferInstallationSetup" job="TransferInstallationSetup" next_state="PerformInstall" error_state="error"/> <job_chain_node state="PerformInstall" job="PerformInstall" next_state="success" error_state="error" on_error="suspend"/> <job_chain_node state="success"/> <job_chain_node state="error"/> </job_chain> |
...
It is recommended that the YADE settings file is specified with the <globals>
element and that the default profile name <host>:<port>
is used. The <installation><transfer>
element is not then required for the installer configuration file.
Parameter | Description | XML |
---|---|---|
settings | the file with the profiles, one for each JobScheduler Universal Agent | installation/transfer/settings |
profile | the name of the profile for the current installation. Default=<host>:<port> | installation/transfer/profile |
file_spec | a regular expression that defines the set of files that should be transfered | installation/transfer/file_spec |
target_host | the host to which the files should be transfered | installation/transfer/target/host |
target_port | the port according to the given protocol, e.g. 21 for the FTP protocol | installation/transfer/target/port |
target_protocol | the protocol with which the installation files will be transfered (FTP, SFTP, file, local) | installation/transfer/target/protocol |
target_user | the user (if required by the protocol) with which the installation files will be transfered | installation/transfer/target/user |
target_password | the password (if required by the protocol) with which the installation files will be transfered | installation/transfer/target/password |
target_dir | the location that the files will be copied to | installation/transfer/target/dir |
target_ssh_auth_method | the authentication method should the SSH protocol be used | installation/transfer/target/auth_method |
target_ssh_auth_file | the authentication file should the the SSH protocol be used and the target_ssh_auth_method parameter be used with the value publickey | installation/transfer/target/auth_file |
source_host | the host from which the installation files should be transfered | installation/transfer/source/host |
source_port | the port according to the given protocol (e.g. 21 when protocol is ftp) | installation/transfer/source/port |
source | the protocol with which the source will be transferred (ftp, sftp, file, local) | installation/transfer/source/protocol |
source_user | the user (if the protocol needs one) with which the source will be transferred | installation/transfer/source/user |
source_password | the password (if the protocol needs one) with which the source will be transferred | installation/transfer/source/password |
source_dir | the location from where the files will be copied | installation/transfer/source/dir |
source_ssh_auth_method | the authentication method if the protocol is ssh. | installation/transfer/source/auth_method |
source_ssh_auth_file | the authentication file if the protocol is ssh and auth_method is publickey | installation/transfer/source/auth_file |
...
- You can define defaults for all elements in the <
globals>
element. - You can use variables for values e.g.
${ssh.host}
. - It is recommended that you specify the name of the YADE settings file in the <
globals>
element and use the default profile name as shown in the example Configuration File below. This will mean that it is not necessary to define<installation><transfer>
elements.
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
#!/bin/sh # Copyright (c) 2015 SOS GmbH, Berlin, Germany. # All rights reserved. export TERM=dumb clear echo "+---------------------------------------------------------+" echo "* JobScheduler Univeral Agent *" echo "* SOS Software- und Organisations Service GmbH *" echo "* Giesebrechtstr. 15 *" echo "* 10629 Berlin *" echo "* ---------------------------------------------- *" echo "* info@sos-berlin.com *" echo "* http://www.sos-berlin.com *" echo "+---------------------------------------------------------+" echo "" echo "" echo "+---------------------------------------------------------+" echo "* This will install JobScheduler Universal Agent now ... *" echo "+---------------------------------------------------------+" # ----------------------------------------------- cd `dirname $0` SETUP_WORKING_DIR=`pwd` SETUP_INSTALL_PATH="" SHOW_EXTRACTED_FILESNAMES=0 SETUP_LOG_FILE="$SETUP_WORKING_DIR/jobscheduler_universal_install.log" SETUP_ERR=0 # ----------------------------------------------------------------- log_write() { case "$1" in 0 ) msg_hint="[info] ";; 1 ) msg_hint="[warning]";; 2 ) msg_hint="[error] ";; 3 ) msg_hint="[fatal] ";; * ) msg_hint="[info] ";; esac timestamp=`date "+%Y-%m-%d %T"` msg="$timestamp $msg_hint $2" echo "$msg" echo "$msg">>"$SETUP_LOG_FILE" } show_usage() { echo "`basename $1` will install the 'JobScheduler Universal Agent' at [install_dir]." echo "install_dir=Path with the JobScheduler Universal Agent" echo echo "Usage: `basename $1` [OPTION]" echo echo "Samples:" echo " `basename $1` -co -d/home/jobscheduler -p4445 " echo echo "Options:" echo " -h, --help | Shows this usage" echo " -s, --show | show all extracted filenames" echo " -w --install_dir | Path of the JobScheduler Universal Agent installation" echo " -p --port | Port of JobScheduler Universal Agent. Default=4445" } # ----------------------------------------------------------------------------usage if [ $# -eq 0 ] then show_usage $0 exit 65 fi # -------------------------------------------- for arg in "$@" do long_opt=0 echo "`expr match $arg '\(..\)'`" case "`expr match $arg '\(..\)'`" in "-h" ) show_usage $0; exit 64;; "-d" ) SETUP_INSTALL_PATH="`expr match $arg '-d\(.*\)'`";; "-p" ) UNIVERSAL_AGENT_PORT="`expr match $arg '-p\(.*\)'`";; "-s" ) SHOW_EXTRACTED_FILESNAMES="`expr match $arg '-d\(.*\)'`";; "--" ) long_opt=1;; esac if [ "$long_opt" -eq 1 ] then case `expr match "$arg" '\(--[^=]*\)'` in "--show_extracted_filenames" ) SHOW_EXTRACTED_FILESNAMES=`expr match "$arg" '--.*=\(.*\)'`;; "--help" ) show_usage $0; exit 64;; "--install_dir" ) SETUP_INSTALL_PATH=`expr match "$arg" '--.*=\(.*\)'`;; "--port" ) UNIVERSAL_AGENT_PORT=`expr match "$arg" '--.*=\(.*\)'`;; esac fi done # --------------- check_dir(){ SETUP_INSTALL_PATH="$1" echo SETUP_INSTALL_PATH="$SETUP_INSTALL_PATH" if [ -d "$SETUP_INSTALL_PATH" ] then if [ -r "$SETUP_INSTALL_PATH" ] then cd "$SETUP_INSTALL_PATH" SETUP_INSTALL_PATH=`pwd` chmod 700 "$SETUP_INSTALL_PATH" 2>/dev/null SETUP_ERR=$? else log_write 2 "$SETUP_INSTALL_PATH is not readable." SETUP_ERR=1 fi else echo create $SETUP_INSTALL_PATH mkdir -m700 -p "$SETUP_INSTALL_PATH" 2>/dev/null SETUP_ERR=$? if [ $SETUP_ERR -eq 0 ] then cd "$SETUP_INSTALL_PATH" SETUP_INSTALL_PATH=`pwd` else log_write 2 "$SETUP_INSTALL_PATH can not create." SETUP_ERR=1 fi fi cd "$SETUP_WORKING_DIR" if [ $SETUP_ERR -ne 0 ] then log_write 2 "You haven't the necessary rights on the installation directory $SETUP_INSTALL_PATH." exit $SETUP_ERR fi } tarx (){ if [ -f "$1.gz" ] then gzip -fd $1.gz fi if [ ! -d "$2" ] then mkdir $2 fi cd $2 tar $tarpar $SETUP_WORKING_DIR/$1 cd $SETUP_WORKING_DIR } tarpar="-xf " if [ "$SHOW_EXTRACTED_FILESNAMES" = "1" ] then tarpar="-xvf " fi SETUP_INSTALL_PATH="$SETUP_INSTALL_PATH" echo SETUP_INSTALL_PATH=$SETUP_INSTALL_PATH check_dir $SETUP_INSTALL_PATH # Installing log_write 0 "Installing --> $SETUP_INSTALL_PATH" tarx jobscheduler_unix_universal_agent.tar $SETUP_INSTALL_PATH if [ -z "$UNIVERSAL_AGENT_PORT" ] then $UNIVERSAL_AGENT_PORT=4445 fi mv `dirname $0`/jobscheduler_agent_$UNIVERSAL_AGENT_PORT.sh $SETUP_INSTALL_PATH/jobscheduler_agent/bin chmod a+x $SETUP_INSTALL_PATH/jobscheduler_agent/bin/jobscheduler_agent_$UNIVERSAL_AGENT_PORT.sh log_write 0 "Start JobScheduler Universal Agent" log_write 0 $SETUP_INSTALL_PATH/jobscheduler_agent/bin/jobscheduler_agent_$UNIVERSAL_AGENT_PORT.sh start $SETUP_INSTALL_PATH/jobscheduler_agent/bin/jobscheduler_agent_$UNIVERSAL_AGENT_PORT.sh start 1 > /dev/null exit $?$? |
Anchor | ||||
---|---|---|---|---|
|
The installer configuration file contains an <installation>
element for each JobScheduler Universal Agent instance.
...
Code Block | ||
---|---|---|
| ||
<command>echo ${ssh.sudo_password} | sudo cp ${install_path}/bin/jobscheduler_agent.sh /etc/init.d/jobscheduler</command> |
Anchor | ||||
---|---|---|---|---|
|
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.
Find more details from our XML Editor article.
- After downloading the XML Editor, extract the zip file, then start the "
sos.xml.editor.exe
" file. (The XML Editor runs on Windows systems and does not need to be installed.) - Open your installer configuration file in the Editor and assign the XSD
scheduler_universal_agent_installations.xsd
schema.
...
- Specify the name of the YADE settings file with the
<globals><settings>
element. - Open the YADE settings file or create a new one.
- Assign the XSD Schema http://www.sos-berlin.com/schema/yade/YADE_configuration_v1.0.xsd
- Add a
<ProtocolFragments>
element and nodes for each host that you want to install the JobScheduler Universal Agent for. - Add a
<Profile>
element and nodes for each host you want install the JobScheduler Universal Agent for. - The default
profile_id
is<host>:<port>
. If you do not use the default then you have to specify the profile name in the installer configuration file.
Change Management References - Batch Installation
Jira | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|