google cloud platform

Google Cloud Platform’s Compute Engine works very similarly to AWS’s EC2 platform, allowing you to launch and run cloud servers very quickly. We’ll show how to get started and get a server up and running if you’re new to the platform.

Launching a Server

Google has a wide variety of compute-related services, ranging from container orchestration platforms with managed Kubernetes to serverless functions using Google Cloud Functions. However, if you just want to run a basic Linux or Windows server, you can do that from Compute Engine, which is their general purpose compute platform.

From the Google Cloud Platform Console, select Compute Engine > VM Instances:

compute engine

From here, you can select “Create Instance” to launch a new one.

create new vm

You have a few options for launching here. You can launch a blank image (the default), launch an image using an existing template or machine image you’ve created, or launch an image from the marketplace using images with preinstalled software. It’s worth taking a look at the marketplace to see if there’s an image for the application you’re trying to run.

compute engine marketplace

If you choose to use a marketplace VM, many of the following fields will be preconfigured for you. Otherwise, you’ll have to select them yourself.

First off, give the instance a name, and select which region and zone you wish to launch in. Regions denote geographic regions, and zones denote physically separate datacenters.

Give the instance a name, then select which region and zone you wish to launch in

Up next, Google has a great configurator for instance sizes. Rather than providing tons of different instance families and tiers, like AWS does, GCP simply allows you to select a generation and configure it with the amount of cores and memory you need. Of course, you can select the prebuilt templates if you’d like, as well as memory and compute optimized versions in the other tabs.

This is always expandable in the future with an instance restart, so you don’t need to make a final decision right away.

Configurator for instance sizes

If you want to add a GPU, you can do so below under “CPU Platform and GPU.” If you’re deploying a Windows Server, you’ll likely want to enable “Turn On Display Device,” so you can connect over RDP.

display ndevice

Next, you’ll configure storage for the instance. By default, it’s set to a 10 GB hard drive with Debian preinstalled. You can change the OS and also switch to an SSD from the “Change” dialog. You also have the nice option of deploying a container image to the root of the instance.

Configure storage for the instance

Under “Management, Security, Disks” dropdown, there are a few more settings to configure. Most notably, you should add your personal SSH key under the “Security” tab to make connecting to the instance easier.

add ssh key

Of course, if you have a few minutes, you should definitely set up OS Login and add project-wide SSH keys to your user account, which is the preferred method of handling SSH logins on GCP, and allows you to access any newly created instance without manually adding your SSH keys. You can read our guide on setting it up to learn more.

Connecting to Your Instance

Head back to the VM Instances console once your instance is launched. It will take a minute or so to start up, and then show up as running in the console.

Your instance in VM Instances console

You can press the “SSH” button to open a new dialog with a web-based terminal, but if you manually added your SSH key during setup or set up OS Login, you can simply connect to it from your preferred terminal.

If you click on the instance to open up the settings, you’ll find a “Monitoring” tab with some useful graphs that show you how your instance is doing, including CPU usage over time, disk IO, and network in/out.

The "Monitoring" tab shows how your instance is doing

This page is just a preview of Google’s full Monitoring platform, which you can use to keep track of all of your servers.

Profile Photo for Anthony Heddings Anthony Heddings
Anthony Heddings is the resident cloud engineer for LifeSavvy Media, a technical writer, programmer, and an expert at Amazon's AWS platform. He's written hundreds of articles for How-To Geek and CloudSavvy IT that have been read millions of times.
Read Full Bio »