Google Cloud Platform has become one of the premier cloud providers on the market. It offers the same rich catalog of services and massive global hardware scale as AWS as well as a number of Google-specific features and integrations. Getting started with GCP can seem daunting given its complexity. This course is designed to demystify the system and help both novices and experienced engineers get started.
This Course covers a range of topics with the goal of helping students pass the Google Associate Cloud Engineer certification exam. This section focuses on identifying relevant GCP services for specific use cases. The three areas of concern are compute, storage, and networking. Students will be introduced to GCP solutions relevant to those three critical components of cloud infrastructure. The Course also includes three short practical demonstrations to help you get hands-on with GCP, both in the web console and using the command line.
By the end of this Course, you should know all of GCP’s main offerings, and you should know how to pick the right product for a given problem.
Learning Objectives
- Learn how to use Google Cloud compute, storage, and network services and determine which products are suitable for specific use cases
Intended Audience
- People looking to build applications on Google Cloud Platform
- People interested in obtaining the Google Associate Cloud Engineer certification
Prerequisites
To get the most out of this course, you should have a general knowledge of IT architectures.
Welcome to the first of three practical demonstrations on how to use Google Cloud Platform. In this first demo, we're going to do a few things to get you familiar with GCP. Generally, we'll start by quickly going over the web console and the Cloud Shell, we'll show how to set up your first project. These will these things will help you get a general sense of how to interact with GCP services and then after that, we'll take a quick look at the GCP pricing tool, we'll run a few estimates for a few services, and then lastly, we'll take a closer look specifically at Compute services. There we'll take a look at App Engine, Kubernetes Engine, Compute Engine, and even run through the process of launching a VM.
So, to get started, you can go over to console.cloud.google.com or just cloud.google.com. If you don't already have a Google Cloud account, you can set one up from there. All you need is a Google account of some kind like a Gmail and it can just click through you can set one up very quickly and you can even get up to three hundred dollars worth of free service.
So here we're just going to go ahead and click on Console and let it load in a sec and we can see all of our different GCP services here. We can kind of scroll around and see the different options here. Now, one important thing to note is we can't actually do anything with these services until they have a project to work with, so if we click on this, it's going to say create a project, it's going to put you through that first.
GCP expects everything to be contained within a project so we can go ahead and create the project, we'll give it a name, you know, you know, we'll just call it TestProject, Create, and this will generate it for us, and projects, these live within an organization. So GCP also expects a name for your organization. We're just going to leave the default for that and if we give it a moment it will create.
So we can see here the dashboard will come up after the project is created, it should only take a few seconds, and then we can see basically TestProject with an ID. Now, for most of our demos, we're going to use the GCP web console. As you can see, it's got a pretty nice UI, it's very easy to navigate, however, there are situations where we might want to use a command-line. And now there are two ways we can use a terminal with all of our GCP services.
One method is to set up the Google command-line tools on our local machine, like a MacBook or a Linux desktop, but whatever we use for development work and this requires installing the tools and setting up the credentials to authenticate to GCP. We're not going to go through that here, we'll include links with instructions if you want to do things that way.
There is an easier method, though. The easier method for using a shell is to just use GCP's built-in Cloud Shell tool. It's right here in the top right of the page. Now, you just click on this once and we can hop right into a shell environment that will have all of our necessary g-cloud tools and credentials pre-configured. So yeah, just give that a second to provision. So yeah, it might take a few minutes the very first time you use the shell, the Cloud Shell, it has to spin up an instance for it to run, but eventually, you'll get this nice little prompt right here and you can see it's like any terminal environment. It has our g-cloud tools already installed, so this is just kind of the default output there. You can look around a little bit, queue out of it, but this is, this allows us to do, you know, run scripts to basically do anything we would want to do in a shell environment without having to worry about setting things up on a local machine. So very helpful.
Now, before we start, actually spinning up any resources or creating anything we might want to get a sense of what it will cost us. So let's take a quick look at the pricing tool. Now, remember, we don't actually have to be logged in to GCP to use this. We actually just go to this link here: cloud.google.com/pricing. But you know, it's useful, of course, to have the pricing and the console open at the same time, so we can kind of check things out before we create anything.
So we can just go here to Calculators and let's run through a very basic scenario. Let's say, for example, I want to create a single VM. So here we have our tool and you know, we're going to start with Compute Engine. That's already selected. And then it's going to ask us to fill out some basic information, so a number of instances, we'll say one. What are these instances for? It's really just labeling, so we'll say tests. Operating system, you know, we can be more specific, but we'll stick with one of the free ones here, Free Debian CentOS Core Ubuntu. Machine class, we're just going to go with regular. Here is where you can also select preemptable if you want to get that as your free estimate. Machine family, so as we mentioned, there are compute-optimized, memory-optimized, and general. We'll stick with general, we'll just stick with first-generation, we'll go with a micro. Really all the defaults here. And once we're good, we can just click Add to estimate and it pops right out total estimated cost here per month. So pretty straightforward.
Now, let's say I want to add something to this estimate. Let's say, okay I want to add a database of some kind. So we go up here, we look for the relevant service, let's say we want to do cloud SQL. So we go here, you know, we still have this estimate as well, it lets us aggregate everything. But let's say we want just the defaults here, we want one cloud SQL instance. You know, there's some configuration we could change here but the only thing it really needs, you know, you can select in a high availability in location. We're gonna select all the defaults. The only thing we absolutely have to put in here is a minimum storage amount SSD, we're gonna say 10 gigabytes and keep all the other defaults. Hours running per day, you know, days per week. We'll add that to the estimate and we can see this is a little more expensive than the VM, but yeah, 13.25 per month. So this is your price estimation tool, it's, as I said, it's pretty straightforward, pretty intuitive to use. So that's the pricing tool.
Now, we're going to go ahead and try to create a virtual server. So, here in the list of services, we can see the compute section here. We've got App Engine, Compute Engine, and Kubernetes Engine, we have Cloud Functions and Cloud Run, more lightweight abstracted services there at the bottom, and what we're gonna do is create an instance inside of Compute Engine. Now, you can see just to just to give you a sense of what it looks like, Kubernetes engine here, we can click on it and we can create a cluster. So this is, if you're familiar with the Kubernetes paradigm, this will generate your cluster and will create the nodes on top of which your container orchestration will run your cluster.
If we go back, we can pick App Engine as well, which is our serverless solution and here the tutorial it takes you through creating an application. If you start going through it, it'll ask for a region and then eventually it'll ask you to select a language, runtime, and the type of environment. As we mentioned, there's the standard and there's the flexible. So that's App Engine. We're not going to make anything with those but what we'll do is we'll go here into Compute Engine and we'll go through the simplest case creating a single virtual machine.
So we just go through our QuickStart guide, we can click on Create instance. It's gonna ask for some basic information about it, we're gonna again stick with all of our defaults we'll just call it Instance-1 in us-central, general-purpose, first-generation, one vCPU, 3.7 gigs of memory, very, very lightweight, again, all defaults, and we'll just click Create. And just like that, we have our first virtual instance up and running and of course, we can, you know, do this with the shell as well and we can be a lot more specific with the configuration, but as you can see, just getting a Compute resource up and running is pretty straightforward.
So, I think that's where we will stop with this demo. In the later sections, we'll go into more depth on storage setup and networking, but with this, you should have a general sense of how to get started with GCP, how to get into the console, set up your project, and interact with the compute services. So I hope this has been beneficial.
Jonathan Bethune is a senior technical consultant working with several companies including TopTal, BCG, and Instaclustr. He is an experienced devops specialist, data engineer, and software developer. Jonathan has spent years mastering the art of system automation with a variety of different cloud providers and tools. Before he became an engineer, Jonathan was a musician and teacher in New York City. Jonathan is based in Tokyo where he continues to work in technology and write for various publications in his free time.