Categories

Versions

You are viewing the RapidMiner Server documentation for version 9.7 - Check here for latest version

Job Agents

RapidMiner Job Agent is the consumer endpoint application for the scaled execution of jobs. It starts and manages execution environments, handles their logs and distributes information across these execution instances. Being a CLI application, you can simply download, unpack and start the agent from the command line of your operating system.

Installation

Obtain an Agent

Job Agents are tied to one execution queue (See Administration > Process execution queues) and can be downloaded from the queue configuration page on server by clicking Install. Each agent is pre-configured based on the queue it was downloaded for. For example, if you download an agent from the link provided under DEFAULT queue, that agent will connect to server and fetch jobs from that queue.

Download a Job Agent

By clicking on the Install link of a given queue, a modal window with preconfigured Job Agent download options and additional instructions will appear. To directly download the Job Agent to your local disk, press the button Download the preconfigured Job Agent.

Or, you prefer to download the Job Agent via a command line interface, take the following steps:

  • SSH to the machine on which the Job Agent will run
  • Obtain a token (value of the idToken) that will grant you permission to download the Job Agent

    curl -u USERNAME:PASSWORD http(s)://<rapidminer_server_address>:<port>/api/rest/tokenservice
    
  • Download the ZIP for a queue's QUEUENAME. The default queue is named DEFAULT. Note that queue names are case sensitive.

    curl -H "Authorization: Bearer ID_TOKEN_FROM_REQUEST_ABOVE" http(s)://<rapidminer_server_address>:<port>/executions/queues/QUEUENAME/agent --output /path/to/save/location/JobAgent.zip
    

Unzip the Downloaded Job Agent archive

Unzip the archive via the command line as follows:

unzip job-agent-QueueName.zip -d rapidminer-jobagent-9.1.0/

Optionally customize the Job Agent

The Job Agent you just downloaded is already configured. However, if you wish to adjust the default settings please visit the Job Agent Administration page for more information.

Run

To run the agent, execute the bin/rapidminer-jobagent. This will start the agent by setting:

  • the base directory (baseDir) of the agent to the current root of the distribution package
  • the home directory (homeDir) either to {baseDir}/home or in case of the bundled job agent to {rapidminer-server-home}/job-agent-home
  • the configuration directory to {homeDir}/config/
  • the agent's persistent storage's directory to {homeDir}/data/
  • the extensions directory to {homeDir}/resources/extensions/
  • the custom libraries directory to {homeDir}/resources/libs/
  • the used Job Container engine to the jar file located in {baseDir}/lib/container/

Stop Agent

To stop the agent, you can use the stop script bin/stop-job-agent. This script will forcibly shut down all your running jobs and the agent itself.

Make sure the user who is executing the stop script is allowed to stop the Job Agent process, e.g. stopping the Job Agent of the Windows Service will require admin rights.

To stop the agent-bundled Job Agent go to the job-agent/ folder in the RapidMiner Server base directory and run the bin/stop-job-agent from there.