How phonepe/drove-orchestrator works
Project Type and Purpose
• This is a container orchestrator that manages containerized applications. It uses a set of microservices (e.g., controller, executor, gateway) coordinated via Zookeeper.
• The orchestration system also supports deployment, scaling, and management of apps (as seen from the commands to deploy an app via the CLI and scaling instructions).
Key Components
• External Clients:
• End Users accessing the UI through their browsers (pointing to drove.local:7000).
• The CLI tool (drove-cli and epoch-cli) that developers use to create, scale, or destroy applications.
• Core Services:
• Drove Controller – the central component (running on port 4000) that likely manages state and orchestrates tasks.
• Executor – responsible for carrying out task operations (running on port 3000).
• Drove Gateway (via nginx) – exposing the UI/API on port 7000.
• Zookeeper – used as a coordination backend (running on port 2181).
• Ancillary Services:
• coredns-drove – possibly the custom DNS service to help with service discovery inside the orchestrator.
• “compose” configuration used to spin up a demo cluster for quick deployment.
• Documentation/Support Directories:
• The docs folder provides detailed API and operations documentation. While not part of the live system architecture, it shows important endpoints and operational flows.
• Additional Modules:
• The various “drove”, “drove-cli”, “drove-gateway”, “epoch”, and “epoch-cli” directories indicate that there are distinct modules for CLI operations and gateway functionalities.
Representing Relationships and Interactions
• That the Drove Controller communicates with both the Executor (for task execution) and Zookeeper (for coordination).
• That the Gateway (backed by nginx) serves as the front door for the UI, and also routes API calls to the relevant services.
• You might also represent inter-module communication among the different components (for instance, the controller may send scaling commands to the executor, and status updates might flow back).
Architectural Patterns and Design Principles
• The separation between frontend (drove gateway and UI) and backend (controller, executor, and Zookeeper) is central.
• Microservices-based design can be illustrated – each of the core modules is in its own container.
• Use of configuration management and orchestration via Docker Compose indicates that container-based deployment is key.
• The presence of both CLI and gateway layers shows an emphasis on both programmatic and interactive management.
Final Elements
• All key components with proper names.
• Labels for ports or endpoints indicated in the README.
• Annotations for the configuration tools (Docker Compose) and any submodules that factor into the deployment architecture.