Cloud Native Apps on Google Cloud Platform
eBook - ePub

Cloud Native Apps on Google Cloud Platform

Use Serverless, Microservices and Containers to Rapidly Build and Deploy Apps on Google Cloud

Alasdair Gilchrist

Share book
  1. English
  2. ePUB (mobile friendly)
  3. Available on iOS & Android
eBook - ePub

Cloud Native Apps on Google Cloud Platform

Use Serverless, Microservices and Containers to Rapidly Build and Deploy Apps on Google Cloud

Alasdair Gilchrist

Book details
Book preview
Table of contents
Citations

About This Book

Step-by-step guide for developing cloud native apps on GCP powered by hands-on interactive learning

Key Features
? Cutting-edge coverage on Google Cloud Build, Cloud Run, GKE, Kubectl and Anthos.
? Includes tutorials and exercises to learn designing, deploying and running cloud native apps.
? Covers Service Mesh, Apps Optimization, logs monitoring and cloud IAM access.

Description
The book "Cloud Native Apps on Google Cloud Platform" teaches the readers how to design, construct, and maintain successful cloud-native apps using the Google Cloud Platform. With interactive tutorials, the book reinforces learning and helps to develop practical skills for working in an Agile and DevOps context. The book provides a step-by-step approach to building and managing cloud-native applications on Google Cloud Platform for Google Cloud Users, DevOps teams, and Cloud-Native Developers.First, you will investigate the advantages and applicability of each Google Serverless Computing option. You'll learn about Cloud Build and how to use it to prepare code files, create microservices, and build container images. The book walks readers through creating and running Docker image containers on Cloud Run and App Engine. You'll learn how to use kubectl to create and manage Kubernetes clusters, as well as how to configure the autoscaler for increased resilience and availability. You'll build a pipeline that uses Cloud Build to automate CI/CD and Pub/Sub to ingest streaming data.Finally, you'll have the opportunity to learn about Anthos, which enables you to manage massive GKE clusters in both Cloud and on-premises environments.

What you will learn
? Distinguish between using containers or microservices for cloud native apps.
? Build a streaming data pipeline using BigQuery and Dataflow using Pub/Sub.
? Practice to deploy and optimize cloud native applications on Kubernetes Engine.
? Build continuous integration/continuous delivery pipelines and improve Kubernetes apps.
? Learn to protect apps running on GCP from cyberattacks.

Who this book is for
This book is meant for the Cloud and DevOps professionals and for those who wish to learn about Google Cloud services and incorporate them into end-to-end cloud applications.

Table of Contents
1. Introducing Cloud Native Apps
2. Developing Cloud Native Apps with Cloud Shell
3. Preparing Source-Code with Cloud Build
4. Create and Deploy Microservices
5. Building and Deploying Containers in Cloud Build
6. Create a Serverless Pipeline with Pub/Sub, Dataflow and BigQuery
7. Container Orchestration with Google Kubernetes Engine
8. Deploying and Managing Kubernetes Applications
9. Optimizing Kubernetes Cluster and Apps in GKE
10. Deploying a CI/CD Pipeline with Kubernetes and Cloud Build
11. Build a Software Delivery Platform with Anthos
12. Application Management with Anthos
13. Securing Cloud Native Apps in Anthos

Frequently asked questions

How do I cancel my subscription?
Simply head over to the account section in settings and click on “Cancel Subscription” - it’s as simple as that. After you cancel, your membership will stay active for the remainder of the time you’ve paid for. Learn more here.
Can/how do I download books?
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
What is the difference between the pricing plans?
Both plans give you full access to the library and all of Perlego’s features. The only differences are the price and subscription period: With the annual plan you’ll save around 30% compared to 12 months on the monthly plan.
What is Perlego?
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Do you support text-to-speech?
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Is Cloud Native Apps on Google Cloud Platform an online PDF/ePUB?
Yes, you can access Cloud Native Apps on Google Cloud Platform by Alasdair Gilchrist in PDF and/or ePUB format, as well as other popular books in Computer Science & Software Development. We have over one million books available in our catalogue for you to explore.

Information

Year
2022
ISBN
9789355511232

CHAPTER 1

Introducing Cloud Native Apps

