Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Google Cloud Platform Cookbook
Google Cloud Platform Cookbook

Google Cloud Platform Cookbook: Implement, deploy, maintain, and migrate applications on Google Cloud Platform

eBook
₱1399.99 ₱2000.99
Paperback
₱2500.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
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

Google Cloud Platform Cookbook

Storage and Databases

In this chapter, we will cover:

  • Hosting a static application on Google Cloud Storage
  • Image resizing using Google Cloud Storage and Cloud Functions
  • Migrating a MariaDB to Cloud Spanner
  • Loading temperature data to Cloud Bigtable and BigQuery-ing it
  • Storage metadata in Google Cloud Datastore

Introduction

In this chapter, we'll discover some use cases for Google's Cloud Storage offerings. Storage is one of the main pillars of any workload to be hosted on Google Cloud Platform (GCP). GCP offers various options for data to be stored. The nature of the data, nature of the workload, scalability and latency needs to dictate the choice of the storage. We'll cover a few examples on Google Storage, Cloud Spanner, Cloud Bigtable, BigQuery and Cloud Datastore.

In addition to Node.js, we'll use Python for a few recipes in this chapter.

The following page is a wonderful guide for choosing a storage option for your particular workload https://cloud.google.com/storage-options/.

Hosting a static application using Google Cloud Storage

Google Storage offers a way of hosting static web applications using buckets. All client-side technologies (HTML, CSS, and JavaScript) can be hosted in a bucket. This option is very inexpensive to host and can scale to a great extent. The costs incurred will be on the assets stored, outbound network traffic and retrieval from storage. We'll use Hugo (https://gohugo.io), a static website generator and host the generated code in a storage bucket. In addition to hosting a static website, the static contents (CSS, JavaScript, and images) of a dynamic website hosted on Google Storage is also a widely accepted use case.

Getting ready

The following are the initial setup...

Image resizing using Google Cloud Storage and Cloud Functions

Google Storage is extensively used to store static images to be served by different platforms. One of the needs of the modern-day digital world is to have images created for different form factors—desktop, mobile and tablet screens. In this recipe, we'll develop a Cloud Function to resize the images uploaded to a bucket:

Getting ready

The following are the initial setup verification steps 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. Verify that Node.js and Google Cloud SDK are...

Migrating a MariaDB to Cloud Spanner

Google Cloud Spanner is a relational database service which is highly consistent, available and scalable horizontally. It is a fully managed service suitable for OLTP workloads and low-latency/high-throughput environments. In this recipe, we'll understand the features of Spanner in relation to a popular RDBMS, MariaDB. We'll take a simple MariaDB database and move the schema and the data to Cloud Spanner. At the time of writing, there is no automated import/export tool for Cloud Spanner, the manual method gives us a glimpse of the way Spanner is built and its strengths/weaknesses. Firstly, we'll export the data from our MariaDB database using the mysqldump utility. Then, we'll create the database and tables via the Google Console. Finally, we'll insert the data into the table via a Python script.

...

Loading temperature data to Cloud Bigtable and BigQuery-ing it

Google Bigtable is a fully managed NoSQL service with a focus on low latency and high throughput. It is well suited for storing data for large analytical processing, operation data from IoT devices, other time-series data, and so on. Cloud Bigtable is designed for performance, for huge databases (~1 TB) and it optimizes your data over time. In this recipe, we'll have a look at a small database generated by an IoT temperature sensor. We'll write a Python script to simulate a sensor sending temperature data located in a garden to the  Bigtable. Then, we'll use BigQuery to connect to the Bigtable database to query and make meaning out of the data store.

Getting ready

...

Storage metadata in Google Cloud Datastore

