package builder

  1. Overview
  2. Docs
Scheduling and executing shell jobs

Install

Dune Dependency

Authors

Maintainers

Sources

builder-v0.2.0.tbz
sha256=66b3f31634388f0f7ee98d39bf7c40a7998decd3362de2d724f4d3d789cbef79
sha512=0cc681261864bdb692cfcb7a0b1ab433d38d03d30df011e1f9ba994f4577e24b38a50ed2e16abfd03da6485db3222cab074138fbf7a090b3118f300bcb59e284

Description

The builder server has a schedule of jobs to be executed, stored persistently on disk. Any number of workers can connect via TCP (using ASN.1 encoded messages) that execute a single job -- usually contained in a sandbox (FreeBSD jail or Docker container). A client is a command-line interface to modify the schedule. Access control is out of scope - run it locally on your build host. The server receives the output artifacts of each job, and either stores them on the local file system or upload them to a remote server via http.

See https://builds.robur.coop for the live web frontend (builder-web).

Published: 04 Nov 2021

README

builder - scheduling and executing jobs

This consists of three programs, a worker, a server, and a client. The single server contains a queue of jobs, which are consumed by a worker. Any number of worker can be connected to the server. The client can modify the schedule: add/remove/modify jobs, also observe a concrete job.

The server keeps persistent state of the job queue (so restarts / crashes are dealt with). A worker connects, provides some information about itself, and then waits for a job. Once a job is read and accepted, it is executed by the worker. Resulting artifacts can be transferred by the client to the server.

The client has the ability to schedule jobs at regular intervals - similar to crontab - but workers are usually executed in sandboxes/ jailed environments.

Handled and unhandled error conditions:

  • worker execution fails (timeout, restart, killed): not handled, but server has a timeout

  • worker execution gets a signal: reported to server

  • worker can't write job data files -> failure is captured and reported

  • worker can't read job output -> logged to client's console (without artifacts gathered)

  • worker errors when submitting console output -> ignored

  • worker fails communication with server -> job is ignored (the server is responsible for restarting)

A templating mechanism is available, look for orb-build.template as examples. Currently FreeBSD, Debian and Ubuntu are supported, and a repository that receives jobs is live at https://builds.robur.coop/

Dependencies (16)

  1. base64
  2. http-lwt-client >= "0.0.4" & < "0.1.0"
  3. uuidm
  4. ptime
  5. lwt
  6. logs
  7. fpath
  8. fmt >= "0.8.7"
  9. duration
  10. cstruct >= "6.0.0"
  11. cmdliner
  12. bos
  13. bheap >= "2.0.0"
  14. asn1-combinators < "0.3.0"
  15. dune >= "2.0.0"
  16. ocaml >= "4.10.0"

Dev Dependencies

None

Used by (1)

  1. builder-web < "0.2.0"

Conflicts

None

OCaml

Innovation. Community. Security.