In this lab you sign up for the Google Cloud free trial. To confirm your identity, you must have a credit card to register for the trial.

What you need

To complete this lab, you need:

Internet access

Access to a supported Internet browser:

A credit card to register for the free trial

What you learn

In this lab, you:

In this lab you register for the Google Cloud Platform free trial. The free trial provides you:

Sign up and get $300 to spend on Google Cloud Platform over the next 60 days and discover the power of our products.

Test drive virtual machines, autoscaling web applications, databases, object storage, network and DNS services, big data ETL and real-time queries, translation, machine learning, and more.

When you sign up for the free trial, you are asked to provide your credit card information. This information is used only to verify your identity and let us know you're not a robot. Your credit card is not charged during or after your free trial unless you upgrade to a paid account.

Start building your app with the same technology that is used to power Google, YouTube, and many of the world's largest brands.

To register for the free trial:

Step 1

Open the free trial registration page:

https://console.cloud.google.com/freetrial

Step 2

If you do not have a Google account, follow the steps to create one. Otherwise, log in and proceed to the next step.

Step 3

Complete the registration form.

Step 4

Read and agree to the terms of service.

Step 5

Click Accept and start free trial.

In this lab you will become familiar with the GCP web-based interface. There are two integrated environments, a GUI (graphical user interface) environment called Console, and a a CLI (command line interface) called Cloud Shell. In this class we will be using both environments.

What you will do

What you will learn

Select an existing project or create a new google cloud project.

Notice the Project ID, a unique name across all Google Cloud projects.

Google Cloud Platform Console, often just called "console" is a web-based graphical user interface for the GCP platform. The console includes an integrated command line environment called Cloud Shell, which will be detailed in the next section.

Here are a few things you need to know about console:

Step 1 Navigate console

In this class we will use menu notation like this:

Console: Products and services > Storage > Browser

This means:

  1. In a browser, go to: https://console.google.com
  2. Click on the Products and Services Icon in the upper left corner:
  3. Hover over Storage and then click on Browser:

Step 2 Create a bucket

Click on [Create Bucket].

In the labs there are often dialogs in console or options on the command line that need to be filled in with values. In this case, you need to select a Default storage class. This information will appear in lab instructions like this:

Property

Value

Default storage class:

Multi-Regional

Notice in the upper right corner of console.

There is a "notifications" icon:

Sometimes feedback from the underlying commands is provided there.

You can use the Cloud Shell to manage projects and resources via command-line, without having to install the Google Cloud SDK and other tools on your computer.

Cloud shell provides the following:

After 30 minutes of inactivity, the Cloud Shell instance is recycled. Only the /home directory persists. Any changes made to the system configuration, including environment variables, is lost between sessions.

You can automatically restore elements in the environment by making use of the

.bashrc

to run a script when the terminal session begins. For example you could establish environment variables as shown below.

.bashrc

$ cat .bashrc

::  ::  ::  ::  ::
if [ -f "infraclass/config" ]; then
  source "infraclass/config"
fi

/infraclass/config

$ cat infraclass/config

INFRACLASS_REGION=us-east1
INFRACLASS_ZONE=us-east1-c
INFRACLASS_BUCKET_LOC=US

There are some protections in place to keep you from modifying Cloud Shell too much. Not that they can't be circumvented. However, if you ever find your Cloud Shell environment corrupted, you can find instructions on resetting it here:

https://cloud.google.com/shell/docs/limitations#resetting_cloud_shell_to_default_state

Step 1 Open Cloud Shell

Open Cloud Shell by clicking the Cloud Shell icon in the upper right corner:

Step 2 Create a bucket using gsutil

Enter the following command with a unique bucket name:

$ gsutil mb gs://<Bucket_Name>

Whenever you see italics in a command line instruction or in a code example it means that you are to replace that element with something appropriate, usually a unique name or ID.

Step 3 Verify object creation in console

Return to the console.

Console: Products and services > Storage > Browser

Step 4 Select and delete the buckets

Cloud Shell is an excellent environment for exploring GCP using Google Cloud SDK commands like gcloud and gsutil. These commands can be automated in a scripting language like bash (Linux) or Powershell (Windows). Or, your can explore the behavior using the command line tools, and then re-implement in the SDK using one of the supported languages.

Consists of two parts, console and Cloud Shell

┬ęGoogle, Inc. or its affiliates. All rights reserved. Do not distribute.