Google Datastore is a highly scalable, NoSQL document database similar to Amazon's DynamoDB and MongoDB. Individual data objects in the Datastore are called entities. An entity has one or more properties and a category of objects is called a kind. Each object is uniquely identified by a key. In this recipe, we would simulate a storage drive environment. Employees of a company are given the ability to upload files to Google Storage. The metadata is stored in Cloud Datastore to avoid overhead to the Storage API and for efficiency. The file uploaded to the Storage follows this file format:

<5-digit hash>/<[year][month][day][hour][minute][second]>/<Employee ID>/<file name>

After the data is uploaded to Storage, the metadata collected should enable us to query:

  • List all objects uploaded by an employee
  • List...
Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • • Implement Google Cloud services in your organization
  • • Leverage Google Cloud components to secure your organization’s data
  • • A recipe-based guide that promises hands-on experience in deploying a highly scalable and available environment

Description

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.

Who is this book for?

This book is for IT professionals, engineers, and developers looking at implementing Google Cloud in their organizations. Administrators and architects planning to make their organization more efficient with Google Cloud will also find this book useful. Basic understanding of Cloud services and the Google Cloud platform is necessary.

What you will learn

  • • Host a Python application on Google Compute Engine
  • • Host an application using Google Cloud Functions
  • • Migrate a MySQL DB to Cloud Spanner
  • • Configure a network for a highly available application on GCP
  • • Learn simple image processing using Storage and Cloud Functions
  • • Automate security checks using Policy Scanner
  • • Understand tools for monitoring a production environment in GCP
  • • Learn to manage multiple projects using service accounts

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Apr 16, 2018
Length: 280 pages
Edition : 1st
Language : English
ISBN-13 : 9781788294560
Vendor :
Google

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
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Apr 16, 2018
Length: 280 pages
Edition : 1st
Language : English
ISBN-13 : 9781788294560
Vendor :
Google

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just ₱260 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just ₱260 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 7,502.97
Google Cloud Platform for Developers
₱2500.99
Google Cloud Platform for Architects
₱2500.99
Google Cloud Platform Cookbook
₱2500.99
Total 7,502.97 Stars icon
Banner background image

Table of Contents

8 Chapters
Compute Chevron down icon Chevron up icon
Storage and Databases Chevron down icon Chevron up icon
Networking Chevron down icon Chevron up icon
Security Chevron down icon Chevron up icon
Machine Learning and Big Data Chevron down icon Chevron up icon
Management Tools Chevron down icon Chevron up icon
Best Practices Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Empty star icon Empty star icon 3
(4 Ratings)
5 star 25%
4 star 0%
3 star 25%
2 star 50%
1 star 0%
avarma Nov 15, 2018
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Hard to find content, especially if you are working on GCP. Don't get fooled by the size - it is small, yet very informative. Although, at a high level, you may know how to use a cloud function to automatically ingest and resize an image, it helps to have a walkthrough. Lots of other gems - especially on the networking and the devops pieces. Great job by the author!The kindle formatting may be bad - the hardcopy worked for me.
Amazon Verified review Amazon
Gerardo Santovena May 24, 2018
Full star icon Full star icon Full star icon Empty star icon Empty star icon 3
The content is good but the format is very bad, many exercises can't be read on Kindle at all.
Amazon Verified review Amazon
George A. Quintas May 21, 2018
Full star icon Full star icon Empty star icon Empty star icon Empty star icon 2
Not compatible with Kindle Cloud Reader. Are you testing@Packt> are you testing your online contents on all available online readers out there? This is the second kindle book that I bought under your name?I will ask for a refund but I will buy the paper version.
Amazon Verified review Amazon
Dheeraj Khanna Oct 19, 2018
Full star icon Full star icon Empty star icon Empty star icon Empty star icon 2
This book (kindle version as I am hsing it on Kindle) very hard to follow for examples. One example takes more than 3-4 days to complete and majority of the time you keep troubleshooting errors to make the code working. There is no support to get it going to learn . The kestone example given does not work at all and few of the steps are missing.It is a complete waste of money. I dont recomend to buy this.
Amazon Verified review Amazon
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.