Skip to content

Joblet is a micro-container runtime for running Linux jobs with: Process and filesystem isolation (PID namespace, chroot) Fine-grained CPU, memory, and IO throttling (cgroups v2) Secure job execution with mTLS and RBAC Built-in scheduler, SSE log streaming, and multi-core pinning Ideal for: Agentic AI Workloads (Untrusted code)

License

Notifications You must be signed in to change notification settings

ehsaniara/joblet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Joblet / RNX - Secure Linux Process Execution Platform

Tests Go Report Card License: MIT

Joblet is a secure Linux job execution platform that simplifies running isolated processes with comprehensive resource management. It handles process isolation, resource limits, GPU acceleration, and monitoring automatically, letting you focus on your applications rather than infrastructure complexity.

Complete Documentation: /docs/README.md

Provides sandboxed code execution with GPU support, resource controls, and complete process isolation for AI workloads.

Key Capabilities

  • πŸ”’ Isolation: Run in secure sandboxes, separate namespaces, preventing interference between workloads
  • ⚑ GPU Acceleration: Native NVIDIA GPU support with automatic CUDA env. setup for AI/ML workloads
  • πŸŽ›οΈ Resource Management: CPU, memory, I/O, and GPU resource limits with fine-grained control
  • 🌐 Network Isolation: Networking options from full isolation to custom networks for secure communication
  • πŸ’Ύ Storage Solutions: Persistent volumes for data retention and temporary storage with automatic cleanup
  • ⏰ Job Scheduling: Execute jobs immediately, schedule for specific times, or set delayed execution
  • πŸ›‘οΈ Enterprise Security: mTLS encryption with certificate-based authentication and role-based access control
  • 🐍 Runtime Environments: Build Python ML, Java, and custom runtime environments from declarative YAML specifications

Getting Started

☁️ Cloud Deployment: Joblet can be deployed directly on AWS EC2 with automated installation DynamoDB and CloudWatch integration. See the AWS Deployment Guide for one-click deployment with user data scripts.

A. Joblet Server Installation (Linux)

Option 1: Package Installation (Ubuntu/Debian)

