Job builder on debian-11
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- ☑ debian-11 2024-12-01 19:19:25Z builder.deb
SHA256:9b8e44aaeb2d2773b5d621abc2f285318d689cfb2e693370d438cedc5114d95c
(7.14MB) - ☑ debian-11 2024-11-15 14:06:06Z builder.deb
SHA256:efb6dfd241432cb6d08f0cb546309cb1dfbb8a61d50302d5e2f1074daf1bf72a
(7.13MB) - ☑ debian-11 2024-11-06 14:05:58Z builder.deb
SHA256:f87e9de8ed72b7d38ad6357e3e664e29e4866b01ed61a6172d74819ee929c666
(7.15MB) - ☑ debian-11 2024-10-29 14:10:56Z builder.deb
SHA256:6cecc9dbd1446209393e9f9a456e34c6193d8f0d617437cd6a05814f89da9cc1
(7.16MB) - ☑ debian-11 2024-10-24 14:27:25Z builder.deb
SHA256:49cef4e122b58844906e4a73bc70c96ac44a6a8498007d3be89abf0b27256eda
(7.15MB) - ☑ debian-11 2024-10-10 14:05:34Z builder.deb
SHA256:ef000b3f11499b2ea190d6a6a5bc2cfe523c81d9c3550f959bffa67765f32b21
(7.15MB) - ☑ debian-11 2024-09-29 14:10:27Z builder.deb
SHA256:07c17d915e296dc83202e71f9a6eabf1c0e7a99b940dce475b3dd588daf432bf
(7.15MB) - ☑ debian-11 2024-09-27 14:26:35Z builder.deb
SHA256:74d5732a98d753257f37d1b2c5bc20d249028d0fada09915e37139c4ffcf84de
(7.13MB) - ☑ debian-11 2024-09-13 14:05:14Z builder.deb
SHA256:17ae2752cd999bed3c100602f021a25960fb6424c63112b43dd6548e209ee2f2
(7.13MB) - ☑ debian-11 2024-09-11 14:25:33Z builder.deb
SHA256:536f3db8c2484f61c8d01813d01752a68f242c6942be3bc3c3497dff6e3ef3a5
(7.12MB) - ☑ debian-11 2024-09-05 14:10:14Z builder.deb
SHA256:698a85a75aa3abc3449888940758a13234e02858ff112ca53d18a74a29e5b969
(8.12MB) - ☑ debian-11 2024-08-28 14:26:36Z builder.deb
SHA256:b6a410dff5299c8686330b5dc6e42e8ea63defaef4fa319d40576680c075450e
(7.52MB) - ☑ debian-11 2024-08-25 14:26:43Z builder.deb
SHA256:8f6f147dbda5cc338f4c6a2ea3fed7936e2669cce6c08f5268c94848241d9c20
(7.53MB) - ☑ debian-11 2024-08-15 14:09:56Z builder.deb
SHA256:12e95886efe7b6fc88f752fa8f3a4170bc36701a88e8fdaac025be2b4b6adfae
(7.51MB) - ☑ debian-11 2024-07-20 13:57:08Z builder.deb
SHA256:ef76bde9f0d0a7f3cfc655937dc4835b2376d47016a2b62681647f660acd9a48
(7.51MB) - ☑ debian-11 2024-07-15 10:41:43Z builder.deb
SHA256:7935fbb602ca13f10e8aad0c641f2d4d39d2582497e414146707141ebd951513
(7.53MB) - ☑ debian-11 2023-12-25 12:17:54Z builder.deb
SHA256:d98feaf82c7feae59056ad0fa43442c2593531f154c656f0bb22a13b0729987e
(7.05MB)
Including failed builds here.