DevOps on Google Cloud (GCP): Benefits, Adoption and ImplementationTake a deeper look into DevOps, how to adopt DevOps within your company, and how it can be implemented on the Google Cloud Platform.
December 03, 2020 | DevOps | Cloud Management | Google Cloud
Traditionally, software development has had two sides: the development side and the operations side. The former is responsible for writing the code and developing the app. The latter is responsible for testing the code in various environments including putting the code into production and then sharing the feedback back with the developers so they can make changes. Over the years, this process has become slow and problematic, leading to the rise of a new development philosophy - DevOps.
DevOps is extremely effective at extracting interdepartmental synergies and has thus been adopted by companies across different industries to make their software development process faster, more cost-effective, and more resilient. In this guide, we will take a deeper look into the paradigm shift that is DevOps, how to adopt DevOps within your company, and how it can be implemented on the Google Cloud Platform.
What is DevOps?
The word “DevOps” comes from development and operations - the two sides of creating commercial software. However, it’s a shift from the traditional roles of these two teams from opponents to allies. Even today, it’s common for the development team and operations team to come up with their own departmental goals to beat the other side. This mindset is clearly counter-intuitive for the company.
To avoid this competition, companies adopt DevOps to guide the efforts of both sides towards a few common objectives - faster software delivery, greater reliability, and shared workflows. It was no longer Development versus Operations but Development and Operations.
Therefore, DevOps isn’t a piece of software or a single implementation style, it’s a development philosophy that is adopted by companies and implemented through a number of principles and practices. It is based on the famous agile methodology that promotes creating more agile, scalable, and resilient applications, in many ways the opposite of traditional monoliths.
DevOps, as a development process, is also very dependent on cloud computing. Almost all of the defining characteristics of DevOps are made possible thanks to the advanced capabilities of cloud platforms. Therefore, if a company wants to adopt DevOps, it would likely need to make the shift to cloud computing. The good news, you don’t have to do these two things separately. DevOps, at its core, is a philosophy and so it can be used to guide your cloud migration process as well.
Benefits of DevOps
Adopting DevOps has tremendous benefits to any modern company, especially for companies that have software at their core. The following are some of the biggest benefits of adopting and implementing DevOps:
1. Shorter Time-To-Market
Companies that have embraced DevOps and cloud computing have significantly shorter time-to-market and deploy far more quickly. According to the 2019 State of DevOps report:
- the best DevOps teams deploy code 208x more often compared to the lower performers
- the best performers had 106x faster lead time from commit to deploy.
DevOps is architected to increase deployment. One of the ways DevOps developers achieve such short lead times is through the iterative process. With the use of microservices and continuous development pipelines, companies can develop many different aspects of the application at the same time (independent development).
2. Built for Automation
At the core of any DevOps, implementation is the Continuous Integration/Continuous Deployment (CI/CD) pipeline which, once set up, can automate everything from testing to deployment into production. CI/CD pipeline is very similar to an assembly line in concept and like the assembly line, it has revolutionized software development by automating repetitive testing, tracking iterations, and more.
CI/CD pipeline also has a feedback loop that brings feedback (usually from automated testing) back to the developer. Once the changes are made, the new iteration is automatically put back into the pipeline for more testing and finally deployment into the production environment.
3. Significantly Lower Failure Rates and Faster Recovery
Applications developed under high performing DevOps implementations are far more resilient with new changes and 7x less likely to fail. This can be partly attributed to the amount of testing that can be done with automated testing. Developers can write a number of tests that each deploy has to pass. More importantly, all failures and errors are recorded and automatically analyzed to find the source of the problem which reduces the time spent on debugging and ensuring all the bugs are fixed before changes are released into production.
DevOps also facilitates disaster recovery in many ways. First, each code change leads to a new release which means the original codebase is never permanently changed and can always be rolled back to the stable version relatively quickly. Second, microservices are loosely-coupled which means they can be changed or removed completely from the architecture without any major changes. The isolated nature also means they are less likely to lead to system crashes and downtime.
Security issues and vulnerabilities are much less common in DevOps based software development because security is a core aspect of the DevOps methodology. Different security measures are put in place at different stages of the software development lifecycle to mitigate risk as much as possible.
For instance, automated testing plays a big role in weeding out any vulnerabilities and misbehaviors early on and practices like limited rollouts (canary deployments) bring in human users for more comprehensive testing before a full release. Automated security assessments that sweep the system regularly also improve security significantly.
When it comes to security, the individual cloud platforms come into play as well. Different cloud platforms have different security-related software and technical guides that help developers cover all bases. Google Cloud Platform offers one of the most comprehensive security tools in its vast cloud ecosystem.
5. Easier Collaboration and Mixed Technology Stack
Distributing workloads is one of the best ways to get work done faster. But traditionally with monoliths, this was next to impossible as a single line of code could crash the entire application. Therefore, a single team would generally create the entire app at once. DevOps and cloud-native development promote a different approach (and make it possible).
With microservices, different teams can work on different micro services which are essentially different features of the app with confidence. More importantly, microservices support a mixed technology stack which means that developers who are proficient in different programming languages can write microservices for the same application because the system supports also popular programming languages.
Adopting DevOps might seem very similar to a digital transformation or a cloud migration, and thus very overwhelming. However, while it can involve cloud migration, adopting DevOps is usually more about a cultural and organizational change than a technological one.
Technical Requirements for DevOps
The broad requirement for adopting DevOps is a cloud-based infrastructure or cloud computing. Most companies will enter the world of cloud computing through cloud migration which includes rehosting or refactoring their existing application on a cloud platform such as the Google Cloud Platform (GCP).
Once the on-premises hardware has been phased out for a serverless, cloud infrastructure, companies start integrating different cloud solutions into their infrastructure. For instance, the Google Cloud ecosystem consists of hundreds of cloud-based solutions for everything from app development and monitoring to artificial intelligence and big data analytics. Many of these solutions are also fully-managed services that help reduce the developer’s workload by automating various processes.
Non-technical Requirements for DevOps
Since DevOps is primarily an organizational change, one of the biggest requirements is a mindset that accepts change. In fact, agility and open-mindedness are some of the factors that separate the top performers from the rest. DevOps brings about foundational changes to traditional software development companies but in order to enjoy the scalability, shorter lead times, better security, and resilience, companies must be able to accept organizational change even if it involves a digital transformation.
Another important non-technical requirement for DevOps is a culture of innovation and collaboration. Unlike traditional architectures, cloud computing gives developers a lot more room (and tools) to experiment and work together but none of that would matter if the implementation does not prioritize innovation as well as collaboration.
Implementing DevOps on GCP
The following are some insights on how DevOps can be implemented in a Google Cloud-based architecture:
One of the main strengths of the Google Cloud Platform is its services ecosystem with hundreds of cloud-based solutions. These services can be leveraged in two ways. First, the developer no longer needs to look outside the Google ecosystem for additional app development tools barring a few scenarios. This is very valuable as it saves money (licensing fees), time, and effort spent on ensuring compatibility because everything can be integrated out of the box. Second, having the same type of services used across different teams introduces a level of consistency in the app development which increases proficiency and reduces training costs.
Cloud Build is a fully serverless platform that allows developers to create powerful continuous integration/continuous deployment (CI/CD) pipelines with full control over workflows. It does not require any other custom software (such as Jenkins, although it does support third-party apps). Developers can test and deploy across different platforms including Compute Engine, Kubernetes, Firebase, and more. Cloud Build also supports all programming languages.
Google Container Registry is a Docker registry built into the GCP ecosystem. Apart from being a secure container image management platform, GCR comes with key features that differentiate it from other Docker registries. For instance, one of the most useful features of GCR is Vulnerability Scanning which enables developers to perform in-depth database scans that help flag any security vulnerabilities early in the development cycle. GCR is highly automated and images are automatically pushed to GCR when the developer commits code to a repository like Google Cloud Source Repositories or Github.
A new version of GCR called Artifact Registry with additional features has just been released as well..
Monitoring and tracking every change is of critical importance if a company wants to reduce disaster recovery times and mitigate security risks. To prioritize monitoring, companies can use Cloud Monitoring, a monitoring solution that achieves the following goals:
- Use smart analytics to identify recurring behaviors and trends and use this information to flag issues before they can cause major problems.
- Reduce monitoring overheard by bringing different monitoring and tracking processes under one service.
- Set up custom metrics, dashboards, and alert systems.
- Integrate with other Google Cloud services.
- Make data visualization easier by integrating different business intelligence apps.
Trunk-based development is a popular pattern where developers work together by dividing their workloads into even smaller tasks/workloads and merging all of these small tasks into a “trunk” multiple times a day. Trunk-based development is different from other collaborative patterns in that the tasks are smaller and thus merges happen much more frequently. Trunk-based development is an extension of the continuous integration pipeline and thus can be created with Google Cloud Build. The rigorous testing required with trunk-based development can also be automated through Cloud Build.
Version Control Systems (VCS)
Version control systems help developers keep track of the source code, tests, deployment scripts, and many more small changes that can be crucial during debugging, audit trails, and disaster recovery. There are third-party services that can be used as version control systems but a great alternative is Cloud Source Repositories as it integrates easily with other Google services such as Cloud Build, App Engine, Cloud Logging, etc.
DevOps is a powerful development philosophy that is quickly becoming the standard for software engineering. Although it can be overwhelming to legacy businesses, DevOps is crucial for promoting agility, resilience, innovation, and collaboration within modern development teams and help them utilize the full potential of a cloud-native infrastructure.