
Before you begin
- Labs create a Google Cloud project and resources for a fixed time
- Labs have a time limit and no pause feature. If you end the lab, you'll have to restart from the beginning.
- On the top left of your screen, click Start lab to begin
Create a Compute Engine Virtual Machine Instance (zone: us-central1-a)
/ 5
Install software and configure the VM instance
/ 5
Run application software to get success response
/ 5
In this lab, you set up a Python development environment on Google Cloud. You then use Compute Engine to create a virtual machine (VM) and install software libraries for software development.
You perform the following tasks:
Compute Engine is just one resource provided on Google Cloud.
Google Cloud consists of a set of physical assets, such as computers and hard disk drives, and virtual resources, such as virtual machines (VMs), that are contained in Google's data centers around the globe. Each data center location is in a global region. Regions include Central US, Western Europe, and East Asia. Each region is a collection of zones, which are isolated from each other within the region. Each zone is identified by a name that combines a letter identifier with the name of the region. For example, zone a in the East Asia region is named asia-east1-a.
This distribution of resources provides several benefits, including redundancy in case of failure and reduced latency by locating resources closer to clients. This distribution also introduces some rules about how resources can be used together.
Any Google Cloud resources that you allocate and use must belong to a project. You can think of a project as the organizing entity for what you're building. A project is made up of the settings, permissions, and other metadata that describe your applications.
Resources within a single project can work together easily, for example by communicating through an internal network, subject to the regions-and-zones rules. The resources that each project contains remain separate across project boundaries; you can only interconnect them through an external network connection.
Each Google Cloud project has a:
As you work with Google Cloud, you'll use these identifiers in certain command lines and API calls. When you open and log into the Google Cloud Console, the DASHBOARD provides the Project info:
In this example:
Field | Value |
---|---|
Project name | qwiklabs-gcp-gcpd-30d966efdb51 |
Project ID | qwiklabs-gcp-gcpd-30d966efdb51 |
Project number | 734845473929 |
Each project ID is unique across Google Cloud. Once you have created a project, you can delete the project but its project ID can never be used again.
When billing is enabled, each project is associated with one billing account. Multiple projects can have their resource usage billed to the same account.
A project serves as a namespace. This means every resource within each project must have a unique name, but you can usually reuse resource names if they are in separate projects. Some resource names must be globally unique. Refer to the resource documentation for details.
In this lab, you provision a Compute Engine virtual machine (VM) and install software libraries for Python software development on Google Cloud.
Google Cloud provides three ways to interact with the services and resources.
Cloud Console: a web-based, graphical user interface that you can use to manage your Google Cloud projects and resources.
Command-line interface:
Client libraries: The Cloud SDK includes client libraries that enable you to easily create and manage resources. Google Cloud client libraries expose APIs to provide access to services and resource management functions. You also can use the Google API client libraries to access APIs for products such as Google Maps, Google Drive, and YouTube.
For each lab, you get a new Google Cloud project and set of resources for a fixed time at no cost.
Sign in to Qwiklabs using an incognito window.
Note the lab's access time (for example, 1:15:00
), and make sure you can finish within that time.
There is no pause feature. You can restart if needed, but you have to start at the beginning.
When ready, click Start lab.
Note your lab credentials (Username and Password). You will use them to sign in to the Google Cloud Console.
Click Open Google Console.
Click Use another account and copy/paste credentials for this lab into the prompts.
If you use other credentials, you'll receive errors or incur charges.
Accept the terms and skip the recovery resource page.
In this section, you use the Cloud Console to provision a new Compute Engine (VM) instance.
In the Console, click Navigation menu > Compute Engine > VM instances.
On the VM instances dialog, click Create instance.
On the Create an instance dialog, set the following fields and leave all other fields at their default:
dev-instance
It takes a approximately a minute to provision and start the VM.
Click Check my progress to verify your performed task. If you have completed the task successfully, the assessment score increases.
dev-instance
row, click SSH to launch a browser-hosted SSH session. If you have a popup blocker, you may need to click twice.When prompted, enter Y
to continue, accepting the use of additional disk space.
Again, when prompted, enter Y
to continue, accepting the use of additional disk space.
Click Check my progress to verify your performed task. If you have completed the task successfully you will granted with an assessment score.
In this section, you verify the software installation on your VM and run some sample code.
The output provides the version of Python and pip that you installed.
dev-instance
.A browser opens and displays a Hello GCP dev!
message from Python.
Click Check my progress to verify your performed task. If the check fails, wait a minute and try again. When task completes successfully, the assessment score increases.
<PROJECT_ID>
with your Google Cloud Project ID and <YOUR_VM_ZONE>
is the region you specified when you created your VM. Find these values on the VM instances dialog of the console:Your instance name shows in the SSH terminal window.
Output example:
Below are multiple choice-questions to reinforce your understanding of this lab's concepts. Answer them to the best of your abilities.
When you have completed your lab, click End Lab. Google Cloud Skills Boost removes the resources you’ve used and cleans the account for you.
You will be given an opportunity to rate the lab experience. Select the applicable number of stars, type a comment, and then click Submit.
The number of stars indicates the following:
You can close the dialog box if you don't want to provide feedback.
For feedback, suggestions, or corrections, please use the Support tab.
Copyright 2022 Google LLC All rights reserved. Google and the Google logo are trademarks of Google LLC. All other company and product names may be trademarks of the respective companies with which they are associated.
This content is not currently available
We will notify you via email when it becomes available
Great!
We will contact you via email if it becomes available
One lab at a time
Confirm to end all existing labs and start this one