Book Image

Google Cloud Platform Cookbook

By : Legorie Rajan PS
Book Image

Google Cloud Platform Cookbook

By: Legorie Rajan PS

Overview of this book

Google Cloud Platform is a cloud computing platform that offers products and services to host applications using state-of-the art infrastructure and technology. You can build and host applications and websites, store data, and analyze data on Google's scalable infrastructure. This book follows a recipe-based approach, giving you hands-on experience to make the most of Google Cloud services. This book starts with practical recipes that explain how to utilize Google Cloud's common services. Then, you'll see how to make full use of Google Cloud components such as networking, security, management, and developer tools. Next, we'll deep dive into implementing core Google Cloud services into your organization, with practical recipes on App Engine, Compute Engine, Cloud Functions, virtual networks, and Cloud Storage. Later, we'll provide recipes on implementing authentication and security, Cloud APIs, command-line management, deployment management, and the Cloud SDK. Finally, we'll cover administration and troubleshooting tasks on applications with Compute services and we'll show how to monitor your organization's efficiency with best practices. By the end of this book, you'll have an overall understanding and hands-on implementation of Google Cloud services in your organization with ease.
Table of Contents (14 chapters)
Title Page
Dedication
Packt Upsell
Contributors
Preface
Index

VPN connection between two networks


Similar to the previous recipe, another way to establish a connection between two networks is via a VPN connection. Usually, a VPN connection is used to connect an on-premises network with GCP via an IPSEC tunnel. However, for all learning purposes, connecting two VPCs gives us a good understanding of how to go about a VPN setup.

Getting ready

The following are the initial setup verification steps and network creation to be carried out before the recipe can be executed:

  1. Create or select a GCP project.
  2. Enable billing and enable the default APIs (some APIs such as BigQuery, storage, monitoring, and a few others are enabled automatically).
  3. Similar to the previous recipe, we'll create a VPC network called alpha-nw. The following command assumes that you have set your default project:
gcloud compute networks create alpha-nw --subnet-mode=custom
  1. Next, let's create a single subnet called alpha-subnet-1 with an IP range of 192.168.0.0/16:
gcloud compute networks subnets...