https://www.hashicorp.com/blog/replacing-queues-with-nomad-dispatch
Cron replacement. Separate nomad(agent), builder(linux), and builder(win) clusters still needed.
- Frontend schedules job in nomad (with unique name and job definition)
- Agent CLI binary is uploaded to s3, so it can be fetched by job
- Job is executed in trusted (
raw_exec
) environment- Download agent binary
- Execute with job to run (
hal.phar run ${job_id}
)Needs database access, access to API
Docker must be installed (User nomad runs as must have docker access)
PHP environment must be installed
Full Scheduler replacement. Only single nomad cluster needed (windows and linux in fleet).
- Frontend schedules job in nomad (with unique name and job definition)
- Agent CLI binary is uploaded to s3, so it can be fetched by job
- Job is executed in trusted (
raw_exec
) environment- Download agent binary
- Execute with job to run (
hal.phar run ${job_id}
) - Clone / fetch artifact, store in temp S3
- Parse project config and build pipeline (stages for job)
- "Overwatch" job triggers other nomad jobs (
docker
) and monitors them- Trigger new jobs (AKA stages)
- Store artifact
- Monitor
- Retrieve artifact
- (Bonus points) Change/modify pipeline on the fly
- Trigger new jobs (AKA stages)
- "Overwatch" job shuts down
- Store entire job logs
- Report back to API
- Clean up all temp artifacts
- (Step 2) How are logs sent back to the frontend/database?
- (Step 2) How is artifact sent back to artifact repository?