Preface

This book gets started by discussing the value of managed services and how they can help organizations focus on the business problems at hand. Build pipelines are critical in organizations because they help build, test, and validate code before it is deployed into production environments.

We then jump right into Cloud Build: the fundamentals, configuration options, compute options, build execution, build triggering, and build security.

The book’s remaining chapters close with practical examples of how to use Cloud Build in automation scenarios. While Cloud Build can help with software build life cycles, it can also coordinate delivery to runtimes such as serverless and Kubernetes.

Who this book is for

This book is for cloud engineers and DevOps engineers who manage cloud environments and desire to automate workflows in a fully managed, scalable, and secure platform. It is assumed that you have an understanding of cloud fundamentals, software delivery, and containerization fundamentals.

What this book covers

Chapter 1, Introducing Google Cloud Build. Establish the foundation of serverless and managed services, focusing software build life cycles with Cloud Build.

Chapter 2, Configuring Cloud Build Workers. It’s a managed service, but we still need compute and this chapter discusses the compute options available.

Chapter 3, Getting Started – Which Build Information Is Available to Me?. Kicking off the first build and discovering the information available once it has started to help inform you of success or debug issues.

Chapter 4, Build Configuration and Schema. You can get started quickly with Cloud Build, but knowing the configuration options can help you save time.

Chapter 5, Triggering Builds. This is the critical component for automation: react when something happens to your source files or trigger from existing automation tools.

Chapter 6, Managing Environment Security. It’s a managed service, but there are still shared responsibilities, determining who can execute pipelines, what pipelines have access to, and how to securely integrate with other services.

Chapter 7, Automating Deployment with Terraform and Cloud Build. We can also leverage Cloud Build to automate Terraform manifests to build out infrastructure.

Chapter 8, Securing Software Delivery to GKE with Cloud Build. Discovering patterns and capabilities available in Google Cloud for secure container delivery to Google Kubernetes Engine.

Chapter 9, Automating Serverless with Cloud Build. It’s serverless, but we still need to automate getting from source code to something running.

Chapter 10, Running Operations for Cloud Build in Production. Additional considerations may need to be made when preparing for Cloud Build in production, working with multiple teams.

Chapter 11, Looking Forward in Cloud Build. What’s next? For instance, we’ll look at how Cloud Deploy leverages Cloud Build under the hood.

To get the most out of this book

You need to have experience with software development, software delivery, and pipelines to get the most out of the book and Cloud Build.

You will need access to a Google Cloud account. Examples in the book can be performed in Google Cloud’s Cloud Shell, which has the majority of the tools and binaries noted in the book. If external resources are needed, they are noted in the respective chapters.

If you are using the digital version of this book, we advise you to type the code yourself or access the code from the book’s GitHub repository (a link is available in the next section). Doing so will help you avoid any potential errors related to the copying and pasting of code.

Download the example code files

The book will leverage examples from different repositories noted in the respective chapters.

Code examples in the book can be found at https://github.com/PacktPublishing/Cloud-Native-Automation-With-Google-Cloud-Build. If there’s an update to the code, it will be updated in the GitHub repository.

Packt Publishing also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!

Download the color images

We also provide a PDF file that has color images of the screenshots and diagrams used in this book. You can download it here: https://packt.link/C5G3h.

Conventions used

There are a number of text conventions used throughout this book.

Code in text: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: “In this case, we will be creating a private pool of workers that have the e2-standard-2 machine type, with 100 GB of network-attached SSD, and located in us-west1.”

A block of code is set as follows:

  # Docker Build
  - name: 'gcr.io/cloud-builders/docker'
    args: ['build', '-t', 
           'us-central1-docker.pkg.dev/${PROJECT_ID}/image-repo/myimage', 
           '.']

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

...
INFO[0002] No cached layer found for cmd RUN npm install 
INFO[0002] Unpacking rootfs as cmd COPY package*.json ./ requires it.
...      
INFO[0019] Taking snapshot of files...                  

Any command-line input or output is written as follows:

$ project_id=$(gcloud config get-value project)

$ vpc_name=packt-cloudbuild-sandbox-vpc

Bold: Indicates a new term, an important word, or words that you see onscreen. For instance, words in menus or dialog boxes appear in bold. Here is an example: “Select System info from the Administration panel.”

Tips or important notes

Appear like this.

Get in touch

Feedback from our readers is always welcome.

General feedback: If you have questions about any aspect of this book, email us at [email protected] and mention the book title in the subject of your message.

Errata: Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you have found a mistake in this book, we would be grateful if you would report this to us. Please visit www.packtpub.com/support/errata and fill in the form.

Piracy: If you come across any illegal copies of our works in any form on the internet, we would be grateful if you would provide us with the location address or website name. Please contact us at [email protected] with a link to the material.

If you are interested in becoming an author: If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, please visit authors.packtpub.com.

Share Your Thoughts

Once you’ve read Cloud-Native Automation with Google Cloud Build, we’d love to hear your thoughts! Please click here to go straight to the Amazon review page for this book and share your feedback.

Your review is important to us and the tech community and will help us make sure we’re delivering excellent quality content.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.119.124.49