App Dev: Setting up a Development Environment – Python | GSP183 | Cloud Development #1
#Python_development_environment_on_Google_CloudPlatform
#Cloud_Development
#Google_Cloud_Platform
#GSP183
In this lab, you set up a Python development environment on Google Cloud Platform, using Google Compute Engine to create a virtual machine (VM) and installing software libraries for software development.
You perform the following tasks:
Provision a Google Compute Engine instance.
Connect to the instance using SSH.
Install a Python library on the instance.
Verify the software installation.
Overview
Compute Engine is just one resource provided on Google Cloud Platform.
Google Cloud Platform
Google Cloud Platform (GCP) 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.
Projects
Any GCP 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 GCP project has:
A project name, which you provide. A project ID, which you can provide or GCP can provide for you. A project number, which GCP provides. As you work with GCP, you’ll use these identifiers in certain command lines and API calls. The following screenshot shows a project name, its ID, and number:
The Google Cloud Platform Console displays project ID and name
In this example:
Example Project is the project name. example-id is the project ID. 123456789012 is the project number. Each project ID is unique across GCP. Once you have created a project, you can delete the project but its 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 documentation for the resource for details.
In this lab, you provision a Google Compute Engine virtual machine (VM) and install software libraries for Python software development on Google Cloud Platform (GCP).
Ways to interact with the services
GCP gives you three basic ways to interact with the services and resources.
Google Cloud Platform Console: a web-based, graphical user interface that you can use to manage your GCP projects and resources.
Command-line interface
Google Cloud SDK: provides the gcloud command-line tool, which gives you access to the commands you need.
Cloud Shell: a browser-based, interactive shell environment for GCP. You can access Cloud Shell from the GCP console. If you prefer to work in a terminal window, the Google Cloud SDK provides the gcloud command-line tool, which gives you access to the commands you need. The gcloud tool can be used to manage both your development workflow and your GCP resources. See the gcloud reference for the complete list of available commands.
Client libraries: The Cloud SDK includes client libraries that enable you to easily create and manage resources. GCP 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.
Setup
linux foundation