
FreeBSD Jails the hard way - wink
https://clinta.github.io/freebsd-jails-the-hard-way/
======
laumars
To be fair, ez-jails doesn't really abstract away that much. It just
streamlines some of the more monotonous stuff.

My home server did originally run with jails which I'd created by hand and
that worked really well for a while. But I started running into issues keeping
the jails up-to-date. So I recreated those jails with ez-jails and the whole
platform has been faultless ever since.

In fact it's been such an effective set up that I've been considering
flattening my Proxmox box and running FreeBSD + Jails on that as well

~~~
feld
ezjails are not upgradable by design which is a huge problem

~~~
geococcyxc
ezjail-admin update -i has always worked for me, binary upgrades should work
as well. What "design" are you thinking of here?

~~~
feld
It doesn't update files in /etc nor does it remove old files.

There are other problems, but those are the most prominent.

------
Walkman
FreeBSD jails is the same concept as Docker, even it has been around for
longer. Can somebody explain why it has never gained more momentum?

~~~
laumars
A more precise comparison on Linux would be OpenVZ and LXC (or Zones if you're
a Solaris admin).

As for why it's not gained more momentum, that would likely just be because
Linux popularity dwarfs FreeBSD. Much the same reason as why so much effort
was made to port ZFS to Linux despite FreeBSD already having excellent
support. But for what it's worth, jails have been widely used within the
FreeBSD community for quite some years.

It's a great shame FreeBSD doesn't get more love because it really is a
fantastic platform. But then it's just one of a long list of very credible
operating systems that often get overlooked.

~~~
hhw
Interest in FreeBSD seems to be on the rise, with the advent of systemd. Many
Linux users have been able to avoid it thus far, by sticking to 6.x Of RedHat
and derivatives, or Debian 7. As these versions become longer in the tooth, it
will be interesting to see if more people will switch over to FreeBSD.
Popularity may not be a good thing however, with the recent political drama
and institution of a code of conduct getting in the way of FreeBSD's
meritocratic approach. Thankfully, there's still plenty of choice available in
open source operating systems. Thankfully, we can always trust Theo to keep
OpenBSD's purist approach to technical correctness :P

~~~
beccasanchez
FreeBSD is going to eventually adopt a systemd-like approach. So people who
switch for this reason will be betrayed down the line.

~~~
mbreese
Even if they do, I'm pretty confident that FreeBSD will do it better. If for
no other reason, they'll be able to take the lessons from systemd and see what
worked and what didn't.

~~~
cm3
Yes, and FreeBSD wouldn't allow unbootable systems that you can easily run
into with systemd.

~~~
cm3
Or break stuff from one release to another. I fear that the web app approach
to release often and break often is getting into Linux userland development.
Gtk3 is another example of that. 3.16 was fine and 3.18 started drawing slower
and displaying black rectangles anytime while a built-in dialog (color, file,
etc.) is opening. Then there's Gtk3's reluctance to support themes. Almost all
themes have to be ported again for each Gtk3 release. And you cannot configure
your theme once and reuse the config ($HOME) on two different versions of a
linux distro. If GNOME wouldn't approach the default theme like everybody uses
Gtk3 on a tablet, it wouldn't be problem to have no theming. I've been using a
Gtk2 theme I wrote for at least 12 years or even longer and it never glitched
on me. This is the same mindset systemd development in general seems to have.
But like in all organizations I've seen reasonable developers in the systemd
community and those who are not.

~~~
cpach
I don’t think this is a new trend:
[https://web.archive.org/web/20151126183335/https://www.jwz.o...](https://web.archive.org/web/20151126183335/https://www.jwz.org/doc/cadt.html)

------
_paulc
Interestingly I just went through the same process as I wanted to understand
how jails worked without the tools (my preference is iocage if you want
something full featured - ez-jail doesn't properly handle the new jail.conf
approach) - to be honest this is pretty simple and in some cases the tools
just add complexity.

I ended up writing my own very simple jail wrapper [1] (~200 lines of shell)
which does most of this in a very simple way - I wouldn't advise this for
general use but the code is simple enough to understand what is going on
behind the scenes. I chose not to use jail.conf for my use case as I wanted to
dynamically create/destroy lots of jails programatically and it was easier to
just call jail(8) directly in the case.

[1]
[https://gist.github.com/paulchakravarti/9afea9e889bc992dbdd2...](https://gist.github.com/paulchakravarti/9afea9e889bc992dbdd2#file-
jail-sh)

------
xiaq
What the author calls the tedious way still seems 10 times easier than
configuring a LXC instance on Linux...

~~~
4ad
I downvoted you by mistake. Please accept my apologies. This is the second
time I did it this week. Why are the vote buttons so small and close
together?! And why can't you revoke a vote?

