Unmeshed Logo

Command Runners (Agents)

Linux Agent Installation Guide

This document shows how to install and manage the Linux agent for Unmeshed Job Scheduling Platform. The agent is a Go-based application which runs natively on Linux machines and executes the scheduled jobs as configured on the Unmeshed Platform. The integration between agent and Unmeshed platform is protected by an access key and secret and happens over an HTTPS connection.

Prerequisites

Unmeshed CLI

To add an agent, we require the installation of Unmeshed CLI. You can find the guide here.

The CLI includes commands to install and manage agents:

  • agent-info — Show configuration and service status for an installed agent.
  • install-agent — Install the Unmeshed agent.
  • list-agents — List all locally installed Unmeshed agents.
  • uninstall-agent — Uninstall a local Unmeshed agent.
  • update-agent — Update an installed Unmeshed agent.

Installation

Run the following commands and follow the prompts to complete the agent installation. It will download the required files automatically and place them in your selected folder.

bash

To uninstall the agent, you can use the CLI

bash

The CLI has other commands that can list agents installed in the host. You'd only need a single agent installation typically, but if you need to install multiple agents for any reason, the CLI supports this in its prompts.

Configuration

Step 1: Update unmeshed.properties

All configuration lives in unmeshed.properties inside your install directory. Update these values before starting the service:

  • Edit <install directory>/unmeshed.properties to set UNMESHED_AUTH_ID, UNMESHED_AUTH_TOKEN, and UNMESHED_ENGINE_URL.
  • Configure worker names using namespace:name:maxParallelExecutions, for example:
text

Configuration Parameters (for unmeshed.properties)

PropertyDescription
UNMESHED_AUTH_IDGenerated from the Unmeshed platform when you create a client application.
UNMESHED_AUTH_TOKENGenerated from the Unmeshed platform when you create a client application.
UNMESHED_ENGINE_URLHTTPS URL for the Unmeshed server the agent should connect to.
BASH_WORKER_NAMESComma-separated list of bash worker definitions in the format namespace:name:maxParallelExecutions. Each entry sets the namespace, worker name, and max parallel executions.
HTTP_WORKER_NAMESComma-separated list of HTTP worker definitions in the format namespace:name:maxParallelExecutions.
UNMESHED_WORK_RESPONSE_BATCH_SIZENumber of work responses batched before sending to the platform; increase to reduce network chatter, decrease for lower latency. Default: 50.
MAX_STEP_TIMEMaximum allowed time (in milliseconds) for a single step to run before timing out. Default: 36000000.
MAX_WORKERSUpper limit on concurrently running workers across this agent. Default: 100.

Step 2: Load and start the service

After saving unmeshed.properties, start or restart the agent service so it loads the new configuration.

Step 3: Check logs

Logs are written in the install directory:

  • monitor.log — control process log
  • unmeshedagent.out — main agent log

You should see a startup line like this (with no errors following):

Verification

  • Configure and run a process that targets one of the worker names you set (e.g., default:bash.agent.on.server1) to confirm jobs land on this agent. If another agent with the same worker name is running elsewhere, the job may route there instead.
  • Check unmeshedagent.out (in the install directory) as described in Step 3 to confirm startup and execution without errors.

Operating the Unmeshed Agent

Service Management Commands

bash

Troubleshooting

Common Issues

  1. Agent cannot connect to Unmeshed platform:

    • Verify network connectivity: ping <your-unmeshed-server>
    • Check authentication credentials in unmeshed.properties
    • Verify firewall settings
  2. Permission denied errors:

    • Ensure the service user owns the <directory used in installation> directory
    • Check file permissions: chmod +x <directory used in installation>/<binaries>

Security Considerations

  1. File Permissions: Ensure only authorized users can access the agent configuration files
  2. Network Security: Use HTTPS connections to the Unmeshed platform
  3. Authentication: Keep your auth ID and token secure and rotate them regularly
  4. Service User: Run the service with minimal required privileges
  5. Firewall: Configure firewall rules to allow only necessary outbound connections

Concurrency Settings

Set concurrency per worker directly in BASH_WORKER_NAMES and HTTP_WORKER_NAMES using the maxParallelExecutions value in each entry. Increase or decrease that number based on CPU cores and workload. Use MAX_WORKERS to cap the total concurrent workers on this agent. Example:

properties

Batch Processing

Optimize network communication:

yaml

FAQs & Notes

  1. Service Auto-restart: The systemd service is configured to automatically restart if the process crashes
  2. Log Rotation: Consider implementing log rotation for long-running deployments
  3. Monitoring: Set up monitoring for the service status and resource usage
  4. Backup: Regularly backup your processes.yaml configuration file
  5. Updates: Keep your Linux system updated for security patches
  6. Resource Monitoring: Monitor CPU, memory, and disk usage during operation