Continuous integration at pT (today)13 October 2014
This may sound counterintuitive, but in software, when something is painful, the way to reduce the pain is to do it more frequently. At peerTransfer we found that integration and deployment was becoming more painful overtime (wow surprise!) so we took a few measures that we will try to explain in this article, just in case it is useful to you, fellow developer.
One problem we had was that the developers were developing, testers were testing and sysadmins were worried about systems reliability. So, who is responsible for deploying? Well, nobody, and everybody. We implemented a well-known agile solution for this problem: kanban + WIP limit.
Kanban forces ourselves to deploy at a steady pace and, in addition, to be involved in other aspects of the development when a problem occurs and the flow is stopped. This is how our board looks right now:
Since a comfortable process is important to keep the morale high, the tools have to be helpful, not a stone on the road. Most of the tools are hidden in chat commands, like
that runs a jenkins build. Yes, we trigger the builds manually. Besides, the CI system builds debian packages for each application/service if the branch built is master, leaving them ready to deploy.
Apart from that, one of the most used commands is deploy, which deploys the sha of the related github issue in a clean environment so that we can properly test it:
Once the master branch is built, is green and all the debian packages are created, it is time to do real stuff: ship to production. An old folk helps us to drive the releases: Deployinator.
Finally, the smoke suite run against production is the cherry on top, that allows us to leave early every friday without remorse. We run it manually once the deployment process is finished.
Here you can see the deployments we run within a typical week:
To wrap up with a lesson learnt, deployment is like going to the gym: painful and expensive if you do it once a month. Make it fast and easy, embed it into your daily routine, and the pain will become pleasure.
Miguel Angel Fernández. Developer at peerTransfer.