Are you shipping early and shipping often? Or does the concept of “release day” still imply last minute testing, tedious code review and one-off, inexplicable deployment errors?
Thanks to massive gains in CI/CD (Continuous Integration and Continuous Delivery) tools, DevOps automation is a thing of the present that is quickly becoming the DevOps norm. By investing in a CI/CD pipeline, your organization will benefit from increased agility in response to customer needs, increased developer autonomy, rolling updates to production and confidence in error free deployments.
The road to DevOps automation can be daunting, so let’s break down the path for switching from manual to automatic with Google Cloud Platform as your environment of choice.
Continuous Integration Means Autonomy for Developers
Continuous Integration is the practice of allowing developers to merge code into a central repository (Github, for example) and having a CI server build and validate code with a series of automated tests. For CI to work well, it’s recommended to have wide coverage (above 80%) of your codebase in order to confidently know that any integrated code will not cause issues further down the pipeline. If a commit to the central repository fails any tests, it’s not integrated with the codebase and the developer can fix it immediately.
One of the barriers in investing in a CI/CD pipeline is the time requirement for creating robust integrations testing of newly developed code. The simple truth is a CI/CD pipeline that produces erroneous results will end up causing more headaches and wasting more time than before.
An easy way to start the cultural shift towards code testing is to start small with unit tests. These can usually be created by developers before they commit to the central repository, and it’s a perfect, granular building block before moving up to Integration tests and System tests. By starting somewhere and exploring CI tools available along the way, your team will discover out-of-the-box tests to implement that don’t require significant development time.
Taking Advantage of Google Kubernetes Engine for Your CI/CD Pipeline
If you’re already hosting your application in Google Cloud Platform on Kubernetes Engine, the infrastructure for automated deployment is at your fingertips. Coupling Kubernetes with one of a handful of automation tools supported by GCP will abstract away many of the hard parts of DevOps, allowing your QA engineers to focus less on one-off build issues and more on testing infrastructure and developer support.
Jenkins, Spinnaker, CircleCI, Gitlab and TeamCity are popular choices – though your ultimate decision will depend on your codebase and business needs. Jenkins, for example, has hundreds of plugins to meet almost any custom requirement, but this comes at the price of complexity and usability. Gitlab, on the other hand, might allow for a quicker jumpstart and even provides an “Auto DevOps” feature that detects your environment and automatically implements integration tests specific to your build.
Continuous Delivery Means No Developer Downtime at Deployment
A solid CI foundation is a prerequisite to Continuous Delivery, with the former allowing the latter to be hassle free and uneventful. In a culture of continuous delivery, dev teams eschew that frustrating development downtime that results from massive deployments where no one is allowed to touch the codebase. Instead, the CI server monitors rolling commits to the codebase, runs tests, and queues the application for deployment (a simple click of the button, which can be automated if desired). When coupled with a microservices architecture, this results in an environment of multiple production deployments per day – an increased pace which certainly requires some changes to business process to keep up with.
For one, deployment no longer becomes a big, newsworthy event where you notify all of your users by email and hang streamers on the wall. Minor updates to production can be tracked in an a scrum software, and only major new features make it to formal announcements.
With such frequent deployments arises an even higher need for real-time monitoring (through Stackdriver Monitoring on Google Cloud). This helps the team catch any issues that were not readily apparent in testing, and any issue that makes it into production serves to inform the QA team of how to improve testing coverage to eliminate the issue in the future.
A CI/CD Pipeline Is Worth the Investment (It Pays Off Sooner Than You Think)
While investing in a CI/CD pipeline comes with an upfront cost of development that might not feel closely tied to new feature development, the payoff is in time saved avoiding deployment headaches, allowing critical bugs into production, and missing business opportunities do to long/stagnant deployment cycles.
As with any significant shift in your organization’s development workflow, it’s critical to have expert guidance to avoid the pitfalls of CI/CD development. SADA’s expert team cannot only guide your DevOps automation strategy, but also find quick-win opportunities to refactor to microservices or offload workloads to Google Cloud Platform along the way. The end result is a cost-effective, harmonious feedback loop between your end users, product managers and developers.
Interested in learning more about Google Cloud Platform? Request a complementary TCO analysis today!