Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Feb 2016 01:38:13 +0000
From:      Steven Hartland <killing@multiplay.co.uk>
To:        freebsd-jail@freebsd.org
Subject:   Re: Jail management
Message-ID:  <56CA6685.4030705@multiplay.co.uk>
In-Reply-To: <ff8307f6-1264-30ec-1ef8-ed3b0a18dd84@ish.com.au>
References:  <ff8307f6-1264-30ec-1ef8-ed3b0a18dd84@ish.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help
Checkout qjail from your description I think it will do what you want.

On 22/02/2016 01:13, Aristedes Maniatis wrote:
> I've been using FreeBSD jails (with ezjail) for many years and they work very well. However I'm now reaching a critical mass (30+ jails) where I want to be able to manage them in bulk more easily.
>
> In this environment, each jail runs just a single application, installed from a package built using poudriere from a custom port. That package depends on Java, so lots of other packages also get pulled in. That application gets new versions roughly once every 4 weeks. The problems I have right now are:
>
> * FreeBSD's packaging system doesn't understand the concept of installing a particular package version, so all my scripts will by default upgrade the application to the current version even if I don't want to. I can't easily install a new jail at an old version.
>
> * It is hard to reproduce the environment exactly, matching the application to the same version of Java that was available at the time of deployment. Again I'm fighting against the pkg system which always wants the latest version.
>
> * For failover I want each jail reproduced exactly on another host, or at least a snapshot which could be sent to another host within a few seconds. The jails are quite small (< 500Mb). Most of that is just the openjdk pkg.
>
>
> As I understand, ezjail doesn't support multiple base jails. If it did, then I could simply install the application (and packages) to the base jail and have versions of the base. Then by shutting down a jail, switching the base to the new version and starting up, everything would upgrade easily. Even better would be some concept of hierarchy with customer_jail sitting on top of base_version_1.0 which in turn sits on top of base_jail.
>
> Would I need to abandon ezjail and be able to build all the above myself with a combination of nullfs (basejail) and unionfs (intermediate versioned jail)? Does unionfs now work with ZFS?
>
>
> Alternatively I could simply use zfs clones to deploy a new version of the application by destroying the whole jail and replacing it with a new one. I'd need to then script (I use saltstack) deploying the 2-3 config files which are different in each jail.
>
>
>
> Thoughts? What seems like a more robust long term approach to jail management?
>
>
> Thanks
> Ari
>
>
>




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?56CA6685.4030705>