Google Cloud Cookbook

Book description

Get quick hands-on experience with Google Cloud. This cookbook provides a variety of self-contained recipes that show you how to use Google Cloud services for your enterprise application. Whether you're looking for practical ways to apply microservices, AI, analytics, security, or networking solutions, these recipes take you step-by-step through the process and provide discussions that explain how and why the recipes work.

Ideal for system engineers and administrators, developers, network and database administrators, and data analysts, this cookbook helps you get started with Google Cloud regardless of your level of experience. Google veterans Rui Costa and Drew Hodun also cover advanced-level Google Cloud services for those who have appreciable experience with the platform.

  • Learn how to get started with Google Cloud
  • Understand the depth of services Google Cloud provides
  • Gain hands-on experience using practical examples and labs
  • Explore topics that include BigQuery, Cloud Run, and Kubernetes
  • Build and run mobile and web applications on Google Cloud
  • Examine ways to build your cloud applications for scale
  • Build a minimum viable product (MVP) app to use in production
  • Learn data platform and pipeline skills

Publisher resources

View/Submit Errata

Table of contents

  1. Preface
    1. Who Should Read This Book
    2. Why I Wrote This Book
    3. Navigating This Book
    4. Conventions Used in This Book
    5. Using Code Examples
    6. O’Reilly Online Learning
    7. How to Contact Us
    8. Acknowledgments
  2. 1. Introduction
  3. 2. Cloud Functions
    1. 2.1. Creating a Public HTTP Google Cloud Function
    2. 2.2. Authenticating an HTTP Google Cloud Function
    3. 2.3. Accessing Environment Variables at Runtime
    4. 2.4. Sending Emails from Cloud Functions with SendGrid
    5. 2.5. Deploying Cloud Functions with a GitLab CI/CD Pipeline
    6. 2.6. Responding to SMS Messages with Twilio and Cloud Functions
    7. 2.7. Unit Testing with GitLab and Cloud Functions
    8. 2.8. Building an API Gateway to Gather Telemetry Data
  4. 3. Google Cloud Run
    1. 3.1. Deploying a Prebuilt Hello World Container
    2. 3.2. Building Your Own Hello World Container
    3. 3.3. Using Cloud Run with a Custom Domain
    4. 3.4. Triggering a Cloud Run from Cloud Pub/Sub
    5. 3.5. Deploying a Web Application to Cloud Run
    6. 3.6. Rolling Back a Cloud Run Service Deployment
    7. 3.7. Deploying Cloud Run Services in a Gradual Rollout
    8. 3.8. Cloud Run Configuration Parameters
  5. 4. Google App Engine
    1. 4.1. Deploying a Hello World to App Engine (Standard)
    2. 4.2. Deploying a Hello World to App Engine (Flexible)
    3. 4.3. Securing Your Application with Identity-Aware Proxy
    4. 4.4. Mapping Custom Domains with App Engine
    5. 4.5. Using the Google Cloud Translation Machine Learning APIs with App Engine
    6. 4.6. Building User Interfaces for Viewing Charts and Graphs
    7. 4.7. Debugging an Instance
    8. 4.8. Using CI/CD
  6. 5. Google Cloud Compute Engine
    1. 5.1. Creating a Windows Virtual Machine
    2. 5.2. Creating a Linux Virtual Machine and Installing NGINX
    3. 5.3. Connecting to Your Windows Virtual Machines with Identity-Aware Proxy TCP Forwarding
    4. 5.4. Securing Your Virtual Machine Logins with Two-Step Verification
    5. 5.5. Running Startup Scripts
    6. 5.6. Creating a Group of NGINX Web Servers with a Managed Instance Group
    7. 5.7. Deploying Containers to Managed Instance Groups
    8. 5.8. Transferring Files to Your Virtual Machine
    9. 5.9. Using VM Manager for Patch Management
    10. 5.10. Backing Up Your Virtual Machine
  7. 6. Google Cloud Kubernetes Engine
    1. 6.1. Creating a Zonal Cluster
    2. 6.2. Creating a Regional Cluster
    3. 6.3. Resizing a Cluster
    4. 6.4. Automatically Routing Traffic to the Nearest Cluster with Multi-Cluster Ingress
    5. 6.5. Deploying a Spring Boot Java Application
    6. 6.6. Deploying a Java Application to Kubernetes, Using Skaffold
    7. 6.7. Using GKE Autopilot for Running an Application You Don’t Have to Manage
  8. 7. Working with Data
    1. 7.1. Speeding Up Cloud Storage Bulk Transfers by Multiprocessing
    2. 7.2. Speeding Up GCS Transfers for Large Files with Parallel Composite Uploads
    3. 7.3. Mounting GCS as a Filesystem
    4. 7.4. Automatically Archiving and Deleting GCS Objects
    5. 7.5. Creating and Restoring from Persistent Disk Snapshots in GCE
    6. 7.6. Using Interleaved Tables in Your Cloud Spanner Database
    7. 7.7. Locking Down Firestore Database So a User Can Edit Only Their Data
  9. 8. BigQuery and Data Warehousing
    1. 8.1. Using Cloud Console to Run a BigQuery Query
    2. 8.2. Loading Data to BigQuery from CSV
    3. 8.3. Building a Pivot Table in BigQuery
    4. 8.4. Adding Partitioned and Clustered Columns to an Existing Table
    5. 8.5. Adding Clustering to a Table That Can’t or Shouldn’t Be Partitioned
    6. 8.6. Selecting the Top-1 Result
    7. 8.7. Merging Tables in BigQuery Without Duplicates
    8. 8.8. Deduplicating Rows in BigQuery with Timestamps
    9. 8.9. Undeleting a Table in BigQuery
    10. 8.10. Streaming JSON or Avro Data into BigQuery with a Dataflow Template
  10. 9. Data Processing Tools
    1. 9.1. Cleaning Data Using the Data Fusion GUI
    2. 9.2. Running a Simple Python Dataflow Pipeline
    3. 9.3. Building a Streaming Pipeline in Dataflow SQL
    4. 9.4. Querying BigQuery from a Dataproc Job
    5. 9.5. Adding Event Timestamps to Pub/Sub
    6. 9.6. Inferring and Using Schemas in Dataflow
    7. 9.7. Mini-batching and Streaming Dataflow Data to BigQuery Using Filters
    8. 9.8. Triggering a Dataflow Job Automatically from a GCS Upload
  11. 10. AI/ML
    1. 10.1. Creating a Vertex AI Notebook
    2. 10.2. Training a Python ML Model Serverlessly
    3. 10.3. Making Serverless Predictions with a Python Model
    4. 10.4. Creating a Custom Notebook Environment
    5. 10.5. Extracting Data from BigQuery to Pandas for Model Training
    6. 10.6. Training a Model in SQL with BQML
  12. 11. Google Cloud Security and Access
    1. 11.1. Creating a Service Account
    2. 11.2. Creating Custom Roles to Access a Cloud Storage Bucket
    3. 11.3. Authenticating an Application Running on Kubernetes Engine
    4. 11.4. Retrieving the Authenticated User’s Identity
    5. 11.5. Authenticating a Java Application Using a Service Account
    6. 11.6. Building Reports Using the Cloud Asset API
    7. 11.7. Allowing a List of IP Addresses to Access Your Application
  13. 12. Google Cloud Networking
    1. 12.1. Creating a Custom Mode VPC Network
    2. 12.2. Creating a Static External IP Address
    3. 12.3. Create a Firewall Rule
    4. 12.4. Serving Content for Users in a Specific Region
    5. 12.5. Configuring VPC Network Peering
    6. 12.6. Creating VPN Gateways with Cloud Routers
    7. 12.7. Deployments of Networks Using Terraform
    8. 12.8. Limiting Access to Only Authorized Networks with VPC Service Controls
  14. Index

Product information

  • Title: Google Cloud Cookbook
  • Author(s): Rui Santos Costa, Drew Hodun
  • Release date: October 2021
  • Publisher(s): O'Reilly Media, Inc.
  • ISBN: 9781492092896