Package: trestus
Trestus is a static status page generator that uses aTrelloboard as a data source.It was inspired by the excellentstatuspageproject, which uses Github issues to drive a status page, and then stores on the same repo to be served via Github Pages, andThe Changelog Weekly, who useTrello as a CMSto generate their insanely useful newsletter.Why?Because you should be informing your customers of outages and issues affecting the services they use, and Trello is a very fast and easy to use interface for defining outages and investigations through kanban cards/lanes.How does it work?Trestus expects the board you tell it about to be setup on Trello with some specific lanes and labels available.When you add a card to theReportedorInvestigatinglane, label it with a severity and at least one service name, the card will show up in any one of those states on the generated status page.Trello:Trestus output:Your card can include markdown like any other Trello card and that will be converted to HTML on the generated status page, and any comments to the card will show up as updates to the status (and yes, markdown works in these too).Trello:Trestus output:When the outage has been solved, moving the card to theFixedlane will resolve it (putting the status back into the green but keeping any descriptions/comments as historical backlog underneath).Trello:Trestus output:LanesReportedInvestigatingFixedLabelsstatus:degraded performancestatus:major outageAny other label you add (without the ‘status:’ prefix) will be a service name.InstallationFrom PyPI with pip:$ venv ./trestus-env
$ ./trestus-env/bin/pip install trestusAs asnap package:$ sudo snap install trestusUsageusage: trestus [-h] [-k KEY] [-s SECRET] [-t TOKEN] [-S TOKEN_SECRET] [-b BOARD] [-T TEMPLATE] [-d TEMPLATE_DATA] output_path

Generate a status page from a Trello board

positional arguments:
  output_path           Path to output rendered HTML to

optional arguments:
  -h, --help            show this help message and exit
  -k KEY, --key KEY     Trello API key
  -s SECRET, --secret SECRET
                        Trello API secret
  -t TOKEN, --token TOKEN
                        Trello API auth token
  -S TOKEN_SECRET, --token-secret TOKEN_SECRET
                        Trello API auth token secret
  -b BOARD, --board-id BOARD
                        Trello board ID
  -T TEMPLATE, --custom-template TEMPLATE
                        Custom jinja2 template to use instead of default
  -d TEMPLATE_DATA, --template-data TEMPLATE_DATA
                        If using --custom-template, you can provide a YAML file to load in data that would be available in the template the template
  --skip-css            Skip copying the default trestus.css to the output dir.Example usagetrestus -k <trello key> -s <trello secret> -t <trello auth token> \
-S <trello auth token secret> -b <board ID> ./test.htmlThis will generateatest.htmlin your current directory, and also copy overtrestus.css(to skip this and use your own CSS, use the--skip-cssoption).If you want to provide your own Jinja2 template for generating the status page, you can use the-T/--custom-templateoption.For example we use this feature to translate our Three-Letter-Acronyms for service to more customer friendly long-form names, by pairing with the-d/-template-dataoption to pass in a YAML dict of aliases:trestus -k <trello key> -s <trello secret> -t <trello auth token> \
-S <trello auth token secret> -b <board ID> --T mystatus.html.j2 \
-d myaliases.yaml --skip-css ./test.htmlAs mentioned above, we’re also using the--skip-cssflag here to skip copying the default template CSS over, and instead use our own to apply a different logo/styling etc.How do I hook it up to Trello?The way I have achieved this is by creating a “secret” URL routed to a VM that runs a script which invokes trestus with theflockutility to limit invocations in a queue.I then hooked this address up to a webhook on the right Trello board, using Trello’swebhook API, so now whenver a change happens on FILLTHISINthe board an invocation of trestus is queued up on the target host.Nota bene: be careful about how this webhook handler is exposed, for example I have allowed only GET/POST in this situation as these are the actions Trello expect to be available (for verification, and hook postbacks respectively), but the URL also has a randomly generated portion.Bugs, issues, improvements, features requests and supportIf you have discovered an issue with trestus, or have an idea for improving it, please feel free tohit up GitHub issuesand I’ll work with you to improve things. ♥ ☺