GCP A first-look

Google Cloud has come a far

Google operates on a model that is a little different from Microsoft Azure instead of what we know of as “tenant” or “subscription” is called “Projects” in GCP.

These Projects think of as your tenant traditionally in Azure (Isolated) to the resources that fall under the project.

As you see above I’ve created a project called “Paranoia-1” this project will house our resources to deploy the great thing at least initially is the UI/UX of GCP is a lot of how-to and tutorials as CSP’s progressed you’ll see a real focus on assisting the user to understand the services.

To start today we’ll start with some basics on deploying a few virtual machines and connecting this to a simple nginx server on Ubuntu. To start we are in the cloud console

You’ll select the Compute Engine this will have a pop-out screen that shows these items below

It’s a really clean UI that shows you exactly the naming conventions and what category they fall under. VM Instances which are referred to EC2 in AWS and Virtual Machines in Azure are the identical offerings, you’ll select VM Instances

You’ll now select Create Instance this will start a wizard of sorts in a UI on various settings if you’re following along I’ll keep the costs low (GCP Offers free credit as well for beginners)

So a few things are shown by this, for one best practices in any deployment should have some labels associated with the resource for tracking and cost management. You’ll see I’ve added the label department:developers to signify to our Billing Administrator if they are viewing our Project Bill what the costs are associated with think of this as usage. The region and zone are pivotal on selecting where you deploy for production, if your users are accessing your resources in a different region other then your application this can cause or affect some latency so you’ll want this close and distributed for resiliency. As you can see the costs are not that expensive for this workload mind you this a small image.

Think of your Machine Families as workloads have different requirements some more than others, and some less than others how you configure this is up to you but keep in mind costs or a balance of the cost for this I’m doing a small image but will enable Confidential VM Service to take advantage of vTPM and will select Enable Display Device for screen capture.

Once your satisfied with your configuration or image selection select “Create”

Congratulations!! You’ve just deployed your first Virtual Machine Instance in the Google Cloud.

Next up let’s launch into the machine and actually see this you’ll be back in the page shown below

As you can see the deployed instance of mine is sitting in the Zone US-West1-b you’re could differ from what you select.

SSH Options

You’ll see that you can have multiple options we can select Open in Browser Window this will launch another tab in your browser with the SSH keys passed into the machine and authenticate you (easy way) you could also choose another and feel free to explore the best part about cloud is many options and features that can be enabled.

This is the SSH-in-browser experience and for me personally depending if I’m testing something locally this is a quick way of running a machine additionally its a SSH session that passes the key for you rather then launching from a command-line.

sudo apt upgrade
sudo apt install nginx

We are up and running now we can run our “static page” by going to the external address back on the console.

GCP Console

You can now navigate to a new tab and run the “External IP”

This will be updated to show custom code back in the console.

While this is a simple example the true simplicity that Google Cloud has created around to the user experience and interface is really easy to anyone that is new.

I’ll be updating this with more in-depth on the next side digging into Security in Google Cloud along with best practices.