Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Google Cloud Platform Administration
Google Cloud Platform Administration

Google Cloud Platform Administration: Design highly available, scalable, and secure cloud solutions on GCP

By Ranjit Singh Thakurratan
R$218.99 R$80.00
Book Sep 2018 230 pages 1st Edition
eBook
R$218.99 R$80.00
Print
R$272.99
Subscription
Free Trial
eBook
R$218.99 R$80.00
Print
R$272.99
Subscription
Free Trial

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Buy Now

Product Details


Publication date : Sep 29, 2018
Length 230 pages
Edition : 1st Edition
Language : English
ISBN-13 : 9781788624350
Vendor :
Google
Table of content icon View table of contents Preview book icon Preview Book

Google Cloud Platform Administration

Introduction to Google Cloud Platform

This chapter begins with a brief introduction to cloud computing. We then introduce the Google Cloud Platform (GCP) with an overview of its history and its concepts. We will then look into some of its concepts, tools, and services. We will also map and compare how Amazon Web Services (AWS) and Microsoft Azure public clouds match up to GCP products. Lastly, we will set up an account in GCP using the free tier that allows you a 12-month, $300 free trial of all GCP products.

In this chapter, we will cover the following:

  • Introduction to cloud computing
  • Introduction to GCP
  • GCP services
  • Data centers and regions
  • AWS and Azure in comparison to GCP
  • Exploring GCP

Introduction to cloud computing

In the simplest terms, cloud computing is the practice of delivering computing services such as servers, storage, networking, databases, and applications over the internet. In such a delivery model, the consumer, typically a business or an enterprise, only pays for the resources they use without having to pay for the capital investment cost of building and maintaining the data centers.

There are both financial and technological benefits for adopting a cloud computing approach. Companies transform their capital costs to operational costs and are able to pay for what they use rather than pay for idle infrastructure. Cloud computing also eliminates the cost of purchasing and maintaining expensive hardware and data center space. The pay-as-you-go model allows for increasing or decreasing resource consumption without having to pre-purchase hardware.

Companies can also focus on rapid innovation without having to worry about the backend infrastructure's ability to support it. Cloud companies are rapidly introducing new services on high performance hardware platforms that can be consumed on-demand by end users. Typically, companies either migrate entirely to the cloud or use a hybrid model of connecting their on-premise infrastructure to a cloud provider and migrate workloads as needed.

Some good initial use cases for the cloud include development and testing environments, data archiving, data mining, and disaster recovery. All these cases will help reduce capital costs and the speed of deployment and consumption makes cloud computing an ideal platform for these use cases.

Most cloud computing services fall into three broad categories: Infrastructure as a Service (IaaS), Platform as a Service (PaaS), and Software as a Service (SaaS).

With IaaS, you rent the IT infrastructure, which includes servers, virtual machines, networks, storage, and operating systems, on a pay-as-you-go basis. With PaaS, you are given access to an on-demand environment that allows you to quickly deploy, test, and develop your application without having to worry about the underlying IT infrastructure. PaaS is ideal for developers who only care about quickly deploying their application and not worrying about the server, compute, or its storage.

SaaS is a way of delivering software applications over the internet on a subscription model. A good example of SaaS is your Gmail email account. You are subscribed to your email by signing up for it and use the email software that is written, maintained, secured, and managed by Google.

Introducing GCP

GCP's initial release was on October 6, 2011. Since then it has become one of the most used public cloud platforms and is continuing to grow. GCP offers a suite of cloud services that run on the same infrastructure that Google uses to host their end-user products such as Google search, Gmail, and YouTube. This makes it important because Google not only continues to innovate for its customers but also benefits from its own investment into the platform. Google began operations by launching its Google App engine back in 2008. Since then we have seen multiple other services introduced and the list keeps on growing.

GCP services

While GCP services are many, we can broadly categorize them into four different services. They are compute services, storage services, networking services, and big data services. Apart from these, there are other cloud services such as identity and security management, management tools, data transfer, and machine learning.

Compute services

GCP offers you a wide variety of computing services that allow you complete flexibility as to how you want to manage your computing assets. Depending on your application and its requirements, you can choose to deploy a traditional custom virtual machine or use Google's App Engine to run the application:

  • Compute engine: Allows you to deploy and run high-performance virtual machines in Google data centers. You can deploy either a pre-configured virtual machine or customize the resources as per your requirements.
  • Apps engine: Allows you to deploy your application on a fully managed platform which is completely supported by Google. This allows you to simply deploy your application and have it running without you having to worry about the underlying infrastructure.
  • Kubernetes engine: This service allows you to run containers on GCP. This means your containerized applications can be deployed on GCP using the Kubernetes engine service without you having to manage the underlying cluster yourself. Google's Site Reliability Engineers (SREs) constantly monitor the cluster, which relieves you of that responsibility.
  • Cloud Functions: This service allows you to run code and respond to events on the fly in a true serverless model. This means allowing code to respond to events is determined by you. This also means you will be billed only if your code runs, making it very cost effective.

