Hacker News new | ask | show | jobs
by rtomayko 5384 days ago
Assuming your main product is on the web, you really only need a few things to do this right:

- Automated tests that run on push to any branch.

- Rolling deploys (no downtime) from any branch.

- Exception reporting system (Exceptional, Hoptoad, homegrown, whatever).

- Twitter search feed.

Push to a topic branch, wait for the tests to come in green, deploy from topic branch, watch exception notification and twitter. If everything looks okay after 10 minutes, push to master. If exceptions or twitter blows up, redeploy master.

You should be able to setup the whole system in about the same time as it takes to develop a majorish product feature.

3 comments

I've seen it mentioned a few times, but I've never gotten anyone to explain: how do you go about setting up a CI server (like Jenkins) to automatically track branches, new and old?
In Jekins builds can be triggered by simply calling a URL. In Github, it is really easy to add a post receive hook which calls a URL. Just call the build URL, and everytime a branch is pushed, Jenkins will build the project and to other things associated with the task (like deploying to staging, running tests on staging, and deploying to production if the staging tests don't return an error).

There is also a Plugin (https://wiki.jenkins-ci.org/display/JENKINS/Github+Plugin) which should handle this automatically.

At least with the latest jenkins and its git plugin, it builds/tests all branches by default.

Its not overly hard to setup, I just added git repos to the list. I'm still "testing" it locally on my workstation before we start using it in all of our environments.

Ahh, I probably should have updated jenkins and the plugin before asking that. Thanks!
Sorry, what do you mean by Twitter search feed?
A search for the product's name or handle on Twitter to detect a surge of activity post-deploy.

(Most surges are negative, eg. "Man, <YourService> is down AGAIN, this sucks.")

I assume watch a feed on Twitter for a search about your company or product. If people on Twitter start complaining in mass about your latest push it's probably a good sign that you need to roll back.
Ok, this is what I also assumed - although I would never rely upon this as part of my continuous deployment process, I guess it does little harm to still monitor and be aware of such things...
At Flickr, I always have our system graphs in one tab and our help forum in another tab.
What exactly is a rolling deploy and how would you set it up?