Set up a Google Cloud Platform account, and install the Cloud Platform's gcloud
SDK, before the workshop starts.
If you do not already have a Google Cloud Platform project, go to https://cloud.google.com/ and click the "Free Trial" button.
You will then need to fill out a form. This will set up your new project and apply some starter credits to it. You will need to provide billing information when you set up your project, but you won't be billed for the free trial.
If you already have a Google Cloud Platform project created, you can apply a one-time promo code, that your instructor will give you, to get some credits.
Once your project is created, confirm that your GCE (Compute Engine) API is enabled. Do this by going to the Cloud Platform Developers Console, and navigating to APIs > APIs & Auth
in the left nav bar for your project. Click on 'Compute Engine API' (that is, https://cloud.google.com/console/project/<YOUR_PROJECT>/apiui/apiview/compute_component/overview
) and enable it there if need be.
We'll use the Cloud Platform command-line SDK, called gcloud
, to create VM instances and ssh to them, set up firewalls and routing, and other tasks.
Install gcloud
according to the "Installation and Quick Start" section here.
As noted in those instructions, be sure to run:
$ gcloud auth login
once it's installed.
Then, run the following commands to set your project, zone, and region defaults for gcloud
.
$ gcloud config set project <your-project-name>
$ gcloud config set compute/zone us-central1-f
$ gcloud config set compute/region us-central1
Much of the workshop will require you to ssh to the VM instances that you create, via gcloud
.
If you have any issues doing this, you can alternately use the Developer Console's browser-based ssh feature.
To do this, visit the Developers Console and in the left nav bar, navigate to Compute > Compute Engine > VM Instances
(that is, https://cloud.google.com/console/project/<YOUR_PROJECT>/compute/instances
).
Find the VM that you want to ssh to, and click the "SSH" button in its listing (these images show a different Kubernetes cluster, so your VM names will be different):
This will start up a ssh window for you:
During the workshop, you'll set up routing and firewall config from the command line via the gcloud
SDK.
If you like, you can inspect these settings for your project (and get lots more info) from the Developers Console. Navigate to Networking or Compute > Compute Engine in the left nav bar.
Remember to shut down your running GCE (Compute Engine) instances when you are done with them, so that you do not get charged for them when you're not using them.
An easy way to do this is to visit the Developers Console and in the left nav bar, navigating to Compute > Compute Engine > VM Instances
(that is, https://cloud.google.com/console/project/<YOUR_PROJECT>/compute/instances
), and shutting them down from that dashboard.