One-click-deployment with Hubot – Hubot: my new mate, co-worker and devops engineer

May 27, 2012 • Ole Michaelis

Do you know “Hubot”? This awesome robot build by the github guys?

Hubot Hubot

No? Srsly? Ok you should meet him – here - now!

Ok now you might have a clue what he’s doing now? Some toy for man, heh? But no honestly he can do much MUCH more. He’s some kind of a friend, he slaps you when you use inappropriate language, replies to your questions or just let you waste some time with 9gag. And there is more, it’s up to you to train him new stuff. Let him do the stuff you hate to do, pick a pizza delivery service, decide for a nice song or even let him deploy you app!

And this is what I wan’t to talk about. We at Digital Pioneers use Scalarium to manage our AWS hosted apps. With scalarium you first define an could, define different roles, like Webserver, Loadbalancer and Databases. You can assign apps to the clouds and then do some common tasks on the app or on the cloud. Like deploy the application, reboot an webserver or add an extra webserver for better scaling. You can do all the stuff on the scalarium website or use the api.

We want some of kind one-click-deployment. On the scalarium website an deploy is more then just one click and the session expires pretty fast, so deploying on the scalarium website is kind of annoying. So I took the chance to learn some thing new, CoffeeScript (hubot scripts are written in CoffeeScript). I wrote a little ApiClient for scalarium and connected it to hubot. So now we’re able to deploy within our developer chat. This looks like this:

Hubot deploy Hubot deploy

This is pretty awesome heh? And because we at Digital Pioneers love Open Source, we will give some love back to the community. So here’s the hubot script: . I’ll contribute the script back to hubot-scripts after we some how tested it b/c as far as i noticed yet it’s a lil bit buggy. And not that feature complete as i would like to have it.

The bot is also able to list app and clouds, but this features are not that amazing like the deployment thingy, just want to mention it here, to be complete :)

What about you? You also love OpenSource? You also love these devops thingy? WE ARE FUCKING HIRING! We’re serious, we are looking for you as an DevOps Engineer or Software Developer! So come on and be my co-worker and join Digital Pioneers N.V.!

UPDATE May 30, 2012

This scripts got finally fully merged into hubot-scripts. So please feel free to contribute, use and love it!