DEV Community

Cover image for BastilleBSD Jail Manager - Containers Done Light
Daniel Ziltener
Daniel Ziltener

Posted on

BastilleBSD Jail Manager - Containers Done Light

What is BastilleBSD?

Bastille is an open-source system for automating deployment and management of containerized applications on FreeBSD.
-- bastillebsd.org

BastilleBSD is, at its core, a set of scripts to manage your FreeBSD jails. It handles things like creation, starting, stopping, port forwarding, and using and composing templates. It allows you to manage both "normal" and VNET jails, and if you use ZFS as your file system, it helps you to take snapshots from running jails and lets you restore them, even on other machines, too. And it's in the pipeline to even support Linux as a jail guest.

What are jails?

Jails are a FreeBSD technology that started back in the 90s. The developers needed something more powerful and safe than a simple chroot to isolate web applications and do things like having multiple different versions of PHP running on the same server. If you want to know a bit more about the history behind it, see Jails - High value but shitty Virtualization. A jail is a virtual environment that takes a directory of the host's file system as its root, and uses the host's kernel, which makes it a very lightweight solution.

You can actually use jails without a tool like BastilleBSD, they're built-in to FreeBSD, like the jails-inspired LXC is in the Linux kernel. But while that is possible and sometimes done, it is just more convenient to have tools to manage it and hide away some of the low level verbosity.

What will this series teach?

Starting next week, we will dive into setting up the host machine, setting up different kinds of jails, how to create and use templates, how to test these templates, and how to snapshot/restore jails.

Top comments (1)

Collapse
 
artjomsimon profile image
Artjom Simon

I literally just googled "bastillebsd tutorial containerize" and landed here and now I'm intrigued and looking forward to the followup 👍