Rex icon indicating copy to clipboard operation
Rex copied to clipboard

FreeBSD Jails

Open bbrtj opened this issue 5 years ago • 0 comments

User story

As a FreeBSD user I would like to have jails supported by Rex so I can manage my environment more efficiently.

Describe the solution you'd like

Jails is a FreeBSD-specific lightweight virtualization technology that allow creation of containers separated from the rest of the host system. Jails are mature, stable and have very little overhead. They are often mentioned as an alternative to Docker on FreeBSD, even though they don't offer the orchestration. What I'd like to have is an implementation that would allow me to create a new jail, start it (or stop or restart, one-time or persistently) and run some commands inside. I currently manage it with bash scripts and heavy use of jexec, however this is getting bothersome rather quickly.

Describe alternatives you've considered

The closest thing to Jails on Linux is LXC. Since Jails are in FreeBSD's base OS there aren't really any alternatives I've heard of, however there is some software that simplifies working with them, like iocage (ZFS-specific AFAIK) and ezjail.

Additional context

The implementation would likely be similar to LXC. Jail creation is done by adding config to /etc/jail.conf and creation of a filesystem in a separate jail directory, start / stop is done by service which is already implemented in Rex.

bbrtj avatar Aug 16 '20 08:08 bbrtj