0% found this document useful (0 votes)
19 views

Assignment 1

Uploaded by

PRATIK DAREKAR
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views

Assignment 1

Uploaded by

PRATIK DAREKAR
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 15

Name :- Mahesh Rajendra Barudwale

Roll no.:-321007
Gr.no.:-21910649
Div:-A
Batch:-B6

Assignment No.1
Title:- Study the Google Cloud Platform.
Theory:-
What Is Cloud Computing?
Cloud computing, in simple words, is accessing and storing data over the Internet

instead of doing it on your personal hard drive.

It offers services like storage, database, networking, and more over the Internet to

provide faster, innovative, and flexible resources to its customers. The customers get to

pay only for the resources they use, hence helping them lower their operating costs and

run their business infrastructure more efficiently.

Now, among various cloud providers like AWS, Microsoft, VMWare, IBM, etc., Google

Cloud has been the talk of the town in recent years and there are enough reasons behind

it. Let’s begin with starters and understand what Google Cloud is.

What Is Google Cloud Platform?


Google Cloud is a suite of Cloud Computing services offered by Google. The platform

provides various services like compute, storage, networking, Big Data, and many more

that run on the same infrastructure that Google uses internally for its end users like

Google Search and YouTube.

Google server hasn’t gone down in years. So, if you are planning to run your application

on the Google Cloud infrastructure, then you can be assured of your applications being

safe and secure.


About Google Cloud services

(https://cloud.google.com/docs/overview/cloud-platform-services)

This overview introduces some of the commonly used Google Cloud services. For the full

list of services, see the Products and services page.

This overview covers the following types of services:

· Computing and hosting

· Storage

· Databases

· Networking

· Big data

· Machine learning

1)Creating a Linux virtual machine instance.


Task 1: Create a new instance from the Cloud Console

In this section, you'll learn how to create new pre-defined machine types with Compute Engine
from the Cloud Console.

1. In the Cloud Console, on the Navigation menu ( ), click Compute Engine > VM
Instances.
2. To create a new instance, click CREATE INSTANCE.
3. There are many parameters you can configure when creating a new instance. Use the
following for this lab:
4. Click Create.

5. To use SSH to connect to the virtual machine, in the row for your machine, click SSH.

Task 2: Install an NGINX web server

Now you'll install an NGINX web server, one of the most popular web servers in the world, to
connect your virtual machine to something.

1. In the SSH terminal, to get root access, run the following command:

sudo su –
2. As the root user, update your OS:

apt-get update

Expected output

3. Install NGINX:
apt-get install nginx -y

Expected output:

4. Confirm that NGINX is running:

ps auwx | grep nginx

5. To see the web page, return to the Cloud Console and click the External IP link in the
row for your machine, or add the External IP value to http://EXTERNAL_IP/ in a new
browser window or tab.

Task 3: Create a new instance with gcloud

1. In the Cloud Shell, use gcloud to create a new virtual machine instance from the
command line:

gcloud compute instances create gcelab2 --machine-type n1-standard-2--zone us-central1-f


Expected output:

2. To see all the defaults, run:


gcloud compute instances create –help

3. To exit help, press CTRL + C.


4. In the Cloud Console, on the Navigation menu, click Compute Engine > VM
instances. Your 2 new instances should be listed.

5. You can also use SSH to connect to your instance via gcloud. Make sure to add your
zone, or omit the --zone flag if you've set the option globally:

gcloud compute ssh gcelab2 --zone us-central1-f

6. Type Y to continue.

7. Press ENTER through the passphrase section to leave the passphrase empty.
8. After connecting, disconnect from SSH by exiting from the remote shell:
exit
2) App Engine: Qwik Start – Python

The App Engine Admin API enables developers to provision and manage their App Engine
Applications.

1. In the left menu click APIs & Services > Library.

2. Type "App Engine Admin API" in search box.

3. Click App Engine Admin API.

4. Click Enable. If there is no prompt to enable the API, then it is already enabled and no
action is needed.

Download the Hello World app


1.Enter the following command to copy the Hello World sample app repository to your Google
Cloud instance:
git clone https://github.com/GoogleCloudPlatform/python-docs-samples.git

2.Go to the directory that contains the sample code:


cd python-docs-samples/appengine/standard_python3/hello_world

Test the application

1. From within your helloworld directory where the app's app.yaml configuration file is
located, start the Google Cloud development server with the following command:
dev_appserver.py app.yaml

The development server is now running and listening for requests on port 8080.

2. View the results by clicking the Web preview > Preview on port 8080.

Make a change

1. Click the (+) next to your Cloud Shell tab to open a new command line session.
2. Enter this command to go to the directory that contains the sample code.

cd python-docs-samples/appengine/standard_python3/hello_world

3. Enter the following to open main.py in nano to edit the content.

Nano main.py

4. Change “Hello World!” to “Hello Beautiful World!”. Exit and save the file.

5. Reload the Hello World! Browser or click the Web Preview > Preview on port 8080 to
see the results.

3) BigQuery Machine Learning using Soccer Data

Open BigQuery

The BigQuery console provides an interface to query tables, including public datasets offered by
BigQuery.
In the Cloud Console, from the Navigation menu select BigQuery:

The Welcome to BigQuery in the Cloud Console message box opens. This message box provides a link to
the quickstart guide and the release notes.

Click Done.

The BigQuery console opens.

Once the tables are created the display will be similar to below:
Calculate shot distance and shot angle

1. In the query Editor, copy and paste the code:

2. Click Run.
Calculate shot angle from (x,y) coordinates
1. In the query Editor, click Compose New Query
2. In the query Editor, copy and paste the code:

3. Click Run.

Create expected goals models using BigQuery ML


1. In the query Editor, click Compose New Query
2. In the query Editor, copy and paste the code:

3. Click Run.

Understanding the Logistic regression model fit


1. In the query Editor, click Compose New Query
2. Copy and paste the following code into the query EDITOR. This is a simple call to the
ML.WEIGHTS function to the logistic regression model that you fit in the previous step.

3. Click Run.

Create a boosted tree Model for expected goals


1. In the query Editor, click Compose New Query
2. In the query Editor, copy and paste the code:

3. Click Run.

Apply an expected goals model to new data


1. In the query Editor, click Compose New Query
2. In the query Editor, copy and paste the code:

3. Click Run

Identify most unlikely goals using model probabilities


1. In the query Editor, click Compose New Query
2. In the query Editor, copy and paste the code:

3. Click Run

Conclusion :- We get hands-on lab practice for gcp . Also get familier with gcp
console.

You might also like