Provisioning your first GCE instance
Google Compute Engine is the cornerstone of the Google Cloud Platform. It is an IaaS (Infrastructure as a Service) environment - powered by KVM hypervisors - that allows you to create instances based on default images and custom snapshots, with complete control over network traffic.
This course, crafted by our expert Linux System Administrator David Clinton, will help you get started with Google Compute Engine, either through Google's browser console or their command line interface. By the end of this course you will have everything it takes to master the efficient and effective use of GCE.
Who should take this course
As a beginner-level course, you don't need experience with Google Cloud Platform to benefit from this tutorial. Some basic knowledge of the Linux CLI interface and TCP/IP stack might help you better understand the Networking and the CLI lectures though.
If you need a high-level introduction to the cloud, check out the Introduction to Cloud Computing course. We also have an Introduction to Google Cloud Platform course to offer you broader overview of the whole family of Google services.
If, after going through this course, you'd like to test your knowledge of Google Compute Engine and improve your CloudRank, we've got Quizzes that should serve as a perfect followup.
Hi and welcome to CloudAcademy.com's video series on getting started with Google Compute Engine. In this video, we're going to explore Google Compute Pricing. Pricing for each and all of the services associated with online accounts in general and with Google Compute Engine in particular can be very complicated. And you really don't want to get any unhappy surprises at the end of a service month. Therefore it's important to plan ahead, and fortunately Google has created a full featured pricing calculator to help out.
Estimate costs with Google Pricing Calculator
You can get there from the main cloud.google.com menu by hovering over products, then clicking on calculator. You can explore the pricing for any one of Google services. We're of course focusing on Compute Engine, which is where we happen to be already. The calculator divides Google compute services into categories. There's servers, persistent disk, load balancing, GCE network bandwidth. You can play around with the configuration of any one of these categories, or use them all together to get a total picture what we may end up paying at the end of the month.
Compute Engine Instances Pricing
Let's start with servers. Let's say we're going to run two servers for our project, and we could create a note to describe what these servers are for. That might be useful if you're going to email or save this calculation for later use. For our purposes, we're not going to do either, so we'll just leave that blank. We can choose a type of operating system. If you use open source software like Debian or CentOS, obviously this will be free. If you use a version of Windows or one of the commercial Linuxes like Red Hat or SUSE, it obviously won't be free. We'll stick with the free service for now. Instance type. We could either select a class of server -- n1-standard, n1-highmem. Let's go with n1-highmem or alternatively we could simply calculate the cost by the number of CPU cores and the amount of memory that we're going to be using. In any case, we should select a data center location. Let's say the US. And we should enter the amount of time through the course of the month we're going to be running this server. If it's going 24 hours a day for seven days a week, that's what we should tell it. Let's add this to the estimate.
We have a total cost of $149.60. This is broken down, 1,444 total hours for the month. The instance is n1-highmem-2 and the region is US. The cost actually goes down the more hours you use during the course of the month. The first 361 hours are at $53, will cost a total of $53. The second will save you $10. The third 361 hours will save you $21, and the fourth will save you $32.
So you can see how the longer you run it during a month, the less per hour you are paying. The effective hourly rate though is just over 10 cents per hour. This will change radically if we edit instance type that we're going to use. So let's remove this, which will effectively clear the category. We'll again go with two servers, and again the free operating system. But this time, we'll go with the g1-small, which will be significantly smaller, and we'll run it for 24 hours a day for 7 days a week. We'll add this to the estimate, and the cost goes remarkably down to $32.35. You can see you're really paying for the number of processor cores and for the number of gigabytes of RAM. The less you use, obviously the less you pay.
Compute Engine Storage and Network Pricing
Let's now add to this estimate a persistent disk, that is the SSD persistent disk storage. If you choose to use an SSD, a solid state drive, for your persistent disk storage on your instance, you will be paid a premium. Let's say ours is going to be 80 gigabytes in size. And let's add some other disk storage. Let's say we need another disk with, let's say, 250 gigabytes of data available. Add this to the estimate and we go up another $36.
Let's continue on: Load balancing. We have one load balancing rule, and the total traffic inbound, which shouldn't be all that much. It's really just browsers looking to open the pages or the resources that you've made available. So we'll make that, let's say, .5. I'm not sure exactly if it'll take fractions, but we'll give it a shot. It does. Actually it seems to count that as zero. Network ingress that is incoming traffic to the load balancing is counted as zero. So that's $18.05 extra primarily really for the forwarding rule.
Finally let's look at egress -- how much bandwidth is our service taking up? So let's just assume it's all going to be in the Americas. You could imagine that the cost for bandwidth egress is going to be different from region to region. Let's say we're going to push out 200 gigabytes of data each month and we'll add that to the estimate. This adds another $24 up to a total of $110 for the month, which gives you a decent idea of how we can play around with each of the categories and each of the configurations within each of the categories.
You can remove, that is clear a category, and retry it with other figures to get a very good estimate of the kind of costs you're going to face at the end of the month for this type of project as opposed to that type of project. Not only is this very useful, but I would say it's almost essential before you embark on a serious deployment.
David taught high school for twenty years, worked as a Linux system administrator for five years, and has been writing since he could hold a crayon between his fingers. His childhood bedroom wall has since been repainted.
Having worked directly with all kinds of technology, David derives great pleasure from completing projects that draw on as many tools from his toolkit as possible.
Besides being a Linux system administrator with a strong focus on virtualization and security tools, David writes technical documentation and user guides, and creates technology training videos.
His favorite technology tool is the one that should be just about ready for release tomorrow. Or Thursday.