The Runner service is a core component responsible for executing evolutionary algorithms. This guide explains how to set up and run the runner service locally using Docker, integrated with the rest of the operational stack.
Before running the runner, you must have the full operations stack up and running. This includes databases, authentication, and other microservices.
-
Clone the Operations Repository:
git clone https://github.com/Evolutionary-Algorithms-On-Click/operations.git
-
Follow the Docker Setup Instructions: Navigate to the
operations/dockerdirectory and follow the README instructions to start all services.Ensure you run:
docker compose up -d
This will start all containers, including a pre-built version of the runner.
To develop or test changes in the runner repository, you need to replace the pre-built runner container with your local code.
Since the operations docker-compose starts a runner container, you must stop it to avoid port conflicts and ensure your local version connects instead.
docker stop runnerThe docker-compose.yml in this repository is pre-configured to connect to the services running from the operations stack (using host.docker.internal for cross-container communication).
Key Environment Variables:
COCKROACHDB_URL,REDIS_URL: Connect to databases via host networking.MINIO_URL: Connects to the object storage.WEBSOCKET_LOG_URL: For real-time logging.
Ensure your local .env or the default values in docker-compose.yml match the credentials set in your operations setup (e.g., MINIO_ACCESS_KEY, MINIO_SECRET_KEY).
Run the runner using the localized docker-compose.yml. This builds the image from your current source code.
# Build and start the runner
docker compose up --buildYou should see logs indicating the runner is starting and connecting to Redis/CockroachDB.
The following diagram illustrates how the Runner interacts with other operational services:
graph TD
subgraph Operations Stack
DB[(CockroachDB)]
Redis[(Redis)]
MinIO[(MinIO)]
Auth[Auth Service]
Controller[Runner Controller]
end
subgraph Local Development
Runner[Runner Service]
end
Runner -->|Fetch Tasks| Redis
Runner -->|Store Results| DB
Runner -->|Load/Save Artifacts| MinIO
Runner -.->|Report Status| Controller
style Runner fill:#f9f,stroke:#333,stroke-width:2px
style Operations Stack fill:#e1f5fe,stroke:#01579b