Job builder
README
Skip to buildsbuilder - 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 -> exits
- 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/
Linux installation
Install the binary package, edit the "builder" and "builder-worker" services and
start them via systemd. Common things to add to "builder" service scripts are to
set the IP --ip 172.17.0.1
(take care to mark "docker.service" as a dependency
in the After=
line) and an upload URL
--upload https://user:pass@builder-web-host/upload
.
To execute multiple workers, copy the builder-worker service multiple times. You can configure the distribution to use in that as well.
FreeBSD installation
To install a ZFS snapshot for a builder jail, the poudriere utility can be used.
After setting the ZROOT in /usr/local/etc/poudriere.conf, you can setup your
jail snapshots via: poudriere jail -c -j 13-0-REL -m ftp-archive -v 13.0-RELEASE
where the argument -j
is the jailname, and -v
describes the version to
download (NB: look into man poudriere-jail
for further options).
A jail.conf
and a shell script (load.sh
installed as builder_worker.sh
) to
launch a jail are provided in the FreeBSD subdirectory of this repository.
Rename jail.conf.sample
and adjust the exec.start in jail.conf
(and other
paths, such as path) if appropriate. In builder_worker.sh
, adapt the zpool
and zfs snapshot source name.
Before starting your jails, they'll need an Internet connection for downloading
and installing packages, e.g. /etc/pf.conf:
nat pass on "wlan0" inet from "127.0.2.0/24" to any -> ("wlan")
Edit the configuration of the builder
service and the builder_worker
service
by editing your /etc/rc.conf
(again, if you like multiple workers, copy the
service script):
cloned_interfaces="lo1"
- clone the localhost interfaceifconfig_lo1_name="orb"
- name itorb
ipv4_addrs_orb="127.0.2.1/24"
- configure the IP address to 127.0.2.1builder_enable="YES"
- enable builderbuilder_flags="--ip 127.0.2.1 --upload https://user:pass@builder-web-host/upload"
builder_worker_enable="YES"
- enable a builder (using /usr/local/libexec/builder_worker.sh, which uses /usr/local/etc/builder/jail.conf)
Builds
Back to readme- ☑ freebsd-14 2024-11-20 23:27:01Z builder.pkg
SHA256:e6a9cf56e5c71d9fb49f118d37aea19f4902c4408249da6e82b0e4c9012d7a48
(5.66MB) - ☑ debian-11 2024-11-20 18:43:06Z builder.deb
SHA256:9b8e44aaeb2d2773b5d621abc2f285318d689cfb2e693370d438cedc5114d95c
(7.14MB) - ☑ debian-12 2024-11-20 18:43:06Z builder.deb
SHA256:a6d2ec21a87d55d7e7bbf7a9bc69e56b36d8cc5c2660218bdaab178fab37e455
(7.32MB) - ☑ freebsd-13 2024-11-20 17:26:14Z builder.pkg
SHA256:85ad40fb917b42c81db584b475d94a198fa0b40395b7abe28c331eddcc6e2dfa
(5.02MB) - ☑ debian-11 2024-11-15 14:06:06Z builder.deb
SHA256:efb6dfd241432cb6d08f0cb546309cb1dfbb8a61d50302d5e2f1074daf1bf72a
(7.13MB) - ☑ debian-12 2024-11-15 14:05:59Z builder.deb
SHA256:b73d77a3e3b3799de5d2b2cce2e94cbed1a9e5a5b66623881ad50969749de64d
(7.33MB) - ☑ freebsd-14 2024-11-14 23:52:51Z builder.pkg
SHA256:09ca3ff9ce01311c9ab4b650423637964b7205da28abde58876f161e288a88c4
(5.15MB) - ☑ freebsd-13 2024-11-14 17:21:34Z builder.pkg
SHA256:98455f6111d2d53927cf6e31718ed9425daa686f895a53a5be7f9785f8e38bfa
(5.01MB) - ☑ freebsd-14 2024-11-06 23:14:50Z builder.pkg
SHA256:1fa07e67872b1cc0fef42f8f8be9fe9b1a47f677ff9e19aa8fb6d9f8f6405d9a
(5.66MB) - ☑ freebsd-13 2024-11-06 17:14:32Z builder.pkg
SHA256:c79608d13773f184a2c9de06d3d7fead6609d773bb545fa0697aa621eed69cd3
(5.02MB) - ☑ debian-11 2024-11-06 14:05:58Z builder.deb
SHA256:f87e9de8ed72b7d38ad6357e3e664e29e4866b01ed61a6172d74819ee929c666
(7.15MB) - ☑ debian-12 2024-11-06 14:05:46Z builder.deb
SHA256:9837bf52093848553f10162d7c3d30b135f6f25bc1ca150c121d09d3a42b179e
(7.33MB) - ☑ debian-11 2024-10-29 14:10:56Z builder.deb
SHA256:6cecc9dbd1446209393e9f9a456e34c6193d8f0d617437cd6a05814f89da9cc1
(7.16MB) - ☑ debian-12 2024-10-28 14:05:39Z builder.deb
SHA256:6469980d5907e57f8c6324c446d474983afbfebcaa81e8dce45b12f43d37e582
(7.32MB) - ☑ debian-11 2024-10-24 14:27:25Z builder.deb
SHA256:49cef4e122b58844906e4a73bc70c96ac44a6a8498007d3be89abf0b27256eda
(7.15MB) - ☑ debian-12 2024-10-24 14:27:07Z builder.deb
SHA256:bcc3c3a246c12657f3ef5818e3cca1a19c6163bdd50c6596186f1d8848a8aa0e
(7.33MB) - ☑ freebsd-14 2024-10-23 23:02:28Z builder.pkg
SHA256:8bd26b41ab2afb5484c3459721c00e76a519b69a1941ca1c5fd71014ac567ef1
(5.16MB) - ☑ freebsd-13 2024-10-23 17:02:30Z builder.pkg
SHA256:648556a796df9fc6d68b21621832081164432aa1dfa6d3ef8e48c06b73ea83cf
(5.52MB) - ☑ freebsd-14 2024-10-10 22:50:56Z builder.pkg
SHA256:ea07b2de2697d57f076b0f9dd8856801a5cb6a9cac90204025785341571c8d83
(5.66MB) - ☑ freebsd-13 2024-10-10 16:50:53Z builder.pkg
SHA256:0fee2215f17e0ea6611b34fa384031f8c2c4a8f7b85c49abb45de3368eaa0222
(5.02MB) - ☑ debian-11 2024-10-10 14:05:34Z builder.deb
SHA256:ef000b3f11499b2ea190d6a6a5bc2cfe523c81d9c3550f959bffa67765f32b21
(7.15MB) - ☑ debian-12 2024-10-10 14:05:23Z builder.deb
SHA256:a4ca375aec54e0aad426fa15195513dd5af7b20525a49e1da69dcb247b53624a
(7.33MB) - ☑ freebsd-13 2024-09-29 16:40:38Z builder.pkg
SHA256:52ab8d6fecf820963f92cfd4412771f7639db26645bd8f273a1b58faff1f5624
(5MB) - ☑ freebsd-14 2024-09-29 15:04:45Z builder.pkg
SHA256:94dd198a4432331b3c475c770d496d42d5df90b8960a1c89857cba6e09fc58f2
(5.16MB) - ☑ debian-11 2024-09-29 14:10:27Z builder.deb
SHA256:07c17d915e296dc83202e71f9a6eabf1c0e7a99b940dce475b3dd588daf432bf
(7.15MB) - ☑ debian-12 2024-09-29 14:10:11Z builder.deb
SHA256:88e92d95e833863b87750ab2add20e6c5c8c73f831cc5d1da090a5dc385a977f
(7.33MB) - ☑ freebsd-13 2024-09-27 16:38:48Z builder.pkg
SHA256:bb061eb3c9d2059276dbb01b1094f6c890e64382f44c8757ad0bb68ce5e84c05
(5.04MB) - ☑ freebsd-14 2024-09-27 14:57:32Z builder.pkg
SHA256:992269e6a9d63af2d1d6397f77ca66ba18528cacc25c7956e3377f53af7a4fd1
(5.65MB) - ☑ debian-11 2024-09-27 14:26:35Z builder.deb
SHA256:74d5732a98d753257f37d1b2c5bc20d249028d0fada09915e37139c4ffcf84de
(7.13MB) - ☑ debian-12 2024-09-27 14:25:53Z builder.deb
SHA256:daa2d49785bf5c90d2ef1791d65bffbae243d9c2e2c5f5e1459a83df910a855b
(7.32MB) - ☑ freebsd-13 2024-09-13 16:18:36Z builder.bin
SHA256:80ad3377931ffa69d6e0295015e10b658e808b91ff2a452b18f1a77fab801426
(5.01MB) - ☑ freebsd-14 2024-09-13 14:44:58Z builder.pkg
SHA256:20fb7bd4eaf8fda394fd979326be11832b64b823297b53f8a83bb6eb13329500
(5.65MB) - ☑ debian-11 2024-09-13 14:05:14Z builder.deb
SHA256:17ae2752cd999bed3c100602f021a25960fb6424c63112b43dd6548e209ee2f2
(7.13MB) - ☑ debian-12 2024-09-12 14:27:49Z builder.deb
SHA256:555f6f37d168336cfaee62c6d1aa73085da645f32702efce55c8e3018d4c37d4
(7.32MB) - ☑ freebsd-14 2024-09-11 14:48:20Z builder.pkg
SHA256:5085c6d823d0f16af5add043a5db8d998118829e8093893ff8e494b46a91bbf8
(5.01MB) - ☑ debian-11 2024-09-11 14:25:33Z builder.deb
SHA256:536f3db8c2484f61c8d01813d01752a68f242c6942be3bc3c3497dff6e3ef3a5
(7.12MB) - ☑ debian-12 2024-09-11 14:09:54Z builder.deb
SHA256:d6b23db6359d2721ca1edc187be1e9f7fc9ab9597e0c981701c34be72c9f48b8
(7.32MB) - ☑ freebsd-14 2024-09-05 17:09:32Z builder.pkg
SHA256:cfa9e95a936b7eee1773c35978dbda9e53f1f19369529f9a269464de83d6da8f
(5.02MB) - ☑ freebsd-14 2024-09-05 14:37:27Z builder.pkg
SHA256:cd780794c004e6860d3eb6dd0832c02dcf2b059e71b32a0e8cf76a6a9cf0e91c
(6.45MB) - ☑ debian-11 2024-09-05 14:10:14Z builder.deb
SHA256:698a85a75aa3abc3449888940758a13234e02858ff112ca53d18a74a29e5b969
(8.12MB) - ☑ debian-12 2024-09-05 14:09:58Z builder.deb
SHA256:08a5e93fe97d7eb2d89e0817b095aacd0f968aee24e94bf51814e54bb6067d4a
(8.26MB) - ☑ freebsd-14 2024-08-28 14:29:58Z builder.pkg
SHA256:8cf05b0552f0dd93547b9299a0ffd3a03f7f42fb11bac1b595a1b995284d8fb3
(5.95MB) - ☑ debian-11 2024-08-28 14:26:36Z builder.deb
SHA256:b6a410dff5299c8686330b5dc6e42e8ea63defaef4fa319d40576680c075450e
(7.52MB) - ☑ debian-12 2024-08-28 14:26:04Z builder.deb
SHA256:3923571a2e4733b815f69e50145dfad72626e1a0682531051a7859c84b068b05
(7.68MB) - ☑ debian-11 2024-08-25 14:26:43Z builder.deb
SHA256:8f6f147dbda5cc338f4c6a2ea3fed7936e2669cce6c08f5268c94848241d9c20
(7.53MB) - ☑ debian-12 2024-08-25 14:26:07Z builder.deb
SHA256:f8bc2c9cb66a2ad6589256017c8c1de7ec1286eec2f69139250e26789e555837
(7.68MB) - ☑ freebsd-14 2024-08-15 14:17:37Z builder.pkg
SHA256:637a1328cea65a887e148af3c7a9cb35ad9a9a14eff7c27da0869223a16184c9
(5.93MB) - ☑ debian-11 2024-08-15 14:09:56Z builder.deb
SHA256:12e95886efe7b6fc88f752fa8f3a4170bc36701a88e8fdaac025be2b4b6adfae
(7.51MB) - ☑ debian-12 2024-08-15 14:09:38Z builder.deb
SHA256:bcbfaa2b50a09c5f4e43b789fa08a121464324045b44c2b898462f8910382c66
(7.68MB) - ☑ freebsd-14 2024-07-20 13:58:30Z builder.pkg
SHA256:6c30a79c7fd748bbd4fe84df70db34cecafc5a9386e2207971837d4c7ca4d827
(5.94MB) - ☑ debian-12 2024-07-20 13:57:08Z builder.deb
SHA256:428041239136f38abdd1f983b523b097477086327669f1075ab091b72f74140c
(7.67MB) - ☑ debian-11 2024-07-20 13:57:08Z builder.deb
SHA256:ef76bde9f0d0a7f3cfc655937dc4835b2376d47016a2b62681647f660acd9a48
(7.51MB) - ☑ freebsd-14 2024-07-15 11:13:02Z builder.pkg
SHA256:1d4b0eb6b6c4675bdeacc6d7b411fb3db3a2a6ce396b1711b419f29c59c0fa1b
(5.25MB) - ☑ debian-12 2024-07-15 10:41:56Z builder.deb
SHA256:77613bdef24767a7865c8f9c822c8bf42166f44d7134977b0f0b760000d3de50
(7.69MB) - ☑ debian-11 2024-07-15 10:41:43Z builder.deb
SHA256:7935fbb602ca13f10e8aad0c641f2d4d39d2582497e414146707141ebd951513
(7.53MB) - ☑ debian-12 2024-06-26 14:10:04Z builder.deb
SHA256:3a9f0b5e23d17edb6ea4d70a57002310dcce24825c7100053cb1437778f2d4a5
(7.88MB) - ☑ debian-11 2023-12-25 12:17:54Z builder.deb
SHA256:d98feaf82c7feae59056ad0fa43442c2593531f154c656f0bb22a13b0729987e
(7.05MB)
Including failed builds here.