The goal of this book is to teach you how to design, build, and deploy Cloud-native apps on the Google Cloud Platform. The book describes a modern approach to building, running, and deploying software applications by leveraging the flexibility, scalability, and resilience of cloud computing. The book focuses on building Cloud Native apps based on Agile Development and DevOps/GitOps techniques using the Google Cloud Platform (GCP's) tools and technologies. It is designed to provide you with knowledge and information through a balance of traditional text and video reinforced by hands-on interactive labs.
In this chapter, we will learn about the modern method for rapidly developing flexible and resilient applications in the cloud. The applications are truly cloud native from pre-design through deployment and management. In this chapter, you'll begin with some crucial cloud concepts and learn about the principles, technologies, and processes that make developing cloud-native apps possible.
You will then look at three key areas of cloud thinking: automation, modernization, and continuous integration/continuous delivery. You will also learn how pipelines automate the CI/CD processes, which are the backbone of DevOps. Then, you will dive deeper into learning about the specific platforms, tools, and techniques used in GCP for developing cloud native apps. You will learn about microservices, functions, and containers and how we can build and deploy our code in GCP's serverless environment on either Cloud Functions, App Engine, or Cloud Run.

Structure

We will cover the following topics in this chapter:
  • What are Cloud Native Apps?
  • Cloud-native application architecture
  • The dawn of modern DevOps
  • The Google Cloud Platform service model
  • Interactive tutorials: deploy a Nodejs app on
    • Cloud Function
    • App Engine
    • Cloud Run

Objectives

After going through this chapter, you will be able to describe what a cloud native is and list its characteristics. You will also be familiar with the modern concepts of DevOps and the CI/CD process in particular. You will have a good understanding of the Google Cloud Platform service model and understand the difference between each service offered. Through practical hands-on learning, you will also be able to deploy a sample application to Cloud Functions, Google App Engine, and Cloud Run.

About Cloud Native Apps

Traditionally, software was developed as a monolithic structure that was designed to run on a mainframe or on a single large server and developed adhering strictly to predefined features and specifications. The problems with the monolithic design were that it contained multiple tightly coupled layers, such as the user interface, the business logic layer, and the data interface layers, which made rolling-out, maintaining, upgrading, and adding features more difficult.
The solution to these drawbacks was the service-orientated architecture (SOA), which split up the single all-purpose monolith into service-oriented functional blocks that were accessed via synchronous web services. Decomposing the monolith into a service orientated architecture resolved the issues of slow rollout, complex debugging, and upgrades. It also provided better scalability. However, one problem persisted: managing the complexity of interconnections between all those services, especially when run on a distributed platform such as the cloud. The solution was driven by the emergence of containers such as Docker and container orchestration solutions like Kubernetes. Now developers could fully embrace the features of the cloud and break down services into multiple microservices that ran independently. The complexity was resolved as the vast web of interconnectivity was handled by service meshes, message-brokers such as pub/sub, and asynchronous event-driven APIs.
In short, Cloud Native apps take advantage of the emerging cloud-based technologies like functions as a service, microservices, containers, Kubernetes, and declarative event-driven APIs. These are the building blocks used to design, construct, deploy, and run modern applications. These technologies are at the core of all automated pipelines for continuous implementation and continuous delivery (CI/CD), which is the foundation for modern Development and Operations - DevOps. This, in turn, empowers organizations to build and deploy highly scalable applications on the Google Cloud Platform.
Figure 1.1: Cloud Native apps
In software development, an application is said to be native if it has been developed for use on a specific platform or language. Therefore, a native app is a computer program that is designed to leverage the features and functions available only on a specific computing architecture. Hence, we can say that Cloud Native applications are designed to capitalize on the inherent characteristics of a cloud computing architecture and leverage the underlying cloud's suite of technologies, tools, and software delivery model.
Cloud Native apps are, therefore, designed and built from the ground up to be deployed on the cloud. Nonetheless, a true cloud native application fully takes advantage of cloud by using technologies that are highly scalable, fully managed, distributed microservices architecture for all parts of applications with great elasticity and reliability that can only be run in the cloud. However, Cloud Native apps can still be run on-premises infrastructure, albeit without the benefits of cloud. Due to this, the boundaries of what is and what isn't cloud native have blurred.
The Cloud Native Computing Foundation (CNCF) defines it as:
"Cloud-native technologies empower organizations to build and run scalable applications in modern, dynamic environments such as public, private, and hybrid clouds."
The common cloud native features should provide scale, elasticity, and resilience, and serverless and microservices architecture are key technologies that help achieve those goals. The latter is where applications are broken down into functions or microservices and then packaged in lightweight containers to be deployed and orchestrated across a variety of virtual servers.
The advent and pervasiveness of the Cloud has driven the development of cloud-native applications as these components were critical in the evolution towards the integration, automation, and rapid deployment of code that businesses require today. Indeed, cloud-native apps are the foundation of the modern practice of DevOps. Indeed, the proponents of DevOps use cloud-native applications for their ability to deliver software with a shortened time to market and profit. This approach promotes business agility as cloud-native applications have shortened application lifecycle but provide faster return on investment. From the developers' point of view, a cloud native approach facilitates rapid deployment and consistent upgrades. The operational perspective is that they are highly resilient, manageable, and observable.

Cloud-native application architecture

As you just learned, cloud-native apps leverage cloud computing frameworks. They are designed and built to take advantage of the cloud platforms preference for loosely coupled cloud services. This architecture enables applications to scale out horizontally and provide redundancy, and it allows applications to dynamically scale in response to fluctuating demand and to withstand local disruptions and equipment failure.

Features of a cloud-native application

At the heart of the design Cloud-native applications are these loosely coupled services, which can be viewed as being small snippets of specialized code. They may be called functions or a microservice, depending on their characteristics. Either way, they are used to build a specific service. Typically, the ground rule is 1 microservice = 1 purpose = 1 service. This rule ensures service independence and that resources for each service are efficiently provisioned, making the application flexible and adaptable to a cloud architecture. We will go into why this is a hugely beneficial approach later in the chapter.
For now, it is sufficient to understand that previously, cloud native applications were run and deployed to serverless platforms such as Cloud Function or perhaps App Engine on the Google Cloud Platform (GCP). R...

Table of contents