Building¶
TxnBox building is based on SCons and Parts. As a plugin, TxnBox also requires an instance of Traffic Server, or at least the plugin API header files.
Other dependencies
-
Generally
sudo dnf install pcre2-devel
orsudo yum install pcre2-devel
. Scons/Parts
As mentioned above, TxnBox is built using the Scons build tool. This is distributed as a Python package. A root level
Pipenv
is provided with which a Python virtual environment containing the required Scons dependencies can be created. Simply runpipenv install
to create the environment followed bypipenv shell
to enter it. Alternatively you can install the required scons-parts package into your PATH's Python 3 environment viapython3 -m pip install --user scons-parts
It is important to use Python 3 - no attempt has been made for Python 2 compabitility. It may be necessary to edit the "scons" script for this reason. This should be "~/.local/bin/scons". If scons or parts doesn't seem to be found, make sure the first line in that file has "python3" and not just "python".
To build TxnBox, first build and install Traffic Server. When configuring Traffic Server, specify
that its YAML headers should be exported via the --enable-yaml-headers
configuration option.
Once Traffic Server is built, build TxnBox using the following command
scons txn_box --with-trafficserver=<ts_install_path>
where <ts_install_path>
is the path to a Traffic Server install. In general this will be the
same path as used for the prefix
configuration option in Traffic Server.