In this course, we will take a virtual tour of the main offerings of Google Cloud Platform Services.
Learning Objectives
- Compute
- Storage
- Networking
- Artificial Intelligence and Machine Learning
- Security and Operations
Intended Audience
- Anyone who wants to learn about the main services available on Google Cloud Platform
Prerequisites
- Basic understanding of computers, servers, and data centers
- Basic understanding of cloud principles
In this lesson, I am going to cover the main “Compute” offerings available on Google Cloud Platform. Compute services are services used for running code. So, maybe you have purchased some software and you need the hardware to run it. Or maybe you are developing your own custom software and need machines to build and test it. Any project that requires processing power and memory can take advantage of a Compute service.
When most people think about Cloud computing, they immediately think of virtual machines. You can configure virtual machines to do pretty much anything you want. Google’s main service for creating your own VMs is called Compute Engine. Compute Engine VMs can either run Linux or Windows. And there are many different predefined machine types to choose from, each with different amounts of processing power and memory. General-purpose machines offer the best price-performance ratio. While optimized machines offer higher levels of performance for either compute, memory or graphics. You can also create custom machine types as well.
Compute Engine is “Infrastructure-as-a-Service”. That means you can use it to build pretty much whatever you want. You can spin up a powerful Windows instance and install SQL Server. Or you can spin up a smaller Linux instance and install Apache web server. The possibilities are near endless.
So that’s great if you want to build everything from scratch, but what if you want to move over some existing infrastructure? Luckily, Google has made it easy to migrate. If you are currently using VMware, then you can use Google Cloud VMware Engine to run any existing VMs. Now if you are running bare metal servers or have another type of VM, then you can migrate those over to Compute Engine using Migrate for Compute Engine. This service makes it really fast and easy to move your workloads over. It creates a new instance on GCP while copying the data from your original VM. Once the data transfer is finished, the GCP instance reboots, and then your migration is complete. In addition to VMware and physical machines, Migrate for Compute Engine can also support VMs running on Amazon Web Services and Microsoft Azure.
Virtual machines are not the only compute resource. These days, containers have become increasingly popular. Containers are somewhat like virtual machines, except they don’t include the operating system. This means that they lose a little bit of flexibility, but the upside is that containers are much more lightweight. They take up less disk space and they are faster to start up and shut down.
Google Kubernetes Engine (or GKE) is used for running containers on Google. It makes it easy to deploy, maintain and scale your containerized applications. It also includes features for logging, monitoring, and health management. Now, some people want to spread out their containers to run across multiple cloud providers. And Google has created a product just for this. This is called Anthos. With Anthos, you can run many different containers across multiple locations. So you could have some running on-premises, some on GCP, and some on AWS. Anthos provides a single command interface that controls and monitors everything. So if you are building a hybrid environment, you might want to check Anthos out.
If you are interested in converting some of your VMs to containers. Google makes this easy with Migrate for Anthos. Just pick a VM and it will be transformed into a GKE container. You can also combine Migrate for Compute Engine with Migrate for Anthos to convert a physical server to a container, if you wish.
While Compute Engine (CE) and Google Kubernetes Engine (GKE) give you a lot of power, they do require quite a lot of work. You have to provision instances. You have to be able to pick the right machine types. You have to apply the latest patches and security updates. If you already know how to do all this, then it is probably not a big deal. But a lot of times customers don’t know and don’t care about this level of detail. This is where Google’s “serverless” options come in.
Google has a “Platform-as-a-Service” offering called App Engine. App Engine lets you run web and mobile applications without having to worry about the underlying infrastructure. You just upload your code and let GCP take care of the rest. It will provision and scale the underlying resources up and down automatically. When there is little to no traffic, App Engine will scale down so that you are charged less. When your app starts receiving lots of traffic, it will scale up to handle the load. Compute Engine gives you far more control and flexibility. But App Engine provides simplicity and ease-of-use.
Similarly, Google has a serverless offering for containers, called Cloud Run. If you have a complex application that involves many different containers, then you’ll probably want to stick with using GKE. But if your application runs inside a single container, then Cloud Run is much easier to use. Just upload your container and let Cloud Run deploy it as a stateless, auto scaling service.
So App Engine is for running applications and Cloud Run is for running containers. But what if you just want to call a simple function? Well, there is a third serverless option for that as well. Cloud Functions can create small, single-purpose functions that respond to events. For example, you could configure a Cloud Function to be triggered whenever a file is uploaded or whenever a database is changed. Cloud Functions are great for adding a little extra functionality without having to create something far more complicated.
So, to summarize:
- If you want to run a Windows application, you should pick Compute Engine.
- If you want to run a Java or Python app, then App Engine would probably be the best choice.
- For running a single container, I would choose Cloud Run.
- For a multiple container application, then you probably want to choose GKE.
- Unless you also want to distribute your containers across multiple cloud vendors, then you would pick Anthos.
- And if you just want to run a simple function whenever an event occurs, Cloud Functions would be the right tool.
Ok, that should cover all the main Compute offerings on GCP.
Daniel began his career as a Software Engineer, focusing mostly on web and mobile development. After twenty years of dealing with insufficient training and fragmented documentation, he decided to use his extensive experience to help the next generation of engineers.
Daniel has spent his most recent years designing and running technical classes for both Amazon and Microsoft. Today at Cloud Academy, he is working on building out an extensive Google Cloud training library.
When he isn’t working or tinkering in his home lab, Daniel enjoys BBQing, target shooting, and watching classic movies.