Synopsis
Description
Starts the controller service that provides the Admin API for managing Amp operations. The controller runs as a standalone service separate from query servers, enabling independent deployment and scaling of management operations. Default port: 1610 (Admin API) The controller provides endpoints for dataset management, job control, worker coordination, and file operations. It runs continuously until terminated (Ctrl+C or kill signal).Responsibilities
| Responsibility | Description |
|---|---|
| Admin API | RESTful management interface on port 1610 |
| Job Management | Create, monitor, and stop extraction jobs |
| Worker Registry | Track worker heartbeats and status |
| Dataset Registry | Manage dataset definitions and versions |
Configuration
Controller settings are configured in the TOML config file:Configuration Fields
Admin API server binding address and port
Environment Override
Directory Configuration
ampd controller requires --config (or AMP_CONFIG) to be provided. Default data, providers, and manifests directory paths are resolved relative to the config file’s parent directory only when the config file does not specify those paths.
When the config file specifies data_dir, providers_dir, or manifests_dir, those values are used directly.
This command does not create directories itself; it relies on the configured paths and any downstream components to create or validate storage locations as needed.
Admin API Endpoints
The controller exposes a RESTful API on port 1610:| Endpoint | Description |
|---|---|
/datasets | Dataset management |
/jobs | Job control and monitoring |
/workers | Worker status and health |
/locations | Storage locations |
/providers | Data source configuration |
Examples
Start Controller
Using Environment Variables
Custom Admin Port
Admin API Usage
List Datasets
Deploy a Dataset
List Jobs
Check Worker Status
Create Extraction Job
Stop a Job
Deployment Patterns
Production Deployment
In production, the controller runs independently from query servers:- Independent scaling of admin operations
- Fault isolation between components
- Separate resource allocation
Development
For local development, use solo mode which includes the controller:Health Monitoring
Check Controller Health
Monitor Worker Heartbeats
The controller tracks worker heartbeats and marks workers as unhealthy if heartbeats stop:Job Scheduling
The controller orchestrates extraction jobs:- Receive job request via Admin API
- Resolve dependencies between datasets
- Divide work into block ranges
- Assign jobs to available workers via LISTEN/NOTIFY
- Track progress through worker updates
- Handle failures with automatic retry logic
Exit Codes
Controller shut down gracefully
Error occurred during controller operation or configuration is invalid
See Also
- ampd overview - Command overview and global options
- ampd worker - Worker coordination and job execution
- ampd solo - Development mode with embedded controller