Storage services

The following are the types of storage services:

  • Cloud storage: An object storage that can be used for a variety of use cases and is accessible via a REST API. This offering allows geo-redundancy with its multi-regional capability and can be used for both high performance storage requirements to archival storage.
  • Cloud SQL: A fully managed (replicated and backed-up) database service that allows you to easily get started with your MySQL and PostgreSQL databases in the cloud. The offering also comes with a standard API and also built-in migration tools to migrate your current databases to the cloud.
  • Cloud BigTable: Cloud BigTable is the database for all your NoSQL database requirements. The service can scale to hundreds of petabytes easily, which makes it suitable for enterprise data analysis. BigTable also integrates easily with other big data tools such as Hadoop.
  • Cloud Spanner: Cloud Spanner is a relational database service that aims at providing highly scalable and strongly consistent database service for the cloud. This is a fully managed service that can offer transactional consistency and synchronous replication of databases across multiple geographies.
  • Cloud Datastore: Cloud Datastore is another service set apart from Cloud BigTable that is suitable for your key-value pair NoSQL database requirements. The services comes with other features such as sharding and replication.
  • Persistent Disk: Persistent Disk is persistent high performance block storage that can be attached to your Google compute engine instance or Google Kubernetes engine. The service allows you to resize storage without any downtime and is offered in both HDD and SSD formats. You can also mount one disk on multiple machine instances allowing multi-reader capability.

Networking services

These are the networking services:

  • Virtual Private Cloud (VPC): Virtual private cloud allows you to connect multiple GCP resources together or create internal isolated resources that can be managed easily. You can also deploy firewalls, Virtual Private Networks (VPNs), routes, and custom IP ranges.
  • Cloud load balancing: This service allows you to distribute your incoming traffic across multiple Google Compute Engines. Cloud load balancing also lets you do autoscaling and can scale your backend instances depending on the incoming traffic load.
  • Cloud CDN: Google's cloud delivery network allows you to distribute your content for lower latency and faster access. Google has over 90 edge points globally spread across multiple continents that make it easy for you to decrease your serving costs.
  • Cloud interconnect: This service allows you to directly connect your on-premises data center to Google's network. You can either peer with Google or interconnect depending on your bandwidth requirements and peering capabilities.
  • Cloud DNS: This is Google's highly available global DNS network and comes with an API to allow management of records and zones.

Big data

The following are the big data services:

  • BigQuery: BigQuery is an enterprise data warehouse that allows you to store and query massive datasets by enabling fast SQL queries using Google's underlying infrastructure.
  • Cloud dataflow: A fully managed service that allows real-time batch and stream data processing. The service also integrates with Stackdriver, Google's unified logging and monitoring solution, letting you monitor and troubleshoot issues as they happen.
  • Cloud dataproc: Cloud dataproc is a fully managed cloud service to run Apache spark and Apache Hadoop clusters.
  • Cloud datalab: A powerful tool that allows you to explore and visualize large datasets.
  • Cloud dataprep: A service that helps in structured and unstructured data analysis by means of visually exploring and cleaning it.
  • Cloud pub/sub: A service built for stream analytics that allows you to publish and subscribe to data streams for big data analysis.
  • Google genomics: A service that allows you to query the genomic information of large research projects.
  • Google DataStudio: Allows you to turn your data into informative dashboards.

We will look at all services in greater detail in the following chapters.

Data centers and regions

GCP services are located across North and South America, Europe, Asia, and Australia. These locations are further divided into regions and zones. A region is an independent geographic area that consists of one or more zones. In total, Google has about 17 regions, 52 zones, and over 100 points of presence (points of presence is a local access point for an ISP). Each zone is identified by a letter, for example, zone a in the US-Central region is named us-central1-a.

When you deploy a cloud resource, they get deployed in a specific region and in a specific zone within that region. Any resource deployed in a single zone will not be redundant—if the zone fails, so will the resource. If you need fault tolerance and high availability, you must deploy the resource in multiple zones within that region to protect against unexpected failures. A disaster recovery plan will be needed in order to protect your entire application against a regional failure.

All regions are expected to have a minimum of three zones:

Note that not all regions and zones provide all GCP services. For example, the Oregon region has three regions within it and does not offer Google App Engine services. So it is critical to understand your application requirements and place it in the appropriate region that supports it.

