A tool to provision, configure and maintain FreeBSD jails
BSDploy – FreeBSD jail provisioning
Its main design goal is to lower the barrier to repeatable jail setups.
Instead of performing updates on production hosts you are encouraged to update the description of your setup, test it against an identically configured staging scenario until it works as expected and then apply the updated configuration to production with confidence.
- bootstrap complete jail hosts from scratch
- create new jails by adding two or more lines to your configuration file and running ploy start
- declarative configuration – all hosts and their properties defined in ploy.conf are automatically exposed to Ansible. Run existing playbooks with ploy playbook or directly assign roles in ploy.conf and apply them using ploy configure.
- imperative maintenance – run Fabric scripts with ploy do JAILNAME TASKNAME and have all of the hosts and their variables at your disposal in fab.env.
- configure ZFS pools and filesystems with whole-disk-encryption
- modular provisioning with plugins for VirtualBox and Amazon EC2 and an architecture to support more.
Best of both worlds
Combining a declarative approach for setting up the initial state of a system combined with an imperative approach for providing maintenance operations on that state has significant advantages:
- Since the imperative scripts have the luxury of running against a well-defined context, you can keep them short and concise without worrying about all those edge cases.
- And since the playbooks needn’t concern themselves with performing updates or other tasks you don’t have to litter them with awkward states such as restarted or updated or – even worse – with non-states such as shell commands.
Under the hood
BSDploy’s scope is quite ambitious, so naturally it does not attempt to do all of the work on its own. In fact, BSDPloy is just a fairly thin, slightly opinionated wrapper around existing excellent tools.
Strictly speaking, BSDploy only needs Python for the initial configuration of the jailhost. If you chose to perform that step yourself or use a pre-existing host, you won’t need Python on the host, just ezjail.
BSDPloy can take care of these requirements for you during bootstrapping but of course you can also use it to manage existing machines that already meet them.
BSDploy currently only supports FreeBSD 9.2 (although in theory any 9.x should work) but not yet FreeBSD 10. But that is only a matter of time. We can’t wait to use it on 10 ourselves :-)
BSDploy and its dependencies are written in Python and thus should run on pretty much any platform, although it’s currently only been tested on Mac OS X and FreeBSD.
The full documentation is hosted at RTD.
1.0b4 - unreleased
1.0b3 - 2014-07-07
- make ploy_virtualbox an optional dependency
1.0b2 - 2014-07-07
- migrate from mr.awsome* dependencies to ploy*
- various bugfixes
- added tests
1.0b1 - 2014-06-17
- Initial public release