These docs are for v0.9.2. Click to read the latest docs for v0.9.3.

❗️

deprication warning

The BSD support in 0.9.2 is experimental. Due to problems we encountered with the approach taken it will change drastically with 0.9.3. The changes are so far reaching FiFo 0.9.3 will not recognize jails created with 0.9.2!

Project-FiFo provides experimental support for BSD jails on FreeBSD.

At this point FiFo depends on FreeBSD-11, the latest iocage (python) and vnet support.

Currently compiling from source is required.

Many of the steps below are FreeBSD centric, and we highly recommend to contact the FreeBSD community if you have problems or trouble with them as they are a lot more qualified to answer questions regarding BSD specific topics then we are.

❗️

Be safe

As always:

  • make backups
  • don't use experimental features on critical systems

Good luck

Getting Started

compile a kernel with VIMAGE

pkg install subversion
svn checkout http://svn.freebsd.org/base/release/11.0.1/ /usr/src
cd /usr/src/sys/amd64/conf
cat > FIFOKERNEL <<EOL
include GENERIC
ident FIFOKERNEL

nooptions       SCTP   # Stream Control Transmission Protocol
options         VIMAGE # VNET/Vimage support
options         RACCT  # Resource containers
options         RCTL   # same as above
EOL


cd /usr/src
make -j4 buildkernel KERNCONF=FIFOKERNEL
make -j4 installkernel KERNCONF=FIFOKERNEL
reboot

Setting up some ZFS

All FiFo components follow a simple rule: mutable data is stored in /data/<service> best practice is to set up a ZFS filesystem for each of them:

zfs create zroot/data
zfs set mountpoint=/data zroot/data
zfs create zroot/data/sniffle
zfs create zroot/data/snarl
zfs create zroot/data/howl

Install dependenceies

  • iocage
  • pkg install git erlang gmake leiningen

Setting up the components

📘

IP addresses

Please make sure that for all components, when editing the config file you chan change the IP address to the interface you want to use to communicate over.

chunter

🚧

requires /usr/src

This requires /usr/src for the dtrace headers

git clone https://github.com/project-fifo/chunter
cd chunter
git checkout test
gmake rel
cp -r _build/prod/rel/chunter /usr/local/lib/chunter
cp /usr/local/lib/chunter/etc/chunter.conf.example /usr/local/lib/chunter/etc/chunter.conf

Add network_tag.admin = vnet0 to the config file so the admin tag is bound to vnet0

sniffle

git clone https://github.com/project-fifo/sniffle
cd sniffle
git checkout test
# in rel/vars.conf change `{run_user, "..."}` to `{run_user, ""}`
gmake rel
cp -r _build/prod/rel/sniffle /usr/local/lib/sniffle
mkdir -p /data/sniffle/etc /data/sniffle/db
cp /usr/local/lib/sniffle/etc/sniffle.example.conf /data/sniffle/etc/sniffle.conf

snarl

git clone https://github.com/project-fifo/snarl
cd snarl
git checkout test
# in rel/vars.conf change `{run_user, "..."}` to `{run_user, ""}`
gmake rel
cp -r _build/prod/rel/snarl /usr/local/lib/snarl
mkdir -p /data/snarl/etc /data/snarl/db
cp /usr/local/lib/snarl/etc/snarl.example.conf /data/snarl/etc/snarl.conf

howl

git clone https://github.com/project-fifo/howl
cd howl
git checkout test
# in rel/vars.conf change `{run_user, "..."}` to `{run_user, ""}`
gmake rel
cp -r _build/prod/rel/howl /usr/local/lib/howl
mkdir -p /data/howl/etc /data/howl/db
cp /usr/local/lib/howl/etc/howl.example.conf /data/howl/etc/howl.conf

In the config file change ui_path to /usr/local/lib/cerberus

Cerberus

git clone https://github.com/project-fifo/cerberus
cd cerberus
git checkout test
gmake ui
mkdir -p /usr/local/lib/cerberus
cp -r resources/public/* resources/index.html /usr/local/lib/cerberus
cp /usr/local/lib/cerberus/config/config.js.example /usr/local/lib/cerberus/config/config.js

Starting the services

  • /usr/local/lib/sniffle/bin/sniffle start
  • /usr/local/lib/snarl/bin/snarl start
  • /usr/local/lib/howl/bin/howl start
  • /usr/local/lib/chunter/bin/howl chunter

Initial config

Add admin user and group:

/usr/local/lib/snarl/bin/snarl-admin init default MyOrg Users admin admin

Adding Jail Dataset dummy

/usr/local/lib/sniffle/bin/sniffle-admin datasets datasets jail add 11.0-RELEASE