Google Cloud Platform in Action teaches you to build and launch applications that scale, leveraging the many services on GCP to move faster than ever. You’ll learn how to choose exactly the services that best suit your needs, and you’ll be able to build applications that run on Google Cloud Platform and start more quickly, suffer fewer disasters, and require less maintenance.
Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications.
About the Technology
Thousands of developers worldwide trust Google Cloud Platform, and for good reason. With GCP, you can host your applications on the same infrastructure that powers Search, Maps, and the other Google tools you use daily. You get rock-solid reliability, an incredible array of prebuilt services, and a cost-effective, pay-only-for-what-you-use model. This book gets you started.
About the Book
Google Cloud Platform in Action teaches you how to deploy scalable cloud applications on GCP. Author and Google software engineer JJ Geewax is your guide as you try everything from hosting a simple WordPress web app to commanding cloud-based AI services for computer vision and natural language processing. Along the way, you’ll discover how to maximize cloud-based data storage, roll out serverless applications with Cloud Functions, and manage containers with Kubernetes. Broad, deep, and complete, this authoritative book has everything you need.
The many varieties of cloud storage and computing
How to make cost-effective choices
Hands-on code examples
Cloud-based machine learning
About the Reader
Written for intermediate developers. No prior cloud or GCP experience required.
About the Author
JJ Geewax is a software engineer at Google, focusing on Google Cloud Platform and API design.
Table of Contents
What is “cloud”?
Trying it out: deploying WordPress on Google Cloud
Manning publishes the best quality IT books in the industry.
Manning is an independent publisher, providing computer books for software developers, engineers, architects, system administrators, and managers. Our books also cover topics for young programmers, students, and occasionally children.
Manning is an independent publisher of computer books and video courses for software developers, engineers, architects, system administrators, managers and all who are professionally involved with the computer business. We also publish for students and young programmers, including occasionally for children. We are an entirely virtual organization based on Shelter Island, New York, with many staff working from far-flung places like Manila and Zagreb.
“Independent” means we are not owned by a large corporate entity and are free to make decisions without bureaucratic overhead. That has allowed us to innovate and be flexible and to quickly adjust what we do as we go. We were the first by several years to sell our books as unprotected PDFs, something that later became commonplace. We were the first to start selling books before they were finished, in the Manning Early Access Program. This gave our readers access to our content as soon as it was readable, and this too has become common in the industry. And it means we are thinking every day about new ways to satisfy our customers, some of which we hope you will be pleased to discover in the not-too-distant future.
how we improve
We published our first book in 1993 and have been learning from our successes, and even more from our mistakes, ever since. Every new book teaches us something that helps us improve:
How to choose the topics we publish on
How to find the right authors for each book
How to help authors write the best books they can
How to ensure the content is valuable and easy to learn
How to let readers know about our content
We publish standalone titles as well as the following book series:
In a Month of Lunches
Readers can access our books through the Manning Early Access Program, O’Reilly Learning (formerly Safari Books Online), and iBooks. Print copies, wherever they are bought, come with free electronic versions in PDF, ePub and Kindle formats. With your print copy in hand, register it on the Manning site and you can download the digital versions from your account.
At this time, our eBooks are available only from Manning.com and Apple’s iBookstore.
As of February 2021, the platform has more than 40 million students, 155,000 courses and 70,000 instructors teaching courses in over 65 languages. There have been over 480 million course enrollments. Students and instructors come from 180+ countries and 2/3 of the students are located outside of the U.S.
Students take courses largely as a means of improving job-related skills. Some courses generate credit toward technical certification. Udemy has made a special effort to attract corporate trainers seeking to create coursework for employees of their company. As of 2021, there are more than 155,000 courses on the website.
The headquarters of Udemy is located in San Francisco, California, with offices in Denver, Colorado; Dublin, Ireland; Ankara, Turkey; Sao Paulo, Brazil; and Gurugram, India.
“DevOps is the buzzword these days in both software and business circles. Why? Because it has revolutionized the way modern businesses do business and, in the process, achieved milestones that weren’t possible before.” On this site, “you’ll learn what DevOps is, how it evolved, how your business can benefit from implementing it, and success stories of some of the world’s biggest and most popular companies that have embraced DevOps as part of their business.” (DMH)
“DevOps – or Development and Operations – is a term used in enterprise software development that refers to a kind of agile relationship between information technologies (IT) operations and development. The primary objective of DevOps is to optimize this relationship through fostering better collaboration and communication between development and IT operations. In particular, it seeks to integrate and activate important modifications into an enterprise’s production processes as well as to strictly monitor problems and issues as they occur so these can be addressed as soon as possible without having to disrupt other aspects of the enterprise’s operations. By doing so, DevOps can help enterprises register faster turnaround times, increase frequency of deployment of crucial new software or programs, achieve faster average recovery times, increase success rate for newly released programs, and minimize the lead time needed in between modifications or fixes to programs.” (DMH)
“DevOps is crucial for the success of any enterprise because, by nature, enterprises need to segregate business units as individually operating entities for a more efficient system of operations. However, part of such segregation is the tendency to tightly control and guard access to information, processes and management. And this can be a challenge, particularly for the IT operations unit that needs access to key information from all business units in order to provide the best IT service possible for the whole enterprise. Simply put, part of the challenge in segregating business units into individually operating ones that are independent of each other is the relatively slow flow of information to and from such units because of bureaucracy.” (DMH)
“Moving towards an organizational culture based on DevOps – one where the enterprise’s operations units and IT developers are considered as “partners” instead of unrelated units – is an effective way to break down the barriers between them. This is because an enterprise whose culture is based on DevOps is one that can help IT personnel provide organization with the best possible software with the least risk for glitches, hitches, or problems. Therefore, a DevOps-based organizational culture is one that can foster an environment where segregated business units can remain independent but, at the same time, work very well with others in order to optimize the organization’s efficiency and productivity.” (DMH)
DevOps & Microservices Handbook: Non-Programmer’s Guide to DevOps and Microservices
Are you a non-coder looking for insight into DevOps and Microservices Architecture?
As the industry is moving towards maximum digitization there is consensus that DevOps practices help you deliver software faster, more reliably, and with fewer errors.
You may be a consultant, Advisor, Project Manager or a novice into IT industry; after going through this guide you would be able to appreciate DevOps, Microservices and other related concepts like Kanban, Scrum,Agile, SOA, Monolith Architecture, DevOps, Docker, Kubernetes etc.
You would also get to know about the leaders in DevOps and Microservices adoption and impact it had on the overall agility and hyper-growth of the adopters. This book covers the complete lifecycle for your understanding like: Integrating, Testing, Deploying DevOps and Microservices architecture and the Security concerns while deploying it.
I am confident that after going through the book you would be able to navigate the discussion with any stakeholder and take your agenda ahead as per your role. Additionally, if you are new to the industry, and looking for an application development job, this book will help you to prepare with all the relevant information and understanding of the topic.
Infrastructure as code (IaC) is the process of managing and provisioning computer data centers through machine-readable definition files, rather than physical hardware configuration or interactive configuration tools. The IT infrastructure managed by this process comprises both physical equipment, such as bare-metal servers, as well as virtual machines, and associated configuration resources. The definitions may be in a version control system. It can use either scripts or declarative definitions, rather than manual processes, but the term is more often used to promote declarative approaches.
IaC grew as a response to the difficulty posed by utility computing and second-generation web frameworks. In 2006, the launch of Amazon Web Services’ Elastic Compute Cloud and the 1.0 version of Ruby on Rails just months before created widespread scaling problems in the enterprise that were previously experienced only at large, multi-national companies. With new tools emerging to handle this ever growing field, the idea of IaC was born. The thought of modelling infrastructure with code, and then having the ability to design, implement, and deploy applications infrastructure with known software best practices appealed to both software developers and IT infrastructure administrators. The ability to treat infrastructure like code and use the same tools as any other software project would allow developers to rapidly deploy applications.
Added value and advantages
The value of IaC can be broken down into three measurable categories: cost, speed, and risk. Cost reduction aims at helping not only the enterprise financially, but also in terms of people and effort, meaning that by removing the manual component, people are able to refocus their efforts towards other enterprise tasks. Infrastructure automation enables speed through faster execution when configuring your infrastructure and aims at providing visibility to help other teams across the enterprise work quickly and more efficiently. Automation removes the risk associated with human error, like manual misconfiguration; removing this can decrease downtime and increase reliability. These outcomes and attributes help the enterprise move towards implementing a culture of DevOps, the combined working of development and operations.
Types of approaches
There are generally two approaches to IaC: declarative (functional) vs. imperative (procedural). The difference between the declarative and the imperative approach is essentially ‘what’ versus ‘how’ . The declarative approach focuses on what the eventual target configuration should be; the imperative focuses on how the infrastructure is to be changed to meet this. The declarative approach defines the desired state and the system executes what needs to happen to achieve that desired state. Imperative defines specific commands that need to be executed in the appropriate order to end with the desired conclusion. 
There are two methods of IaC: ‘push‘ and ‘pull‘ . The main difference is the manner in which the servers are told how to be configured. In the pull method the server to be configured will pull its configuration from the controlling server. In the push method the controlling server pushes the configuration to the destination system.
There are many tools that fulfill infrastructure automation capabilities and use IaC. Broadly speaking, any framework or tool that performs changes or configures infrastructure declaratively or imperatively based on a programmatic approach can be considered IaC. Traditionally, server (lifecycle) automation and configuration management tools were used to accomplish IaC. Now enterprises are also using continuous configuration automation tools or stand-alone IaC frameworks, such as Microsoft’s PowerShell DSC or AWS CloudFormation.
Continuous configuration automation
All continuous configuration automation (CCA) tools can be thought of as an extension of traditional IaC frameworks. They leverage IaC to change, configure, and automate infrastructure, and they also provide visibility, efficiency and flexibility in how infrastructure is managed. These additional attributes provide enterprise-level security and compliance.
An important aspect when considering CCA tools, if they are open source, is the community content. As Gartner states, the value of CCA tools is “as dependent on user-community-contributed content and support as it is on the commercial maturity and performance of the automation tooling.” Vendors like Puppet and Chef, those that have been around a significant amount of time, have created their own communities. Chef has Chef Community Repository and Puppet has PuppetForge. Other vendors rely on adjacent communities and leverage other IaC frameworks such as PowerShell DSC. New vendors are emerging that are not content driven, but model driven with the intelligence in the product to deliver content. These visual, object-oriented systems work well for developers, but they are especially useful to production oriented DevOps and operations constituents that value models versus scripting for content. As the field continues to develop and change, the community based content will become ever important to how IaC tools are used, unless they are model driven and object oriented.
IaC can be a key attribute of enabling best practices in DevOps – Developers become more involved in defining configuration and Ops teams get involved earlier in the development process. Tools that utilize IaC bring visibility to the state and configuration of servers and ultimately provide the visibility to users within the enterprise, aiming to bring teams together to maximize their efforts. Automation in general aims to take the confusion and error-prone aspect of manual processes and make it more efficient, and productive. Allowing for better software and applications to be created with flexibility, less downtime, and an overall cost effective way for the company. IaC is intended to reduce the complexity that kills efficiency out of manual configuration. Automation and collaboration are considered central points in DevOps; Infrastructure automation tools are often included as components of a DevOps toolchain.
Relationship to security
The 2020 Cloud Threat Report released by Unit 42 (the threat intelligence unit of cybersecurity provider Palo Alto Networks) identified around 200,000 potential vulnerabilities in infrastructure as code templates.
In software engineering, software configuration management (SCM or S/W CM) is the task of tracking and controlling changes in the software, part of the larger cross-disciplinary field of configuration management. SCM practices include revision control and the establishment of baselines. If something goes wrong, SCM can determine what was changed and who changed it. If a configuration is working well, SCM can determine how to replicate it across many hosts.
The acronym “SCM” is also expanded as source configuration management process and software change and configuration management. However, “configuration” is generally understood to cover changes typically made by a system administrator.
Configuration control – Implementing a controlled change process. This is usually achieved by setting up a change control board whose primary function is to approve or reject all change requests that are sent against any baseline.
Configuration status accounting – Recording and reporting all the necessary information on the status of the development process.
Configuration auditing – Ensuring that configurations contain all their intended parts and are sound with respect to their specifying documents, including requirements, architectural specifications and user manuals.
Environment management – Managing the software and hardware that host the system.
Teamwork – Facilitate team interactions related to the process.
Defect tracking – Making sure every defect has traceability back to the source.
With the introduction of cloud computing the purposes of SCM tools have become merged in some cases. The SCM tools themselves have become virtual appliances that can be instantiated as virtual machines and saved with state and version. The tools can model and manage cloud-based virtual resources, including virtual appliances, storage units, and software bundles. The roles and responsibilities of the actors have become merged as well with developers now being able to dynamically instantiate virtual servers and related resources.
The history of software configuration management (SCM) in computing can be traced back as early as the 1950s, when CM (for Configuration Management), originally for hardware development and production control, was being applied to software development. Early software had a physical footprint, such as cards, tapes, and other media. The first software configuration management was a manual operation. With the advances in language and complexity, software engineering, involving configuration management and other methods, became a major concern due to issues like schedule, budget, and quality. Practical lessons, over the years, had led to the definition, and establishment, of procedures and tools. Eventually, the tools became systems to manage software changes. Industry-wide practices were offered as solutions, either in an open or proprietary manner (such as Revision Control System). With the growing use of computers, systems emerged that handled a broader scope, including requirements management, design alternatives, quality control, and more; later tools followed the guidelines of organizations, such as the Capability Maturity Model of the Software Engineering Institute.
“Cucumbers are a big culinary deal in Japan. The amount of work that goes into growing them can be repetitive and laborious, such as the task of hand-sorting them for quality based on size, shape, color, and prickles. An embedded-systems designer who happens to be the son of a cucumber farmer (and future inheritor of the cucumber farm) had the novel idea of automating his mother’s nine-category sorting process with a sorting robot (that he designed) and some fancy machine learning (ML) algorithms. With Google’s release of its open source machine learning library, TensorFlow®, Makoto Koike was able to do just that.
TensorFlow, a deep learning neural network, evolved from Google’s DistBelief, a proprietary machine learning system that the company used for a variety of its applications. (Machine learning allows computers to find relationships and perform classifications without being explicitly programmed regarding the details.) While TensorFlow was not the first open source library for machine learning, its release was important for a few reasons. First, the code was easier to read and implement than most of the other platforms out there. Second, it used Python, an easy-to-use computer language widely taught in schools, yet powerful enough for many scientific computing and machine learning tasks. TensorFlow also had great support, documentation, and a dynamic visualization tool, and it was as practical to use for research as it was for production. It ran on a variety of hardware, from high-powered supercomputers to mobile phones. And it certainly didn’t hurt that it was a product of one of the world’s behemoth tech companies whose most valuable asset is the gasoline that fuels ML and AI—data.
These factors helped to drive TensorFlow’s popularity. The greater the number of people using it, the faster it improved, and the more areas in which it was applied. This was a good thing for the entire AI industry. Allowing code to be open source and sharing knowledge and data from disparate domains and industries is what the field needed (and still needs) to move forward. TensorFlow’s reach and usability helped democratize experimentation and deployment of AI and ML applications. Rather than being exclusive to companies and research institutions, AI and ML capabilities were now in reach of individual consumers — such as cucumber farmers.”
Knight, Will. “Here’s What Developers Are Doing with Google’s AI Brain.” MIT Technology Review, December 8, 2015. https://www.technologyreview.com/s/544356/heres-what-developers-are-doing-with-googles-ai-brain.
Metz, Cade. “Google Just Open Sources TensorFlow, Its Artificial Intelligence Engine.” Wired online, November 9, 2015. https://www.wired.com/2015/11/google-open-sources-its-artificial-intelligence-engine.
“The seed for what would become Google started with Stanford graduate student Larry Page’s curiosity about the organization of pages on the World Wide Web. Web links famously point forward. Page wanted to be able to go in the other direction.
To go backward, Page built a web crawler to scan the internet and organize all the links, named BackRub for the backlinks it sought to map out. He also recognized that being able to qualify the importance of the links would be of great use as well. Sergey Brin, a fellow graduate student, joined Page on the project, and they soon developed an algorithm that would not only identify and count the links to a page but also rank their importance based on quality of the pages from where the links originated. Soon thereafter, they gave their tool a search interface and a ranking algorithm, which they called PageRank. The effort eventually evolved into a full-blown business in 1998, with revenue coming primarily from advertisers who bid to show advertisements on search result pages.
In the following years, Google acquired a multitude of companies, including a video-streaming service called YouTube, an online advertising giant called DoubleClick, and cell phone maker Motorola, growing into an entire ecosystem of offerings providing email, navigation, social networking, video chat, photo organization, and a hardware division with its own smartphone. Recent research has focused on deep learning and AI (DeepMind), gearing up for the tech industry’s next battle—not over speed, but intelligence.
Merriam-Webster’s Collegiate Dictionary and the Oxford English Dictionary both added the word Google as a verb in 2006, meaning to search for something online using the Google search engine. At Google’s request, the definitions refer explicitly to the use of the Google engine, rather than the generic use of the word to describe any internet search.
On October 2, 2015, Google created a parent company to function as an umbrella over all its various subsidiaries. Called Alphabet Inc., the American multinational conglomerate is headquartered in Mountain View, California, and has more than 70,000 employees worldwide.”
Batelle, John. “The Birth of Google.” Wired, August 1, 2005. https://www.wired.com/2005/08/battelle.
Brin, Sergey, and Lawrence Page. “The Anatomy of a Large-Scale Hypertextual Web Search Engine.” In Proceedings of the Seventh International Conference on World Wide Web 7. Brisbane, Australia: Elsevier, 1998, 107–17.