The roundtrip latency of networks between zones within a region is less than 5 ms:

Current regions and number of zones

Oregon, Los Angeles, Iowa, South Carolina, North Virginia, Montreal, Sao Paolo, Netherlands, London, Belgium, Frankfurt, Mumbai, Finland, Singapore, Sydney, Taiwan, Tokyo

Future regions and number of zones

Hong Kong, Osaka, Zurich

Relating AWS and Azure to GCP

If you are familiar with Amazon's AWS or Microsoft's Azure, then this table will help you relate their associated services to what GCP has to offer. Only a few services are shown in the table:

Amazon Web Services

Microsoft Azure

Google Cloud Platform

Amazon EC2

Azure Virtual Machines

Google Compute Engine

AWS Elastic Beanstalk

Azure App Services

Google App Engine

Amazon EC2 Container Service

Azure Container Service

Google Kubernetes Engine

Amazon DynamoDB

Azure Cosmos DB

Google Cloud Bigtable

Amazon Redshift

Microsoft Azure SQL Data warehouse

Google BigQuery

Amazon Lambda

Azure Functions

Google Cloud Functions

Amazon S3

Azure Blob Storage

Google Storage

AWS Direct Connect

Azure ExpressRoute

Google Cloud Interconnect

AWS SNS

Azure Service Bus

Google Cloud Pub/Sub

AWS Cloudwatch

Application Insights

Stackdriver Monitoring

Exploring GCP

Let's dive a little deeper into GCP by creating an account and getting familiar with the console and command-line interface. There are three ways to access GCP—via console, via a command-line interface using the gcloud command-line tool, and Google Cloud SDK client libraries. But before that, we need to understand the concept of projects.

In GCP, all resources must belong to a project. If you work for a large organization, don't be surprised to see tens of hundreds of projects. Projects can be tied down to a business unit or an internal or external organization.

In GCP, any cloud resources that you create must belong to a project. A project is basically an organizing entity for any cloud resource that you wish to deploy. All resources deployed within a single project can communicate easily with each other, for example two compute engine virtual machines can easily communicate with each other within a project without having to go through a gateway. This, however, is subject to region and zone limitations. It is important to note that resources in one project can talk to resources in another project only through an external network connection.

Each project has a project name, a project ID, and a project number. The project ID has to be a unique name across the cloud platform (or Google can generate an ID for you). Remember that even if the project has been deleted, its ID cannot be reused again:

GCP allows you a free trail that provides you with $300 of credit towards any Google product. Your trial lasts for 12 months and expires automatically after that. If you exceed your free $300 credit, your services will be turned off but you will not be charged or billed, making this a safe way to explore and learn more about GCP.

To get started:

  1. Go to https://cloud.google.com and click on TRY IT FREE:
Remember that you will need to have a Google registered ID to be able to register to use GCP services. We will discuss accounts and access in greater detail in cloud identity and access management.
  1. Once you create an account and log in, agree to the terms and conditions and fill out your details along with a valid credit card number.
  1. Once logged in you will see a Billing Overview:

Let's look at how to access different GCP services using the console:

  1. Click on the menu on the left to drop down the list of services. Feel free to scroll down this list to explore:
  1. On the right, let's look at another way of accessing your GCP instance using the cloud shell tool that allows you to manage your resources from the command line in any browser. The on the top right activates your Google cloud shell. This opens a new frame at the bottom of the browser and displays a prompt. It may take a few seconds for the shell session to be established:

Creating your first project

Alternatively, if you prefer using your terminal, you can download and install the SDK to use gcloud on your terminal. It is important to remember that gcloud is part of the Google Cloud SDK.

We can get started at deploying services by first creating a project:

  1. In the preceding illustration, click Create to create your first project:
  1. You can pick any project name and GCP auto-generates a project ID for you. If you need to customize the project ID in accordance with your organization's standards, click Edit. Remember that this project ID needs to be unique.
  2. Click Create when done.
  1. Once the project is created, your DASHBOARD will show you all info related to your project and its associated resources:
Project IDs are auto-generated but can be customized. It is best to leave the default project IDs in place to avoid management issues.
  1. On the left, note the Project name, Project ID, and the Project number.
  1. Click on Project settings. You will see that you are able to change the Project name but cannot change the Project ID or the Project number. Project settings can also be accessed by going to IAM & admin | Settings:

