Google Cloud Platform¶
Google Cloud Platform (GCP), offered by Google, is a suite of cloud computing services that runs on the same infrastructure that Google uses internally for its end-user products, such as Google Search and YouTube. Alongside a set of management tools, it provides a series of modular cloud services including computing, data storage, data analytics, and machine learning. Within cloudmesh, we develop services that support some of these products.
Google Compute Engine¶
Google Compute Engine delivers virtual machines running in Google’s innovative data centers and worldwide fiber network. Compute Engine’s tooling and workflow support enable scaling from single instances to global, load-balanced cloud computing. Compute Engine’s VMs boot quickly, come with high-performance persistent and local disk options, and deliver consistent performance. Our virtual servers are available in many configurations, including predefined sizes, and options to create Custom Machine Types optimized for your specific needs. Flexible pricing and automatic sustained use discounts make Compute Engine the leader in price/performance.
Next, we provide a step-by-step guide on how to create a Google account and service account through the Google webpage.
Prerequisites¶
We assume you have the cloudmesh google provider installed. This can be done with
$ pip install cloudmesh-google
For developers, the best way to install it is to use
cloudmesh-installer
.
$ mkdir cm
$ cd cm
$ pip install cloudmesh-installer
$ cloudmesh-installer get google
Creating the Google Account¶
If you do not have a google cloud account a new google account can be created using the following link:
Activation Google Cloud Service¶
Google allows you to apply for a free account and offers you $300 in credits to use google cloud. After creating a new account apply for a free trail and $300 credit at:
For students or education account, apply at:
Please choose the one that is most appropriate for you. For the educational account you may need a verification from your school or an email that is registered as an educational institution.
Setting up Google Cloud Account¶
Next, you will need to create a project and a service account. All service calls from cloudmesh require a project id to create VM, Disks, Volumes, etc.
We recommend that you simply use the project name cloudmesh
.
To authenticate the google cloud API from cloudmesh you also need to enable the required API and create a service account and then download the service account key.
Steps to setup project and service account:
Step |
Description |
Screenshot |
---|---|---|
1 |
||
2 |
Next Enable API |
|
3 |
For E.g.
|
|
4 |
||
5 |
Download the service
account key file to
~/.cloudmesh/security folder with name
google.json . |
After the key is downloaded, make sure you keep the ~/.cloudmesh
directory secure.
We will use the downloaded JSON file to register google cloud with cloudmesh and enable cloudmesh to invoke google cloud API by updating the YAML entry in the file
$ ~/.cloudmesh/cloudmesh.yaml
Next register a google cloud account with cloudmesh.
Registering Google Cloud to Cloudmesh¶
Use the following command to register google cloud
with cloudmesh. This command will update the
cloudmesh.yaml
file for respective service.
Register Google Compute¶
$ cms register update --kind=google --service=compute --filename=~/.cloudmesh/security/google.json
Register Google Storage¶
$ cms register update --kind=google --service=Storage --filename=~/.cloudmesh/security/google.json bucket=cloudmesh-bucket
Note: The cloudmesh-bucket will be used as the default storage bucket.
Register Google Volume¶
$ cms register update --service=volume --kind=google --filename=~/.cloudmesh/security/google.json zone=us-west-a sizeGb=100 label=google
Verify Setup¶
Check the setup by running the following command
$ cms set cloud=google
$ cms vm list --refresh
The above command should list the VMs from your google cloud compute service.
You are all set with Google Cloud account setup.
Links¶
Google Cloud Storage¶
Google Cloud Storage provides varity of storage products which are simple, reliable, and secure solutions for your media, analytics, and application data.
The following are avalaible as google cloud storage products:
Object or blob storage Storage Type: Cloud Storage
Block storage Storage Type: Persistent Disk
Archival storage Storage Type: Cloud Storage
File storage Storage Type: Cloud Filestore
Mobile application Storage Type: Cloud Storage for Firebase
Data transfer Storage Type: Data Transfer Services
Collaboration Storage Type: Drive enterprise
You can refer google storage documentation for more details on google cloud storage documentation. Cloudmesh currently supports object/blob storage. Users can follow instructions to configure the google could platform described as part of this document.