The mirror manager service for ZJU Mirror.
- Build app image by
docker build -t mirror-manager Orchestrator/
- Launch service by
docker-compose.yml
- Add sync configs in
/app/Configs
. The config json schema is located atOrchestrator/Schemas/mirror-item.schema.json
- Modify token secrets in
/app/appsettings.json
- Hack into source code at
http://{webaddr}/swagger
Orchestrator acts like a central controller for the mirror system. The service updates its state passively, which means it relies on a worker request to process the job queue. Therefore, parallel job running depends on the number of workers.
All sync item will be assigned exactly one job, pushed to the job queue. Job syncing can be described as two parts:
- Job fetch: The manager first checks for timeout jobs, mark them as failed, and push to the queue. Then it dequeues a job, checks if interval is passed after last run, dispatch it to the worker or push it back to the queue. The dispatched job will be added to a dict for tracing.
- Status update: The worker reports job result, successful or failed. A new job for the sync item will be pushed to the job queue.
Note: The manager will save mirror status and other info to database, but jobs are not saved.
- Jobs: Communicating with workers, job list for monitoring, force running a sync job without interval limit
- Mirrors: Mirror list and details
- MirrorZ: API Endpoint for MirrorZ Project
- Webhook: Dynamic update sync items while running
For details, launch orchestrator and visit Swagger UI.