You can even shut down a project by clicking on the Shut Down option. This will cause all traffic and billing to stop on the project and shut down all resources within a project. You will have 30 days to restore such a project before its deleted. You also have an option to migrate a project. This comes in handy if you are part of an organization and want to move a project over to the organization unit. You will be able to do this if you are a G suite or a cloud premium customer with a support package. Ideally, this is something that keeps projects and permissions at an organization level, rather than at an individual level.

Let's look at enabling APIs as services for your project to allow us to use API access to services. APIs are automatically enabled whenever you try to launch a service using the console. For example, if you attempt to deploy a Google Compute Engine virtual machine, the initialization of that service will enable the Google Cloud Compute API:

  1. Go to Menu | API's and Services | Dashboard:

All APIs associated with services are disabled by default and you can enable specific ones as required by your application.

  1. Click on ENABLE APIS AND SERVICES and search for the Google Cloud Compute API. Click Enable. You can also click on Try this API to test the API through the browser console.

Once the API is enabled, you will see all the info related to this API in the dashboard. You can even choose to disable the API if needed:

API in the dashboard

Using the command line

Let's look at using the gcloud command to create a project. gcloud is part of the Google Cloud SDK. You will need to download and install it on your machine in order to use the gcloud commands from your terminal. Alternatively, you may use the cloud shell console from within the browser. Go to https://cloud.google.com/sdk/downloads to download the relevant package as it applies to your machine and install it:

  1. Once you have installed the SDK on your machine, we need to initialize it. This is done by running the gcloud init command to perform the initial setup tasks. If you ever need to change a setting or create a new configuration, simply re-run gcloud init.
  2. Open the terminal on your machine and type gcloud init. This opens a browser to allow you to log in to your account. If you want to avoid the browser, type gcloud init --console-only.
  3. If you use the -console-only flag, then copy and paste the browser URL in the terminal and then copy the key back into the console:
  1. Enter the numeric choice for the project to use. To create new project, type 2:

  1. Enter a unique project ID and click Enter. This will create a new project.
  2. To list all projects, type gcloud projects list:

Summary

We are off to a good start with a brief understanding of the history of GCP and its services. We looked at all the data center regions where GCP is offered and discussed their aspects and also a list of services. We also spent time creating a free tier account and explored the GCP console and created projects.

In Chapter 2, Google Cloud Platform Compute, we will look into learning about GCP Compute and its various aspects.

Left arrow icon Right arrow icon

Key benefits

  • Discover new techniques to administer, manage, and deploy applications on GCP
  • Understand effective solutions for storing, retrieving, and deploying your container images
  • Explore various offerings of GCP for operations and security

Description

On-premise data centers are costly to manage. If you need a data center but don’t want to deal with a physical one, Google Cloud Platform (GCP) is the solution. With GCP, you can build, test, and deploy applications on Google’s infrastructure. Google Cloud Platform Administration begins with GCP fundamentals, with the help of which you will deploy your first app and gain an understanding of Google Cloud architecture and services. Furthermore, you will learn how to manage Compute, networking, and storage resources. As you make your way through the book, you will learn how to track and manage GCP’s usage, monitoring, and billing access control. You will also be able to manage your GCP's access and permissions. In the concluding chapters, you will explore a list of different developer tools for managing and interacting with the GCP platform. By the end of this book, you will have learned how to effectively deploy workloads on GCP.

What you will learn

Understand all GCP Compute components Deploy and manage multiple GCP storage options Manage and utilize the networking resources offered by GCP Explore the functionalities and features of the GCP Container Understand the workings of GCP operations such as monitoring and error reporting Discover an immune GCP using its identity and security options

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Buy Now

Product Details


Publication date : Sep 29, 2018
Length 230 pages
Edition : 1st Edition
Language : English
ISBN-13 : 9781788624350
Vendor :
Google

Table of Contents

11 Chapters
Preface Chevron down icon Chevron up icon
Introduction to Google Cloud Platform Chevron down icon Chevron up icon
Google Cloud Platform Compute Chevron down icon Chevron up icon
Google Cloud Platform Storage Chevron down icon Chevron up icon
Google Cloud Platform Networking Chevron down icon Chevron up icon
Google Cloud Platform Containers Chevron down icon Chevron up icon
Google Cloud Platform Operations Chevron down icon Chevron up icon
Google Cloud Platform Identity and Security Chevron down icon Chevron up icon
Google Cloud Platform Billing Chevron down icon Chevron up icon
Google Cloud Platform Tools Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon

Customer reviews

Filter icon Filter
Top Reviews
Rating distribution
Empty star icon Empty star icon Empty star icon Empty star icon Empty star icon 0
(0 Ratings)
5 star 0%
4 star 0%
3 star 0%
2 star 0%
1 star 0%

Filter reviews by


No reviews found
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.