Basic installation
Basic installation
Kleene requires the ZFS filesystem and PF firewall to run
Both should be included in the official releases but remember to install FreeBSD using ZFS or manually create a zpool.
The most straightforward way to install Kleene is using pkg(7)
.
First, install kleened
the backend daemon
# pkg install kleene-daemon
and klee
the CLI tool
# pkg install kleene-cli
Configuration
It is recommended to take a peek at the configuration file before running
Kleened. It is located at /usr/local/etc/kleened/config.yaml
and contains
defaults intended to work in most basic cases.
Once Kleened is installed, enable it:
# sysrc kleened_enable=yes
This ensures that it will start when the system is restarted.
To initialize the host and make sure all host requirements are met, run
# service kleened init
It is also possible to do a dry-run initialization using
service kleened dryinit
to see if requirements are met and what
should be configured.
Finally, start Kleened
# service kleened start
Now Kleene should be up and running!
Start creating images and containers with klee
.
Alternative installation methods
Build from source using FreeBSD ports
Alternatively, build kleened
and klee
from source
using the FreeBSD ports collection:
# git clone --depth 1 https://git.FreeBSD.org/ports.git /usr/ports
# cd /ports/sysutils/kleene-daemon
# make install
# cd /ports/sysutils/kleene-cli
# make install
See the FreeBSD handbook for further details.
Install klee
using pip
or pipx
There are several ways of installing Klee depending on tooling and platform.
The following provides a couple of examples using pipx
.
Alternatively, pip
can be used in a similar way.
pipx
works on many differen platforms and can be used to install python packages
in isolated environments to avoid dependency conflicts with other python applications.
pipx
can be installed on most operating systems.
For instance, on FreeBSD:
$ sudo pkg install py311-pipx
On a Debian-based Linux distribution
$ sudo apt install pipx
Once pipx
is install, klee
can be installed by
$ pipx install kleene-cli
using the latest version from PyPI.
Install development version of klee
The latest version of klee
can be installed directly from source using pipx
$ git clone https://github.com/kleene-project/klee
$ pipx install ./klee
If pipx install -e ./klee
is used instead, it will be installed in ‘editable’
mode, meaning that any changes made to the source will take effect the next time klee
is invoked.