jails kjail-pkgbase

kjail is a set of scripts that I wrote and use for my own needs. It features the management of nullfs thin jails (RELEASE versions only).

Now, I released kjail-pkgbase. It's the same idea, but with pkgbase as the only means to create, update, upgrade base and jails.

Initially, it was worked starting to 14.3-RELEASE, but I changed my mind and finally, it needs at least 15.0-RELEASE. There are several reasons for this choice. First, it was a mess to upgrade from 14.3 to 15.0 (because repos names changed and pkg needs keys to access to base 15). But, the best argument was that, in fact, I was obliged to fetch the FreeBSD files and then convert the base to pkgbase. It left a bunch of packages that a jail doesn't need.

The cleaner solution is to use pkg of the host and install the base in a dir. There, I can install FreeBSD-set-base-jail, a meta-package that pulls "only" roughly 180 base packages. This lead to remove the choice of the installed base version: it's definitively the same than the host. After all, I never needed to do otherwise. Note that the host doesn't need to use pkgbase itself.

I added some improvements like the snapshots of base and jails that now leverage the ZFS clone feature. This allows to rollback any save (not just the last), but at the cost of code complexity (bugs are to be expected). I also added the possibility to create VNET jail (fixed ip or DHCP). I don't know if I will use it as all my current jails are simple alias-ip type. It was more for fun.

For the moment, it's still in test. I will switch when pkgbase will be a minimum stabilized.

Anyone who has time to waste can try it and reports problems.

 
Back
Top