...
Universal Agent Batch Installer Job Chain
Job Chain: universal_agent_installer.job_chain.xml
The job chain makes use of the following configuration:
...
CheckPreRequisite
- Checking for the correct Java version
- Checking whether JobScheduler Universal Agent already has been installed.
- If so
- shutting down a possibly running instance
- remove the installation
- If so
TransferInstallationSetup
: To transfer the installer files to the host- Before the transfer starts, the preprocessor will create the instance start script from the template
jobscheduler_agent_instance_script.txt
The files that will be transfered are specified with the configuration element <globals><transfer><file_spec=".*\.(sh|gz)$">
- With this regular expression, the following files will be transfered:
- the JobScheduler Universal Agent installer files:
jobscheduler_unix_universal_agent.1.11.0-SNAPSHOT.tar.gz
- the instance start script:
jobscheduler_agent_<port>.sh
- the installation script:
jobscheduler_universal_agent_install.sh
- the JobScheduler Universal Agent installer files:
- Before the transfer starts, the preprocessor will create the instance start script from the template
PerformInstall
: To start the installation using SSH.- The step before transfered installation script will be executed
- The installation script will install and start the JobScheduler Universal Agent
- Finally the postprocessing commands will be executed
- The postprocessing commands are stored with the element
<installation><postprocessing><command>
- Three commands will be executed
- if you have more than three commands, please add the call in the job
PerformInstall
- if you have more than three commands, please add the call in the job
- The default commands will setup the autostart for JobScheduler Universal Agent on a Linux server (Ubuntu distribution)
echo ${ssh.sudo_password} | sudo -S cp ${install_path}/bin/jobscheduler_agent.sh /etc/init.d/jobscheduler
echo ${ssh.sudo_password} | sudo -S update-rc.d jobscheduler defaults
- The postprocessing commands are stored with the element
Job Parameters
All jobs have access to the following parameters. These parameters are used for the JobScheduler Universal Agent instance start script.
...
Parameter | Description | XML |
---|---|---|
agent_options.scheduler_ip_address | The IP address of the JobScheduler Universal Agents host | installation/agent_options/scheduler_ip_address |
agent_options.scheduler_http_port | The port of the JobScheduler Universal Agent | installation/agent_options/scheduler_http_port |
agent_options.java_home | installation/agent_options/java_home | |
agent_options.java_options | installation/agent_options/java_options | |
agent_options.scheduler_home | If SCHEDULER_HOME is not set, the default will be used. Default: install_path + "/jobscheduler_agent" | installation/agent_options/scheduler_home |
agent_options.scheduler_user | installation/agent_options/scheduler_user | |
agent_options.scheduler_log_dir | installation/agent_options/scheduler_log_dir | |
agent_options.scheduler_kill_script | installation/agent_options/scheduler_kill_script | |
agent_options.scheduler_pid_file_dir | installation/agent_options/scheduler_pid_file_dir | |
host | The SSH IP address of the JobScheduler Universal Agents host | installation/ssh/host |
port | The SSH port of the JobScheduler Universal Agent | installation/ssh/port |
user | The SSH user of the JobScheduler Universal Agent | installation/ssh/user |
auth_method | The SSH authentication method of the JobScheduler Universal Agent | installation/ssh/auth_method |
auth_file | The SSH authentication file of the JobScheduler Universal Agent | installation/ssh/auth_file |
password | The password for the SSH user | installation/ssh/password |
sudo_password | The sudo password for the SSH user | installation/ssh/sudo_password |
install_path | The folder to which the JobScheduler Universal Agent will be installed | installation/install_path |
Job: TransferInstallationSetup
More detailed explanations of the parameters are available with the YADE - Documentation.
...
settings | the file with the profiles, one for each JobSchedule Universal Agent | installation/transfert/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 wich the installation files will be transfered | installation/transfer/target/user |
target_password | the password (if required by the protocol) with wich 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 wich the source will be transered (ftp, sftp, file, local) | installation/transfer/source/protocol |
source_user | the user (if the protocol needs one) with wich the source will be transered | installation/transfer/source/user |
source_password | the password (if the protocol needs one) with wich the source will be transered | 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 |
Job: PerformInstall
More detailed explanations of the parameters are available with the JITL SSH job documentation
...
The update/installation procedure will be started by running the job AgentBatchInstaller
.
The
...
Job AgentBatchInstaller
The job AgentBatchInstaller
reads the input installer configuration file and creates orders for each element <installation>
.
The element <installation>
defines the source and the target of the installation installer files, the port for the JobScheduler Universal Agent and the SSH connection parameters. Please note:
- For all elements you can define defaults in the <
globals>
element. - You can use variables for the values e.g.
${ssh.host}
. - It is recommended to specify the file name of the YADE settings file in the <
globals>
element and to use the default profile name. When doing so, no<installation><transfer>
elements are required.
Job Parameters
Parameter | Description | Example |
---|---|---|
installation_definition_file | The XML file that contains all parameters for the batch installation | c:\batch\batchinstall.xml |
filter_install_host | A host name if only one order should be created that matches the given host | myAgent |
filter_install_port | A port if only one order should be created that matches the given host |
|
installation_job_chain | The name of the job chain for which the orders should be created | /batch_install_universal_agent/universal_agent_installer |
update | If true then an order for all If false then an order for | true |
...