4 minute read
If your release train is moving slower than you would like, take a look at the three essential ingredients you should have.
There is no debate that engineering teams everywhere are moving faster than ever before. If we rewind just 20 years, it took Microsoft two years to build Windows XP and it was shipped as a CD. Since then, the industry has turned it up a notch in velocity every five years. It is akin to Moore’s Law, but possibly at even greater speeds. In today’s software-driven climate, the best tech companies — Facebook, Amazon, Netflix, Google — are releasing software updates thousands of times a day. Take Amazon, for example. In 2013, the company was doing a production deployment every 11.6 seconds. By 2015, this had jumped to 50 million deployments annually, or one every second, so there is no telling what cadence could be reached in 2019.
Every organization is always striving to get closer to the cadence of these famous, bleeding-edge companies. There is lots of advice out there about how to move in this direction, but it is often easier said than done. Jez Humble created a graphic for his book Lean Enterprise summarizing the breadth of changes one needs to make to move from releasing once every 100 days to hundreds of times a day.
This is the backlog of changes every engineering team needs to make to accelerate their release frequency. However, as with any backlog, it is not prioritized. It does not give guidance on which best practice should be adopted first, second, and third to achieve this transformation. So, here is a recommendation of where to start.
If You Do Only One Thing…
… do continuous integration (CI). This means that every engineer regularly checks in code to a central repository with an automated build verifying each check-in. The aim of CI is to catch problems early in development through regular integration. Without CI, almost every step an organization takes to increase its rate of deployment will be met with obstacles and bottlenecks.
If You Do Only Two Things…
… do CI and feature flags. Feature flags provide a foundation for minimizing risk at speed. They enable organizations to move from release trains to canary releases by allowing engineers and product managers to incrementally roll out a feature to subsets of users without doing a code deployment. Imagine a dial in the cloud that can be turned up to release a feature to more users and turned down in an emergency to roll back a feature. The magic of flags is that they let engineers test in production with actual users while giving control over the blast radius of any mistakes and significantly reducing risk.
If You Do Only Three Things…
… do CI, feature flags, and trunk-based development (TBD). TBD is a branching model that requires all engineers to commit to one shared branch. Since everyone works off the same branch, problems are caught early, saving all the time that is usually wasted in later integration. CI is a prerequisite of TBD. While TBD can be done without feature flags, it is best to use them in conjunction to make it easier to do long-running development off the trunk. A feature that is flagged off can have code committed directly to the trunk without risk of the code becoming accidentally visible to customers.
Although there will constantly be new ways to evolve development to speed it up, integrating these three techniques – continuous integration, feature flags, and trunk-based development – will ensure a solid foundation and go a long way toward increasing release frequency. These changes alone can help you move to daily releases, and may even allow multiple releases a day.
Note: this blog originally appeared in Dzone’s DevOps Zone blog.