Book Image

Google Cloud Platform for Architects

By : Vitthal Srinivasan, Loonycorn , Judy Raj
Book Image

Google Cloud Platform for Architects

By: Vitthal Srinivasan, Loonycorn , Judy Raj

Overview of this book

Using a public cloud platform was considered risky a decade ago, and unconventional even just a few years ago. Today, however, use of the public cloud is completely mainstream - the norm, rather than the exception. Several leading technology firms, including Google, have built sophisticated cloud platforms, and are locked in a fierce competition for market share. The main goal of this book is to enable you to get the best out of the GCP, and to use it with confidence and competence. You will learn why cloud architectures take the forms that they do, and this will help you become a skilled high-level cloud architect. You will also learn how individual cloud services are configured and used, so that you are never intimidated at having to build it yourself. You will also learn the right way and the right situation in which to use the important GCP services. By the end of this book, you will be able to make the most out of Google Cloud Platform design.
Table of Contents (19 chapters)
13
Logging and Monitoring

Configuring HTTP(S) load balancing

Let's take an example where we create two VMs in different regions with the same tag, and test them for HTTP(S) load balancing:

  1. Use the following command to create a VM and allow HTTP(S) traffic to it. Here, we are installing Debian on the VM and running commands such as updating it, installing Apache on it, and hosting a simple web page on it. You can name these instances sequentially for convenience, for example, www-1, www-2, and so on:
gcloud compute instances create <<<first-instance-name>>>  \
--image-family debian-8 \
--image-project debian-cloud \
--zone us-central1-b \
--tags https-tag \
--metadata startup-script="#! /bin/bash /
sudo apt-get update /
sudo apt-get install apache2 -y /
sudo a2ensite default-ssl /
sudo a2enmod ssl /
sudo service apache2 restart /
echo '<!doctype / /html&gt...