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

Cloud Computing Lab-3

Uploaded by

Aditya Shrestha
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Cloud Computing Lab-3

Uploaded by

Aditya Shrestha
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

LAB 3: GOOGLE CLOUD PLATFORM

OBJECTIVE

The objective of this lab is to explore Google Cloud Platform's serverless technology by
deploying a serverless application using Google Cloud Functions and working with Big Data
services using BigQuery.

RELATED THEORY

Google Cloud Platform (GCP) provides a suite of cloud computing services that enable
businesses and developers to build, deploy, and scale applications efficiently. Two essential
components covered in this lab are:

• Google Cloud Functions: A serverless execution environment that automatically


manages infrastructure, enabling developers to run code in response to events without
managing servers.
• BigQuery: A fully managed data warehouse that allows fast SQL-based queries on
large datasets for analytics and decision-making.

TASK 1: Deploying a Serverless Application Using Google Cloud Functions

Step 1: Select Google Cloud Project

• Choose an existing Google Cloud Project or create a new one.

Step 2: Enable Cloud Functions API

• Navigate to the API section in the Google Cloud Console and enable Cloud Functions
API.

Step 3: Create a New Cloud Function

1. Click on "Create Function."


2. Enter a function name.
3. Select the desired region.
4. Choose the trigger type:
o Select HTTP if triggering via a web request.

Step 4: Configure Runtime and Code

1. Choose a runtime (e.g., Node.js 20, Python 3.11, etc.).


2. Select "Inline Editor" or upload code via ZIP/Cloud Storage.
3. Enter the function code.
Step 5: Deploy the Function

• Click "Deploy" and wait for the function to be deployed successfully.

Step 6: Test the Function

• Test the function using Google Cloud Console or by making an HTTP request.

Step 7: Manage & Monitor the Function

• View Logs: Navigate to Operations > Logging.


• Edit Function: Go to Cloud Functions, select the function, and click "Edit."
• Delete Function: Click on the function and select "Delete."

TASK 2: Exploring Big Data Services Using BigQuery

Step 1: Access BigQuery Console

• Navigate to the BigQuery section on Google Cloud Console.


Step 2: Create a Dataset

1. Click "+ CREATE DATASET."


2. Enter a Dataset ID.
3. Choose a Data Location.
4. Keep default settings and click "Create Dataset."

Step 3: Create a Table

1. Click "Create Table."


2. Select a data source (Local File, Cloud Storage, or Google Sheets).
3. Choose the file format.
4. Define the schema.
5. Click "Create Table" to finalize.
Step 4: Running Queries in BigQuery

1. Click "Compose New Query."


2. Enter the following SQL query:

SELECT name, salary


FROM `your_project_id.your_dataset_id.your_table_id`
WHERE salary > 50000;

3. Click "Run" to process the query and view results.


TASK 3: Monitor Resources Using Google Cloud Operations Suite

Step 1: Navigate to the Operations Suite Section


• Open the Google Cloud Console and go to the Operations Suite section.

Step 2: Set Up Monitoring for the VM Instance

• Configure monitoring for the VM instance created in Task 2 to track its performance
and resource usage.
CONCLUSION

This lab provided hands-on experience with Google Cloud Functions for deploying serverless
applications and explored BigQuery for managing and querying large datasets. Additionally, it
covered monitoring cloud resources using the Google Cloud Operations Suite, enabling
scalable, cost-effective solutions for cloud-based application development, data analysis, and
system monitoring.

You might also like