Why Continuous Deployment just keeps on giving
原文地址 主题: 论持续部署的好处.
持续部署最主要的好处是可以很快获得反馈
From our internal deployment dashboard we can see just how many times we’ve deployed Intercom every day over the last three years. From the middle of 2012, it was about 10 times a day and today we’re over 80 times a day, and I predict by the end of 2015 we’ll definitely be over 100 times a day. 从2012年大约每天10次, 到现在2015年接近100次
The main driver for this massive increase in deployment rate is that we’ve grown our team significantly over that time. So when we have this many people working together on a product that changes 80 times a day our deployment process needs to be smooth, reliable and fast. 提高部署次数的主要驱动力是团队人员增加
Continuous Deployment结构
Back when we were six people, we started working on an automated deployment system for Intercom. 在公司只有6人的时候已经使用CD了
Here’s a quick overview of how it works:
After a code review on GitHub, engineers merge their features into the master branch. GitHub sends a webhook to Codeship, who run our test suite for us to make sure there are no regressions in existing behaviour. GitHub also send a webhook to a tool we built called Muster, which prepares the latest version of the code for release. (Codeship做单元则是, Muster准备最新版本部署)
Once the tests have run successfully, Codeship sends a webhook to Muster, and the code is pushed out to our production environment of about 200 EC2 instances. (Muster将最新版本部署到200个EC2实例上)
The whole process generally takes less than 10 minutes end-to-end. This is fast enough that engineers should never be blocked waiting for a deployment; if I’m working on a feature that’s in beta and I have a dozen bugs to fix before release, I could easily deploy them all in a single day – assuming I can write the code that fast. (整个过程在10min以内)
CD一些其他意想不到的好处
- Helping new engineers. 新来员工可以很容易参与到开发中
- Cut out bad behavior 避免出现bug时候直接到线上环境去hack.