Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces distributed mode support by refactoring configuration, adding new binaries for orchestrator and worker processes, and extending the API and database to support worker registration and image listing by worker. The changes enable the system to run in a multi-worker setup, where an orchestrator manages worker nodes that execute Docker operations.
Distributed Mode & Process Separation
cmd/orchestrator/main.gofor orchestrator andcmd/worker/main.gofor worker, each with their own configuration, startup routines, and graceful shutdown logic. Workers can self-register and deregister with the orchestrator, and the orchestrator manages a registry of active workers. [1] [2]Config(all-in-one),WorkerConfig(worker), andOrchestratorConfig(orchestrator), each with dedicated loading functions. [1] [2]Database & Repository Enhancements
Workermodel and related CRUD operations, including support for tracking active workers and associating sandboxes with specific workers. [1] [2] [3]API Extensions
/imagesendpoint to support filtering by worker ID via aworker_idquery parameter; added theWorkerImageListerinterface to allow distributed image listing.worker_idparameter for image listing and the newnamefield for pre-generated container names used by orchestrator-to-worker communication. [1] [2] [3] [4] [5] [6]Dependency Injection & Integration Test Updates
docker.WithRepository,docker.WithHostIP) for clarity and flexibility in distributed mode. [1] [2]These changes lay the foundation for running the application in both all-in-one and distributed orchestrator/worker modes, improving scalability and flexibility.