TheBrig Info - fsbruva/thebrig GitHub Wiki
Basic Premise
TheBrig is a webgui manager for jails that uses PHP to perform the jail management tasks at the commandline. This is very similar to the rest of Nas4Free, which also uses PHP to carry out administrative tasks on the host OS. Also like Nas4Free, certain functional and design choices had to be made, as creating a GUI to deal with all the multitude of options available at the commandline is impossible. I apologize if we made a choice that you didn't agree with. Submit a pull request and we can discuss it.
TheBrig supports the following tasks:
- Backing up the filesystems of existing jails created with other methods (mostly via the commandline following the Nas4Free wiki)
- Importing the jail settings from an existing rc.conf.local
- Starting/stopping jails
- Modifying jail parameters
- Deleting jails (it can make a backup tarball first, for safe keeping)
- Determining compatible FreeBSD tarballs, then fetching them as a background task
- Creating thin & full sized jails from tarballs and template jail
- Display currently configured jails
- Display current status of jail (running/stopped), including process counts
- Tarball management to view and delete old backups or downloaded FreeBSD files
- Can be run on either 32 or 64 bit Nas4Free
- Can be run on either Full or Embedded install
Terminology
Thin jail
This is a fully functional jail, but when first installed, only occupies about 2 MB in its folder. This is because the majority of the userland programs (which shouldn't ever get modified) are stored elsewhere, and the jail is given read-only access to them. This means that after installing the first thin jail, you actually use about 300MB of space, but installing subsequent jails only adds 2 MB apiece. So, 4 thin jails take up only about 310 MB, instead of 1.2 GB!!!
Basejail
This is the repository of the bulk of the userland files used by all the thin jails on your system. It means only one system to keep updated, and it is completely protected from tampering by virtue of the read-only access. This means something going wrong in one jail can't affect the other jails.
Full jail
This is a full sized jail, about 300 MB per jail, and is completely self contained. This is the type of jail that was built by anyone who followed the wiki instruction.
Template jail
This is a folder that is set aside as a build destination. By this, I mean that anyone who followed the original wiki saw how to first build the proto jail, and then how to download all the source code for FreeBSD, and recompile a fresh, slimmer version for use in a new jail. These complicated steps will be implemented by TheBrig eventually, but not yet. For now, once you create your first jail, you will mount the template jail's folder someplace in the build jail. Then, you will carry out the steps to make buildworld, and the destination will be the template jail's folder. Subsequently, you can use TheBrig to create either full or thin jails based off this custom-built template.