On the Vitals Choice team, we have divided our product into a number of apps.
Each of those apps has one running instance per environment , and we have
several environments. So as you might imagine, making sure updated code
gets propagated through all those places at the right time can be quite
the task. Luckily, we have a Hubot instance which does most of the heavy
lifting, but even issuing all the Hubot commands for every single app makes you
wonder: shouldn’t there be a way to automate this better?
Well, it turns out that an attempt had been made in the past, but we ran into
told to update all the apps for a particular environment, and the simultaneous
processes overwhelmed the CPU and memory.
Considering the problem, I realized that callbacks were the way to go. Hubot
comes with an evented system, which we could utilize to force Hubot to only
launch one app at a time. Here’s what I came up with, and what I learned along