* http://jdebp.info./Softwares/nosh/guide/jailing-services.htm...
* http://jdebp.info./Softwares/nosh/guide/converting-jails.htm...
This is something that annoys me too, do you have any recommandations? Should I learn to setup jails from scratch? Or settle on a single tool like ezjails?
ezjails and some of the others really do seem like the definition of leaky abstractions if you expect a nice layer on top. They're more like handy reusable shell functions.
If you learn from scratch (which again, isn't far removed from those helper packages), you'll have a better understanding for when you get stuck.
https://www.skyforge.at/posts/an-introduction-to-jails-and-j...
Given that BSD doesn't require you to go through such hoops for a POSIX API, it's a mystery to me why the BSDs aren't more used in the enterprise/SaaS space.
Nine times out of ten, the servers at your first job or university were centos or ubuntu, and your desktop tower was rhel, fedora, or again, ubuntu. If you're an enthusiast maybe you had an arch, debian, or gentoo install. (shrugs slackware predates me).
Without some degree of exposure or evangelism you'll choose what you've seen work over something you suspect might not. And that rationale applies to a lesser agree to docker vs rkt.
Nothing profound. It just has popular mindshare so it's the default. You'll have to beat the pants off something to overcome that.
There needs to be a name for the fallacy that the technically best solution will always win.
BSDs aren't more popular in commercial spaces because it's too difficult to find engineers with BSD experience, and no pre-existing supporting ecosystem. There needs to be a compelling reason for companies to ignore the conventional unpopularity, which means that using a BSD must solve a specific pain point that's visible and understandable enough to executives to get approval for going outside the mold. I hate to break it to you, but your boss (probably) doesn't appreciate why a POSIX API is even a thing in the first place, let alone how it applies to a business case.
https://git.cse.bth.se/system/bertha/tree/master/usr/sj
My target use-case is deploying backend servers into minimal jails. The servers are single binaries written in golang and the goal is to minimize the attack-surface as far as possible in case I’ve left something exploitable in the server code.
There are lots of different ways to configure jails, which unfortunately means there are lots of places to get stuck.
I typically deploy to x1.* instances, which have NVMe drives. I create a zpool of all the NVMe drives, and then mount a zfs filesystem on the zpool at /mnt/jails. I run all my services in jails. Each jail gets its own IP address on the host, and services are made available to the outside world using pf rdr rules. Services in jails are allowed to access the outside network using pf nat rules. pf makes it easy to monitor and restrict network activity for each service.
Once you’ve configured a jail, you can snapshot it with zfs, compress the snapshot, archive it and rsync it to other FreeBSD hosts. Once copied to other hosts, starting the jail simply requires registering it in /etc/jail.conf and running `service jail start $JailName`.
I’ve started documenting this and have been thinking hard about how to provide a more generic container interface on top of this implementation. If you’re interested in the shell scripts, I’ve started posting them here:
https://github.com/cieplak/jz