Streamlining deployments with Hipfab
Software deployments can be tricky. Releasing new code into the wild without incurring downtime or negatively impacting users is no trivial task. At Inkling, we deploy new software and services that power Habitat and Inkling for web to a multitude of hosts on a daily basis. In order to make sure our deployment process is as efficient as possible, we use a task automation framework called Fabric, a lightweight Python-based library and command-line tool for streamlining the use of SSH.
We coordinate our deployments via Hipchat, our favorite group chat tool. Hipchat allows us to provide a high level of transparency for all stakeholders into our deployment workflow, which in turn enables quick and easy troubleshooting and resolution for any production issues. In order to speed up the entire messaging process, we’ve built a custom integration on top of Hipchat’s API to automatically send messages from our Fabric tasks, and we’re pleased to open source it today.
Hipfab is a simple python library that lets you add Hipchat integration directly to Fabric deployment scripts by replacing the Fabric
@task decorator with a
It looks like this:
from hipchat import hipchat
from fabric.api import run, env
env.user = ‘bill’
run(‘apt-get install allTheThings’)
We also built a custom
@checkroom decorator that can be used to check a particular room for a user before a task is executed. This is a useful way to prevent a deployment from happening if the necessary stakeholders are not online and ready to verify.
Hop on over to GitHub and take a look at the README for more details. We’d love to know what you think, so please send us feedback via Issues and Pull Requests.