An account on Google Cloud.
All steps have been tested using the Cloud Shell in Console. It should also work using the latest version of the Google Cloud SDK, but it has not been tested.
Create a new project and connect your SDK to it. If you are using the Cloud Shell, just open it from your new project and it will automatically be initialized. If you are using the local SDK, you must initialize it with
gcloud init
Before you can do anything, you must enable the Compute Engine API. The simplest way of doing that, is by browsing to the Compute Engine tab in the Console.
The first time you go there, you will see a message like Compute Engine is getting ready. This may take a minute or more..
Just wait a few minutes and you should be good to go!
This workshop is split up in separate parts. Each of the parts builds on the state of the previous part, so be sure to do them in order.
In each part, there are information along with multiple tasks for you to do. If you struggle with some task, you can check the hidden solution for that task. But please notice that the names of the resources might be different from what you have chosen.
Extra tasks
- Secure the SSH access (using a bastion host)
- Secure the HTTP access (only allow the load balancer access)
If you are done early, there are some cool stuff that you could look at. Here are some suggestions.
- Play around with the Metadata API
- Try out the shut down scripts
- Check the loggings of startup/shutdown scripts
- Store the scripts in cloud storage
- Check what is logged in Compute Engine (Console > Logging)
- Check out disk snapshots
- Create an extra disk and attach to an instance
- Change your backends to have instances in multiple regions
- Setup a SQL server and connect the app to it
When you feel done with the workshop, you should clean up everything, so there is nothing idling and costing you money. The easiest way to remove all resources, is to shut down the entire project, as this will stop all resources.
To shut down the entire project, run the following command (it can be run in the Cloud Shell in the current project)
gcloud projects delete <project-id>