Get startedGet started for free

Demo: Create a VM

1. Demo: Create a VM

Let me give you a quick walk through of the VM instance creation process, and point out CPU, storage, and network options in the GCP Console. So here I am already on the Compute Engine instance page. You can get to here by going to the navigation menu and then clicking on "Compute Engine". As we use this in the course a lot, you might actually want to pin this sometimes so that you can get to it more easily. Then within there I have gone into VM instances. So I just want to again show you some of the options that are available when creating instance. To get started I'm going to click on "Create". The first thing I want to choose is a name, so you have that right up here. Then maybe more importantly is actually where you want the instance to be located. So you have an option of all the different available regions. It has the name of the regions as well as the closest city as to where that region is located. Then within the regions you have different zones that you can choose from. You also see on the right-hand side that there is a cost associated with the current configuration, net cost is going to change as we change the configuration. So for example, if I instead of creating an instance in US Central one, I create one maybe in Europe West One. You will see that the cost is slightly adjusted. So I can try that a couple different ways by choosing different locations. You should see that the cost changes depending on the region that we choose. Now it goes further if I then choose the machine type. There are different types, we'll go into all of those. But if I go in here, the different types explain to me what they provide. This standard n1 standard one provides one virtual CPU with 3.75 gigabytes of memory. If I change to a machine with more CPU and more memory, we'll see that the cost is adjusted. You can also go into details here. It actually spells it out for you that there's a cost for the CPU and memory, but there's also costs for the persistent disk. We haven't configured that yet, but this is the default value and if we configure that, it's going to ingest a cost. There's also sustained use discount would go into that as well, but essentially all of that is what ultimately gets you to this total monthly cost. It's also broken down in an hourly cost here, and we'll talk more about pricing later within the module. So again I can choose different machine types, maybe we want a larger machine type that's going to be more expensive. Maybe I just need a shared core. So something really, a micro machine or a small machine and that can really drive the cost down a lot. So let me go back to the default. The other thing to think about in terms of your region and zone is not just the cost, but really you want to create your instances that are close to your users. Maybe you want to have them spread out across different regions for habilability. You might be having restrictions for data locality meaning that your data has to be in a specific region. So these are all the different things that you want to consider when choosing the region and zone. Now if I scroll further down, one of the next pix options is the boot disk. So we can see here that currently it has a 10 gigabytes standard persistent disk. I can change that. I can change the image itself, but I can also change the boot disk type. Now the boot disk needs to be a persistent disk. We have the standard persistent disk. Think of an HDD. And we have the SSD. You can see that we can define the size here, and you can see that both of them have the same exact maximum size. So if I make this larger, let's say 1,000, then we're going to see that the cost now is adjusted to that disk size. So it can go back, that's very large. Maybe I'm just okay with 10 gigabytes as the boot disk. You can also add more disks. So if I scroll down and go to management security disk networking, I can go to disks here. So here I can choose the type of encryption for the disk. I have Google managed key, Customer managed key, Customer supplied key. Then I can add more disks. So if I add a new disk here then under type I could also choose a local SSD. Disks come in predefined sizes, depending on how many you choose your performance as you can see down here, is going to get adjusted. There is a limit. So at some point the more disk you choose, you're going to hit a limit into your performance, and same if I choose an SSD disk and change the size here, you'll see that also there's a limit but it's also adjusted if I scale as you are changing the IOPS as well as the sustained throughput limit. Now another important thing is obviously networking. So if I click on here, you want to choose the network interface. We already went into this a little bit in the previous module in terms of near choosing your primary internal IP, choosing if you want an external IP or not. So those are all of the different options that you can get there. Now what's really cool is this is all using the GCP Console, but down the road you might say well, I want to create these instances quickly and I want to use a command line. Well, this user interface gives you the command line options. So it's spelling out exactly all the different options you have chosen, how you would recreate that using GCloud. So this can help you get started using the command line and make you more comfortable using that command line. So let me just go ahead and create this instance. Once we create it we have these different columns that are listed here, there are more columns that we can choose from. For example, when you created it, what the machine type is, what network this is a part off, if you had labels or other things, so lots of different options you can list here. So for example, I can just hear when the machine was created, the type as well as the network it is a part off. That's how easy it is to configure the location, CPU, memory, storage, and network interface for a VM instance using the GCP Console. Let's get back to the slides to go over VM axis and lifecycle.

2. Let's practice!

Create Your Free Account

or

By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.