Categories

Versions

You are viewing the RapidMiner Server documentation for version 9.1 - 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. You can either Click on Download the preconfigured Job Agent button to directly download the Job Agent on to your local disk.

Or, if you prefer to download the Job Agent via the command line interface, please do the following:

  • 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

You can do that in a command line interface by executing this:

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 configuration directory to {baseDir}/home/config/
  • the agent's persistent storage's directory to {baseDir}/home/data/
  • the extensions directory to {baseDir}/home/resources/extensions/
  • the custom libraries directory to {baseDir}/home/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.