JAMS 6.x Help
JAMS Agentd for Linux/Unix

Introduction

Agents allow users to define specific actions that can run locally or remotely throughout a JAMS network. By default, JAMS can only run Jobs and Setups on the primary engine. Agents allow users to extend that capability to run Jobs on a variety of different environments. For example, by deploying JAMS Agents, a single JAMS Scheduler can execute tasks on many systems.

The JAMS Agentd is a version of the JAMS Agent which runs as a background process on Linux/Unix machines. This topic details how to install this unique Agent to your primary machine.

NOTE: JAMS Jobs running on Agentd Agents must use either the UnixScript or UnixShell Execution Methods.

Installing the Agent

  1. To get started, select the appropriate jams-agentd package (either the .rpm [Red Hat packages] or .deb [Debian packages]) from the JAMS download site at: http://download.jamsscheduler.com/repo/ and install it on your Linux system as root. This will create the /etc/jams.d/jams-agentd.config setup file using the default settings and should also automatically start the daemon. JAMS AgentD must be installed as root. To run JAMS AgentD as a user, refer to the Running JAMS AgentD as a Non-Root User section on this page.       

 

Debian Packages

 

Red Hat Packages

 

The jams-agentd daemon can be started and stopped using the chkconfig command on Red Hat-derived systems and with the invoke-rc.d command on Debian-derived machines.

Note: Making any modifications to the config file will require a daemon restart. The config file includes comments describing the various available options.

Running JAMS AgentD as a Non-Root User

Normally, jams-agentd will run as root in order to allow it to authenticate and run Jobs as other users. However, it can also be run as a non-root user by disabling the root services for jams-agentd.

In this mode, all Jobs will be run as the executing user, irrespective of the requested user name for that Job. The config file and all working directories are then located in the jams directory on the user’s home directory.

To run jams-agentd to run as a non-root user, the following steps must be performed:

  1. Install JAMS AgentD as root using the installation instructions above
  2. Stop and disable the root service as root
    Disable Run as Root for AgentD
    Copy Code
    jams-agentd --kill-daemon
    jams-agentd --remove-service
    
  3. Become the user that will run jams-agentd
  4. Run the following commands:
    Run jams-agentd as non-root
    Copy Code
    # create a directory for JAMS
    mkdir ~/jams
    # create the specified conf file based on the user
    jams-agentd -C ~/jams/jams-agentd.config
    # read and modify jams-agentd.config for your environment
    # Check the listening port, as non-root users cannot listen on ports less than 1024
    #Start jams-agentd daemon
    edit the .conf file
    jams-agentd -d
    # jams-agentd will create all other directories it needs to run as a non-root user
    
  5. To stop running jams-agentd as the user:
    Stop the Installer
    Copy Code
    jams-agentd -K
    
  6. Ensure that jams-agentd is started every time the system restarts.
NOTE: It may be necessary to use the full pathname for the daemon when executed by a non-root user.

Public Key Authentication

As of JAMS version 6.3.7, PUBLIC-KEY is a valid user_authentication option in the config file, but will only work with JAMS v. 6.4.26 or later.

PAM Support

Currently, the PAM support needs to have a PAM configuration file for jams-agentd. This is expected to be in the /etc/pam.d directory. When installing jams-agentd, the installer will attempt to create this file by copying the file for sshd with certain edits.

The PAM support only uses auth and account parts. No password updates are possible, nor is a session used.

It should be possible to authenticate with SSH using PAM (with the pam_ssh.so module), but this is not the same as the PUBLIC-KEY authentication. In this case, the JAMS User would need to have a Password that unlocks the Private Key on the target machine, but not a Key Management setting.

Sample Code

Options

Option Description
-c-config-file <config_file> Use an alternate configuration file
-d/--daemon-mode Fork/exit the program to run in the background
-l--log-level <level> Set the logging lvel to ERROR, WARN, INFO, DEBUG, or TRACE
-p/--port-number <port> Listen on alternate port

Commands

Command Description
-c/-config-file <config_file/-> Create config_file with default settings or send to standard out
-I/-install-service Install jams-agentd as an auto-started service
-K/-kill-daemon Kill running daemon
-P/-pam-file <pam_file> Create pam configuration file for jams-agentd or send to standard out
-Q/-query-status Test if the daemon is currently executing
-R/-remove-service Remove the auto-started jams-agentd service
-S/-service-file <service_file/-> Create service start-up script or send to standard out
-U/-update-config <config_file> Update an existing config-file with new configuration settings
-V/-version Print the current version

See Also

JAMS Client Features

 

 


Topic updated: 10/25/2017
©2017 MVP Systems Software, Inc. All Rights Reserved.

Send comments on this topic.