ChatOps setup that I'm using to operate my new project
I like “boring technology” and I also like some of the fancy new tech. For my new indie project - eBonito I use a mix of both. For the iOS app I use the latest Apple frameworks, like SwiftUI and SwiftData. On the back-end I run extremely boring Python code with libraries mostly from the standard library, with only exceptions being Werkzeug WSGI library and Gunicorn WSGI server. OK, this is a topic for the next blog post, but for this one I wanted to describe my ChatOps setup that also uses mostly boring tech…
My new project is an iOS app that knows how to parse receipts from the major supermarket chains in Germany. Based on the purchased products, the app offers various insights to the user about saving opportunities and offers on the products they have bought in the past. To operate the back-end, that scrapes offer and product information from the Internet, I’ve setup a ChatOps based system that lets me control everything (mostly) without the need to run scripts locally or on the server.
Here’s a simplified diagram of my setup:
Whenever there’s a task for me to perform, I get a message in the IRC channel that myself and the chatbot are connected to. Then I either execute a chatbot command to perform the task or do whatever else required to solve it. Same goes for notifications about various events I need to know (like exceptions thrown by any of the apps).
Every tool in this setup is open-source and relatively easily replaceable with another tool when and if it will be needed. It doesn’t depend on any proprietary SaaS to get the job done. The obvious downside is that custom setups like this do require setup and maintenance which takes away time from building the product but I’m ready to take the hit to stay flexible and independent.
What to use for each of the ChatOps related “boxes” wasn’t always an easy or obvious choice. For the IRC server I chose ngircd, mostly because it was available in the OpenBSD package repository. It’s clearly meant for more serious setups of real IRC channels, so “downgrading” it to a simple local ChatOps server was a task. I do want some of the more modern IRCv3 capabilities, so to enable those I chose soju bouncer that enables some modern features on top of a classic IRC server. IRC client also has to support the same modern IRC stuff, so I also need a client that can make use of the new capabilities. This was the hardest one to solve. My requirements were, in my opinion simple, but I did not find any client that solves all of them well. Currently I’ve settled on multiple tools where I choose one depending on the task at hand - Goguma on iOS (for reading those exception messages while AFK), Emacs IRC client erc for fast action, when I need to get stuff done. Gamja and/or Halloy for desktop GUI clients for having it open on the second screen while working to keep an eye on things. I really wanted to use Igloo IRC client for macOS and iOS and would be ready to pay their subscription but I just couldn’t due to their custom UI where I can’t copy/paste words. Halloy has similar issues, but it’s free, so I went with the free option…
Let me know if you have ideas how to improve my setup, or share yours if you’re running something similar.