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

  • pcre2

    Generally sudo dnf install pcre2-devel or sudo 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 run pipenv install to create the environment followed by pipenv shell to enter it. Alternatively you can install the required scons-parts package into your PATH's Python 3 environment via

    python3 -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.