Server

The following steps guide you on how to install and configure the Pullconf server component pullconfd.

Download the .deb package from GitHub:

wget https://github.com/puetzp/pullconf/releases/download/v0.4.2/pullconfd_0.4.2-1_amd64.deb

Or: Install Rust, download the source code and build the package yourself:

cargo install cargo-deb
cargo deb -p pullconfd

Install the package:

sudo dpkg -i pullconfd_0.4.2_amd64.deb

The installation script sets up a systemd service unit and a configuration and data directory. Check the unit's status:

sudo systemctl status pullconfd.service

If this is your first installation the unit will likely be in the "failed" state, because some mandatory configuration parameters may need to be set up, such as a path to a valid TLS certificate and corresponding private key. Refer to the log at /var/log/pullconfd/pullconfd.log to see what else might be missing to start the unit.

pullconfd is configured via environment variables. As you can see in the systemd unit file the unit reads environment variables from /etc/pullconfd/environment (the required format is documented here. Refer to the following table for all available parameters.

NameDescriptionMandatoryDefault
PULLCONF_LISTEN_ONThe socket address which the server should bind to.yes127.0.0.1:443
PULLCONF_TLS_CERTIFICATEPath to a TLS certificate file in PEM format.yes/etc/pullconfd/tls/server.crt
PULLCONF_TLS_PRIVATE_KEYPath to the corresponding private key in PEM format.yes/etc/pullconfd/tls/server.key
PULLCONF_RESOURCE_DIRDirectory containing StrictYAML files that define clients, groups, and their resources. Only files ending with .yaml or .yml will be parsed. Subdirectories may be nested up to ten levels. Directories and files starting with a dot are ignored.yes/etc/pullconfd/conf.d
PULLCONF_ASSET_DIRDirectory containing static file assets. This directory is served by the web server to enable clients to download file contents. Subdirectories may be arbitrarily nested.yes/etc/pullconfd/assets
RUST_LOGThis variable is read by the underlying logging library. Check their documentation for a complete overview of valid values.noinfo

After adding or changing environment variables you need to restart the unit:

sudo systemctl restart pullconfd.service

Systemd will then re-apply the settings from the environment file. Whenever environment variables are changed the unit must be restarted. However when files in $PULLCONF_RESOURCE_DIR change a reload will suffice to re-read StrictYAML files from this directory:

sudo systemctl reload pullconfd.service

Note that if the changed configuration cannot be successfully validated, the server will continue to operate with the old configuration.