Funny how one stumbles upon things. I wanted to learn Bhyve, and invested in a Dell R710 for it only to learn that it's missing a required CPU feature. My single functioning Dell 1850 server isn't eligible for ESX, and I wasn't keen to try Xen on a 2GB RAM hardware.
Then I crashed the 1850 trying to repartition the hdd to learn Jail. That's when new FreeBSD love came in.
Love #1: Removed hardware RAID
Not quite a FreeBSD thing. I finally figured out how to configure the RAID controller to have FreeBSD recognise my 2 harddisks independently (hint: create 2 single-disk striped volumes).
Love #2: Expanded memory to 16GB
Old memory is cheap, old used memory is cheaper! eBayed the RAM to make the server handle more jails concurrently. Server hardware is flakey, and memory may bail on the next power cycle.
Love #3: Root on ZFS
With more RAM, ZFS is the way to go! So glad that the stock installer supports this, saving me so much time configuring the server for jail. This is how things should be!
I still have not experienced the benefits of root on ZFS. When !@%#$ happens I will read it up...again.
Love #4: Hello iocage!
iocage is possibly the most current Jail manager. 2 alternatives are noted:
- ezjail is arguably the most popular Jail manager in the past years. I note on the main site that the last update is 2015. Whoever says it 'still works' probably is still doing the same thing since 2015. Let's try to look over the horizon and recognize the stiff competition out there (did someone say Dockers)!
- cbsd is a worthy alternative. Code is actively maintained, and serves the larger ClonOs initiative synergising Bhvye, Xen, and Jail tech. It's ugly-looking now, but the idea and momentum is healthy.
Why I love Jail/ iocage
I love anything that works for me on the first try; iocage is one of them. iocage makes command-line management of jails so easy there's no good reason not to stay with it. I hope it will in time include cross-host migration.
- Works on old hardware. Did I mention I have servers since 2005? To be honest, most of my stuff don't require crazy CPU computation. Not to mention it's really cheap. Like $50 cheap.
- Demands less resources to perform the same compared to 'classic' virtualization (think VirtualBox, Xen).
- Opens the door to learn related tech. 2 cool things I picked up (as an amateur):
Jail is not without limitations
- Instance OS tied to the host. All jail instances are essentially FreeBSD. There is no option to run alternative OS (Linux, Windows). This is true also for Docker images.
- Missing an ecosystem. The best part of Docker is the Kubernetes ecosystem, including service discovery, service load balancing, health monitor. All these are not part of Jail, and one is open to find compatible tech to complete the ecosystem: I recommend Consul as a beginner's service discovery/ load balancing/ API access control tool.