Generate TPO configuration from the canonical services file
Include a script that compiles Onionprobe config from TPA-specific configuration, needed for the Onionprobe testbed using TPO onion sites.
When using the Debian package built from this merge request, the TPO configuration can be built with a command like
/usr/share/onionprobe/examples/tpo.py \
/srv/puppet.torproject.org/puppet-facts/onionbalancev3-services.yaml \
/etc/onionprobe
This should create a /etc/onionprobe/tpo.yaml
config ready for Onionprobe and using default parameters (which we can discuss whether they suit TPO's needs).
That script also supports fetching the configuration from a remote URL (currently https://onion.torproject.org/services.json), but this functionality is untested as the URL does not exists right now.
While the suggested approach for TPA usage is via a local config file (onionbalancev3-services.yaml
), the remote URL usage is left for testing and other uses.
Also note that currently the onionbalancev3-services.yaml
does not seem to be neither a well-formed YAML or JSON file, but a sequence of JSON data separated by newlines.
A new 0.3.1 release is intended for this feature, which also adds other config generation examples into the Debian package.