# Download and install the latest release
wget $(curl -s https://api.github.com/repos/ehsaniara/joblet/releases/latest | grep "browser_download_url.*_amd64\.deb" | cut -d '"' -f 4)
sudo dpkg -i joblet_*_amd64.deb

# Start the service
sudo systemctl start joblet
sudo systemctl enable joblet

Option 2: Manual Installation (Any Linux Distribution)

# Download and extract the release
curl -L -o rnx-linux-amd64.tar.gz $(curl -s https://api.github.com/repos/ehsaniara/joblet/releases/latest | grep "browser_download_url.*linux-amd64.tar.gz" | cut -d '"' -f 4)
tar -xzf rnx-linux-amd64.tar.gz
cd rnx-linux-amd64

# Run the installation script
sudo ./install.sh
sudo systemctl start joblet

B. RNX Client Installation (Cross-Platform)

macOS (Homebrew)

# Add the Joblet tap
brew tap ehsaniara/joblet https://github.com/ehsaniara/joblet
brew install rnx              # Installs RNX CLI

# Copy configuration from server
scp user@joblet-server:/opt/joblet/config/rnx-config.yml ~/.rnx/

Windows

# Download the Windows binary
Invoke-WebRequest -Uri "https://github.com/ehsaniara/joblet/releases/latest/download/rnx-windows-amd64.exe" -OutFile "rnx.exe"

# Add to PATH
New-Item -ItemType Directory -Force -Path "$env:USERPROFILE\bin"
Move-Item rnx.exe "$env:USERPROFILE\bin\"
[Environment]::SetEnvironmentVariable("Path", $env:Path + ";$env:USERPROFILE\bin", [EnvironmentVariableTarget]::User)

# Copy configuration from Joblet server to %USERPROFILE%\.rnx\rnx-config.yml

C. Verify Installation

# Test the connection and run your first job
rnx job list                           # List current jobs
rnx job run echo "Hello from Joblet!" # Execute a simple test job
rnx monitor status                     # Check server health

D. Python SDK Usage (Alternative to CLI)

# Install: pip install joblet-sdk
from joblet import JobletClient

with JobletClient(host="your-joblet-server") as client:
    # Run a job programmatically
    job = client.jobs.run_job(
        command="echo",
        args=["Hello from Python!"],
        name="python-job"
    )
    print(f"Job started: {job['job_uuid']}")

πŸš€ Usage Examples

YAML Workflows (Recommended for Complex Jobs)

# Execute pre-configured workflows
rnx workflow run jobs.yaml:ml-analysis      # Python ML analysis
rnx workflow run jobs.yaml:hello-joblet     # Java application
rnx workflow run ml-pipeline.yaml           # ML pipeline with GPU support

# Monitor execution status
rnx job status <job-uuid>
rnx workflow status <workflow-uuid>

Command Line Interface

# Basic job execution with resource isolation
rnx job run echo "Hello World"
rnx job run --max-cpu=50 --max-memory=512 python3 script.py

# Build and use runtime environments
rnx runtime build ./examples/python-3.11-ml/runtime.yaml   # Build Python ML runtime
rnx runtime build ./examples/java-21/runtime.yaml          # Build Java 21 runtime
rnx job run --runtime=python-3.11-ml python analysis.py    # Use Python ML runtime
rnx job run --runtime=openjdk-21 java App.java             # Use Java runtime

# GPU acceleration for compute-intensive workloads
rnx job run --gpu=1 --gpu-memory=8GB python train_model.py
rnx job run --gpu=2 --runtime=python-3.11-ml python distributed_training.py

# File uploads and environment configuration
rnx job run --upload=data.csv --upload=script.py python3 script.py

# Environment variables (visible and secure)
rnx job run --env=NODE_ENV=production node app.js
rnx job run --secret-env=API_KEY=secret python app.py       # Hidden from logs

# Network isolation modes
rnx job run --network=none secure_task.sh                   # No network access
rnx job run --network=isolated wget https://api.com         # External access only
rnx job run --network=bridge api_server.py                  # Inter-job communication

# Persistent storage management
rnx volume create mydata --size=1GB
rnx job run --volume=mydata python3 process_data.py

# Job scheduling options
rnx job run --schedule="1hour" backup.sh
rnx job run --schedule="2025-12-25T00:00:00" maintenance.py

🎨 Web Administration Interface

The Joblet Admin UI is available as a standalone package at joblet-admin repository:

  • System Monitoring: Real-time CPU, memory, disk, and network metrics with visual dashboards
  • Job Management: Comprehensive job listing, filtering, control, and log streaming capabilities
  • Workflow Visualization: Interactive dependency graphs and execution timelines
  • System Administration: Intuitive volume, network, and runtime environment management
  • Direct gRPC: Connects directly to Joblet server via gRPC

To use the admin interface:

# Clone the joblet-admin repository
git clone https://github.com/ehsaniara/joblet-admin
cd joblet-admin

# Install and run
npm install
npm run dev

# Access at http://localhost:3000

Learn more: See the Admin UI Documentation

System Requirements

Joblet Server (Linux)

  • Operating System: Linux kernel 4.6+ (Ubuntu 18.04+, CentOS 8+, or equivalent distributions)
  • Hardware: Multi-core CPU, 1GB+ RAM, 5GB+ disk space (scales with workload)
  • Network: Port 50051 accessible for gRPC communication
  • Privileges: Root access required for namespace and cgroup management
  • Dependencies: cgroups v2, iptables, iproute2, bridge-utils (standard on most distributions)
  • GPU Support: NVIDIA drivers (optional, required only for GPU workloads)

RNX Client (Cross-Platform)

  • Operating Systems: Linux, macOS 10.15+, Windows 10+
  • Resources: Minimal - 50MB+ RAM, network connectivity to server port 50051
  • Distribution: Single binary executable with no additional dependencies

Documentation

Related Projects

Developing a custom client? Start with the protocol definitions to generate language-specific bindings.

License

MIT License - see LICENSE file for details.

About

Joblet is a micro-container runtime for running Linux jobs with: Process and filesystem isolation (PID namespace, chroot) Fine-grained CPU, memory, and IO throttling (cgroups v2) Secure job execution with mTLS and RBAC Built-in scheduler, SSE log streaming, and multi-core pinning Ideal for: Agentic AI Workloads (Untrusted code)

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Languages