Skip to main content

Local Mode Quick Start

Get your first pipeline running locally in 5 minutes—no cloud connection required.

Prerequisites


Step 1: Start Edge in Local Mode

expanso-edge run --local

You'll see output like:

INFO Local mode enabled - no orchestrator connection required
INFO API server starting on http://localhost:9010
INFO Ready to accept jobs via API

The edge node is now running and ready to accept pipeline jobs on port 9010.


Step 2: Create a Simple Job

Create hello-job.yaml:

name: hello-world
description: Simple hello world pipeline
type: pipeline
config:
input:
generate:
count: 5
interval: "1s"
mapping: |
root.message = "Hello from pipeline!"
root.timestamp = now()
root.count = count("messages")

pipeline:
processors: []

output:
stdout:
codec: lines

Step 3: Submit the Pipeline

In a new terminal, configure the CLI to point to your local edge, then submit the pipeline:

# Point CLI to local edge
export EXPANSO_CLI_ENDPOINT=http://localhost:9010

# Deploy the job
expanso-cli job deploy hello-job.yaml

You should see:

✓ Job deployed successfully
Job ID: job-abc123

Step 4: Monitor the Job

Watch the output in the terminal where expanso-edge is running. You'll see:

{"message":"Hello from pipeline!","timestamp":"2024-11-01T12:00:00Z","count":1}
{"message":"Hello from pipeline!","timestamp":"2024-11-01T12:00:01Z","count":2}
{"message":"Hello from pipeline!","timestamp":"2024-11-01T12:00:02Z","count":3}
{"message":"Hello from pipeline!","timestamp":"2024-11-01T12:00:03Z","count":4}
{"message":"Hello from pipeline!","timestamp":"2024-11-01T12:00:04Z","count":5}

🎉 Success! You've run your first pipeline in local mode.


What's Next?

Now that you have local mode running:

Common Next Steps

  1. Try More Examples - Explore file processing, HTTP webhooks, and data transformations
  2. Build Your Own Pipeline - Modify the example to process your data
  3. Test Before Production - Use local mode to validate pipelines before deployment
  4. Deploy to Production - Move to Expanso Cloud when ready

Quick Tips

Fast Feedback: Local mode starts instantly—no bootstrap, no credentials needed.

Environment Variable: Set EXPANSO_CLI_ENDPOINT once, use it for all commands:

echo 'export EXPANSO_CLI_ENDPOINT=http://localhost:9010' >> ~/.bashrc

Clean State: Stop edge (Ctrl+C), remove ./data directory, restart fresh.

Debug Logging: See what's happening inside:

expanso-edge run --local --log-level debug