Job builder on debian-12
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-12 2024-12-02 18:43:17Z builder.deb
SHA256:a6d2ec21a87d55d7e7bbf7a9bc69e56b36d8cc5c2660218bdaab178fab37e455
(7.32MB) - ☑ debian-12 2024-11-15 14:05:59Z builder.deb
SHA256:b73d77a3e3b3799de5d2b2cce2e94cbed1a9e5a5b66623881ad50969749de64d
(7.33MB) - ☑ debian-12 2024-11-06 14:05:46Z builder.deb
SHA256:9837bf52093848553f10162d7c3d30b135f6f25bc1ca150c121d09d3a42b179e
(7.33MB) - ☒ debian-12 2024-10-29 14:10:29Z Build failure: exited 4
- ☑ debian-12 2024-10-28 14:05:39Z builder.deb
SHA256:6469980d5907e57f8c6324c446d474983afbfebcaa81e8dce45b12f43d37e582
(7.32MB) - ☑ debian-12 2024-10-24 14:27:07Z builder.deb
SHA256:bcc3c3a246c12657f3ef5818e3cca1a19c6163bdd50c6596186f1d8848a8aa0e
(7.33MB) - ☑ debian-12 2024-10-10 14:05:23Z builder.deb
SHA256:a4ca375aec54e0aad426fa15195513dd5af7b20525a49e1da69dcb247b53624a
(7.33MB) - ☑ debian-12 2024-09-29 14:10:11Z builder.deb
SHA256:88e92d95e833863b87750ab2add20e6c5c8c73f831cc5d1da090a5dc385a977f
(7.33MB) - ☑ debian-12 2024-09-27 14:25:53Z builder.deb
SHA256:daa2d49785bf5c90d2ef1791d65bffbae243d9c2e2c5f5e1459a83df910a855b
(7.32MB) - ☑ debian-12 2024-09-12 14:27:49Z builder.deb
SHA256:555f6f37d168336cfaee62c6d1aa73085da645f32702efce55c8e3018d4c37d4
(7.32MB) - ☑ debian-12 2024-09-11 14:09:54Z builder.deb
SHA256:d6b23db6359d2721ca1edc187be1e9f7fc9ab9597e0c981701c34be72c9f48b8
(7.32MB) - ☑ debian-12 2024-09-05 14:09:58Z builder.deb
SHA256:08a5e93fe97d7eb2d89e0817b095aacd0f968aee24e94bf51814e54bb6067d4a
(8.26MB) - ☒ debian-12 2024-09-04 14:05:23Z Build failure: exited 31
- ☒ debian-12 2024-09-03 14:26:04Z Build failure: exited 31
- ☒ debian-12 2024-09-02 14:09:48Z Build failure: exited 31
- ☒ debian-12 2024-09-01 14:05:17Z Build failure: exited 31
- ☒ debian-12 2024-08-31 14:26:09Z Build failure: exited 31
- ☒ debian-12 2024-08-30 14:09:39Z Build failure: exited 31
- ☒ debian-12 2024-08-29 14:05:16Z Build failure: exited 31
- ☑ debian-12 2024-08-28 14:26:04Z builder.deb
SHA256:3923571a2e4733b815f69e50145dfad72626e1a0682531051a7859c84b068b05
(7.68MB) - ☑ debian-12 2024-08-25 14:26:07Z builder.deb
SHA256:f8bc2c9cb66a2ad6589256017c8c1de7ec1286eec2f69139250e26789e555837
(7.68MB) - ☑ debian-12 2024-08-15 14:09:38Z builder.deb
SHA256:bcbfaa2b50a09c5f4e43b789fa08a121464324045b44c2b898462f8910382c66
(7.68MB) - ☑ debian-12 2024-07-20 13:57:08Z builder.deb
SHA256:428041239136f38abdd1f983b523b097477086327669f1075ab091b72f74140c
(7.67MB) - ☑ debian-12 2024-07-15 10:41:56Z builder.deb
SHA256:77613bdef24767a7865c8f9c822c8bf42166f44d7134977b0f0b760000d3de50
(7.69MB) - ☑ debian-12 2024-06-26 14:10:04Z builder.deb
SHA256:3a9f0b5e23d17edb6ea4d70a57002310dcce24825c7100053cb1437778f2d4a5
(7.88MB) - ☒ debian-12 2024-05-17 11:41:50Z Build failure: exited 4
Excluding failed builds here.