0% found this document useful (0 votes)
1K views22 pages

CSM Laboratory Manual Edited

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1K views22 pages

CSM Laboratory Manual Edited

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 22

An Autonomous Institution

Approved by AICTE, Affiliated to Anna University, Chennai.


ISO 9001:2015 Certified Institution, Accredited by NBA (BME, CSE, ECE, EEE, IT & MECH),
Accredited by NAAC with 'A' Grade with CGPA of 3.49.
#42, Avadi-Vel Tech Road, Avadi, Chennai- 600062, Tamil Nadu, India.

DEPARTMENT OF INFORMATION TECHNOLOGY

LAB MANUAL

Course Code : 191IT21A


Course Name : Cloud Service Management Laboratory
Branch : B.Tech–IT
Year : III
Semester : VI

Prepared By
Harshavardhini U
Assistant Professor/IT

DEPARTMENT OF INFORMATION TECHNOLOGY


VISION

 To emerge as centre for academic eminence in the field of information


technology through innovative learning practices.

MISSION

 M1-To provide good teaching and learning environment for quality education in
the field of information technology.
 M2-To propagate lifelong learning.
 M3-To impart the right proportion of knowledge, attitudes and ethics in students
to enable them take up positions of responsibility in the society and make
significant contributions.
DEPARTMENT OF INFORMATION TECHNOLOGY

Name of the Faculty: HARSHAVARDHINI U MTS No: 2054

Course
191IT21A
CLOUD SERVICE MANAGEMENT Code:
Name of the Course:
LABORATORY
Semester: VI

Programme: IT Year: III

CHECK LIST(2023-2024) EVEN SEM


S.No Documents & Details Availabilit Remarks
y

Lab Manual with


1  Vision, Mission, PEO, PO, PSO
 Syllabus
 CO with Justification

2 Any latest Software / Modern Tools used?

3 Class Time Table

4 Lab Utilization Time Table

5 Viva Questions with answers for each exercise

6 Observation Note (Sample)

7 Record Note (Sample)

8 Model Exam Time Table

9 Model Exam Question paper

10 Model Exam Attendance

11 Model Exam Answer sheet

12 Course Exit Survey

13 Overall CO Attainment

14 Logbook
DEPARTMENT OF INFORMATION TECHNOLOGY

PROGRAMME EDUCATIONAL OUTCOMES (PEOS)

PEOs PROGRAMME EDUCATIONA LOBJECTIVES (PEOs)

Graduates will demonstrate technical competency and leadership skills to lead a


PEO1
successful career in the field of IT&ITES.

Graduate will exhibit a commitment to communicate effectively in diverse environment


PEO2
and apply proficiency towards societal issue with human values.
Graduates will pursue lifelong learning in generating innovative solutions to the
PEO3
changing industrial needs using research and problem-solving skills.

PROGRAMME SPECIFIC OUTCOMES (PSOs)

PSO’s PROGRAMME SPECIFIC OUTCOMES(PSOs)

An ability to apply design and development principles in the construction of software


PSO1
systems of varying complexity.

The use of current application software, the design and use of operating systems and the
PSO2 analysis, design, testing and documentation of computer programs for the use in the
information engineering technologies.

The design techniques, analysis and the building, testing, operation and maintenance of
PSO3
networks, databases, security and computer systems. (both hardware and software).
PROGRAMME OUTCOMES (POs)

POs Programme Outcomes (POs)

Engineering Knowledge: Apply knowledge of mathematics,


PO1 science, engineering fundamentals and an Engineering Specialization to the solution of
complex engineering problems.
Problem Analysis: Identify, formulate, review research literature and analyze complex
PO2 engineering problems reaching substantiated conclusions using first principles of
mathematics, natural sciences, and engineering sciences.
Design / Development of solutions: Design solutions for complex engineering problems and
design system components or processes that meet specified needs with appropriate
PO3
consideration for public health and safety, cultural, societal, and environmental
considerations.
Conduct Investigations of Complex Problems: Use research-based knowledge and research
PO4 methods including design of experiments, analysis and interpretation of data, and synthesis of
the information to provide valid conclusions.
Modern tool usage: Create, select, and apply appropriate techniques, resources, and modern
PO5 engineering and IT tools including prediction and modeling to complex engineering activities
with an understanding of the limitations.
The Engineer and Society: Apply reasoning informed by the contextual knowledge to assess
PO6 societal, health, safety, legal and cultural issues and the consequent responsibilities relevant to
the professional engineering practice.
Environment and sustainability: Understand the impact of the professional engineering
PO7 solutions in societal and environmental contexts, and demonstrate the knowledge of, and need
for sustainable development.
Ethics: Apply ethical principles and commit to professional ethics and responsibilities and
PO8
norms of the engineering practice.
Individual and team work: Function effectively as an individual, and as a member or leader
PO9
in diverse teams, and in multidisciplinary settings.
Communication: Communicate effectively on complex engineering activities with the
engineering community and with society at large, such as, being able to comprehend and write
PO10
effective reports and design documentation, make effective presentations, and give and
receive clear instructions
Project Management and Finance: Demonstrate knowledge and understanding of the
PO11 engineering and management principles and apply these to one’s own work, as a member and
leader in a team, to manage projects and in multidisciplinary environments.

Life-long learning: Recognize the need for, and have the preparation and ability to engage in
PO12
independent and life-long learning in the broadest context of technological change.

191ITV21 – CLOUD SERVICES AND MANAGEMENT LABORATORY


COURSE OBJECTIVES

 To learn development of native applications with basic GUI Components


 To develop cross-platform applications with event handling
 To develop applications with location and data storage capabilities
 To develop web applications with database access

COURSE OUTCOMES:

Upon completion of this course, the students will be able to:


CO1 Develop basic application using cloud softwares
CO2 Develop hybrid web application for various analysis
CO3 Implement the usage of cloud resources
CO4 Implement applications for any organization
CO5 Analyze various web applications in cloud platform

CourseOutcome

PO10

PO11

PO12
PO1
PO2

PO3

PO4

PO5

PO6

PO7

PO8

PO9
CO1 3 2 2 1 - - - - - - - 1
CO2 3 3 2 - - - - - - -- - 1
CO3 3 2 2 1 - - - - - - - 1
CO4 3 3 2 2 - - - - - - - -
CO5 2 2 2 1 - - - - - - - 1
CO - - - - - - - - - - - -

Table of Contents

FACULTY
PAGE
S.NO DATE LIST OF EXPERIMENTS CO’S SIGN
NO
Create a Cloud Organization in AWS/Google
Cloud/or any equivalent Open Source cloud
1
software’s like Openstack, Eucalyptus, Open
Nebula with Role-based access control

Create a Cost-model for a web application using


2
various services and do Cost-benefit analysis

3 Create alerts for usage of Cloud resources

Create Billing alerts for your Cloud


4
Organization
Compare Cloud cost for a simple web
5 application across AWS, Azure and GCP and
suggest the best one
Create a Cloud Organization in AWS/Google Cloud/ or any equivalent Open-
Ex.No:01
Source cloud software like Open Stack ,Eucalyptus ,Open Nebula with Role-
Date: based access control

Aim:
To create a Cloud Organization in AWS with Roll-based access control.

Procedure:
To create an organization in AWS with role-based access, you can follow these general steps:
1. Create an AWS account: If you don't already have an AWS account, you'll need to create one.
This will be your management account and the root of your organization.

2. Enable AWS Organizations: From the AWS Management Console, navigate to the AWS
Organizations service and enable it. This will create the organization with your management
account as the master account.
3. Create OUs(OrganizationalUnits): You can create one or more OUs to organize your
accounts. For example, you might create separate OUs erent departments or environments
(e.g.,production, staging, development).

4. Create member accounts: You can create new AWS accounts and invite existing accounts
to join your organization as member accounts. You can add these accounts to the appropriate
OUs.

5. Create service control policies (SCPs): SCP share policies that you can attach to OUs or
individual accounts to define the maximum set of actions that can be performed on resources in
those OUs or accounts. This allows you to enforce role-based access and other security policies
across your organization.

6. Assign IAM roles: You can create IAM roles in your management account and delegate
specific permissions to them. You can then assume these roles from your member accounts to
perform actions on resources in the management account or other member accounts.

7. Configure permissions: You can use IAM policies to control access to AWS services and
resources. You can attach these policies to IAM users, groups ,or roles in your management
account or member accounts.

Downloaded by Asst. Prof IT ([email protected])


To create a role with specific permissions, you can follow these steps:
• Open the IAM console in your management account.
• Create an role and choose the appropriate trust identity (e.g., another AWS account, an AWS
service, or your AWS Organizations) .
• Define the permissions for the role by attaching an IAM policy or a service control policy (SCP).
• Save the role and note down the ARN (Amazon Resource Name) of the role.
• In the AWS Organizations console, attach the role to the appropriate OU or account.
• In the member account, assume the role to perform actions on resources in the management
account or other member accounts.

OUTPUT
Result:

Thus, the Cloud Organization was created in AWS with Role-Based Access Control was
implemented successfully.
EX.NO:02 Create a Cost-model for a web application using various services and do Cost-Benefit
analysis
Date:

Aim:
To create a Cost-model for a web application using various services and make a analysis for Cost-benefit.

Procedure:
Creating a cost-model for a web application in AWS involves estimating the costs of using various
AWS services for the application. Here's a general process To create a cost-model and do cost-benefit
analysis:

1. Identify the AWS services used by the web application: Some common services used
by web applications include AmazonS3, AmazonEC2, Amazon RDS, Amazon API
Gateway, AWS Lambda, Amazon Dynamo DB, Amazon Cloud Front, and Amazon
SNS.
2. Estimate the costs of each service: You can use the AWS Pricing Calculator to estimate
the costs of each service. The pricing calculator allows you to enter the specifics of your
usage, such as the number of instances, storage size, and data transfer.
3. Create a cost-model: Once you have estimated the costs of each service, you can create a
cost-model that summarizes the total costs. You can use a spreadsheet or a cloud cost
management tool to create the cost -model.
4. Do cost-benefit analysis: After creating the cost-model, you can do a cost-benefit analysis to
determine if the benefits of using AWS services out weight the costs. You can compare the
costs of using AWS services to the costs of running the application on -premises or using a
different cloud provider.
Program:
Python code:
Import boto 3

#Create a session using your AWS


credentials session=boto3.Session(
aws_access_key_id='YOUR_ACCESS_K
EY',aws_secret_access_key='YOUR_SEC
RET_KEY',region_name='us-east-1'
)

#CreateaCostExplorerclientcost_explorer=session.client('ce')

#Define the time period for the cost-model time_period={


'TimeUnit':'MONTHS
','Start':'2022-01-01',
'End':'2022-12-31'
}

#Define the granularity of the cost-model


granularity='DAILY'

#Define the metrics for the cost-model


metrics=['BlendedCost','Usage Quantity']

#Define the grouping for the cost-model


group_by=[{'Type':'DIMENSION','Key':'SERVICE'}]
#Get the cost and usage data
response=cost_explorer.get_cost_and_usage
(TimePeriod=time_period,Granularity=gra
nularity,
Metrics=metrics,Grou
pBy=group_by
)

#Print the cost and usage data print (response)

{
'ResultsByTime':[
{
'TimePeriod':{
'Start':'2022-01-01',
'End':'2022-12-31',
'TimeUnit':'MONTHS'
},
'Groups':[
{
'Keys':
['AmazonE
C2'
],
'Metrics':
{'BlendedCost':{
'Amount':'1234.56',
'Unit':'USD'
},
'UsageQuantity':
{'Amount':'1000.0'
,
'Unit':'Hours'
}
}
},
{
'Keys':
['AWSLamb
da'
],
'Metrics':
{'BlendedCost':{
'Amount':'789.0',
'Unit':'USD'
},
'UsageQuantity':
{'Amount':'5000000',
'Unit':'requests'
}
}
}
]
}
],
'ResponseMetadata':{
'RequestId':'abcdefg-1234-5678-90ab-
cdefghijkl','HTTPStatusCode':200,
'HTTPHeaders':{
'content-type':'text/xml;charset=UTF-
8','content-length':'1234',
'date':'Tue,15Feb202212:34:56GMT'
},
'RetryAttempts':0
}
}

Result:

Thus, Cost-model for a web application using various services created and analysis was
implemented successfully
EX.NO:03 Create alerts for usage of Cloud Resources
Date:

Aim:
To create alerts for usage of Cloud Resources.

Procedure:
To create alerts for usage of Cloud resources in AWS, you can use Amazon Cloud Watch and AWS
Lambda. Here's an example code that creates an alert for Amazon S3 bucket usage :

1. Create an IAM role for the Lambda function with the following policy.
2. Create a new Lambda function with the following code.
3. Set the Lambda function rigger to run every day at a specific time.
4. Create a Cloud Watch alarm with the following code.

Program:
Policy for Role:(JSONcode)
{
"Version":"2012-10-17",
"Statement":[
{
":"Allow","Actio
n":[
"cloudwatch:PutMetricAlarm","cloudwatch:DescribeAlarms","cloud
watch:GetMetricData","cloudwatch:GetMetricStatistics"
],
"Resource":"*"
},
{
"Effect":"Allow",ction":[
"s3:GetBucketSize"
],
"Resource":[
"arn:aws:s3:::your-bucket-name"
]
}
]
}

NewLambdaFunction:(Python)
Import boto3
Import json

s3=boto3.client('s3')
cloudwatch=boto3.client('cloudwatch')

deflambda_handler(event,context):
try:
response=s3.head_bucket(Bucket='your-bucket-
name')size=response['ContentLength']cloudwatch.put_
metric_data(
Namespace='S3',Metri
cData=[
{
'MetricName':'BucketSize','Di
mensions':[
{
'Name':'BucketName',
'Value':'your-bucket-name'
},
],
'Timestamp':datetime.datetime.now(),'Valu
e':size,
'Unit':'Bytes'
},
]
)
Except Exception ase:
print(e)

Cloud Watch Alarm:(Python) import boto3


Import date time

cloudwatch=boto3.client('cloudwatch')

defcreate_alarm():
try:
cloudwatch.put_metric_alarm(AlarmName='S3BucketSi
zeAlarm',AlarmDescription='AlarmifS3bucketsizeexc
eeds10GB',Namespace='S3',
MetricName='BucketSize',St
atistic='SampleCount',Period
='86400',EvaluationPeriods='
1',Threshold='10000000000',
ComparisonOperator='GreaterThanThreshold',
AlarmActions=[
'arn:aws:sns:us-east-1:123456789012:your-sns-topic-arn'
],
Dimensions=[
{
'Name':'BucketName','Valu
e':'your-bucket-name'
},
],
AlarmDescription='AlarmifS3bucketsizeexceeds10GB'
)
exceptExceptionase:
print(e)

create_alarm()

Output:

Result:
Thus, usage alerts for cloud resources were implemented successfully.
EX.NO:04 Create Billing alerts for your Cloud Organization
Date:

Aim:
To create billing alerts for your Cloud Organization.

Procedure:
To create billing alerts for your Cloud Organization in AWS, you can follow these steps:

1. Sign into the AWS Management Console and navigate to the Billing and Cost Management
service.
2. In the navigation panel, choose "Budgets".
3. Click on " Create budget " and select "Cost budget".
4. Provide an ameand description for your budget.
5. Choose the time period for your budget (e.g.,Monthly,Quarterly,Annually).
6. Configure the budget threshold. You can choose to fit the budget amount or a percentage of your
actual costs.
7. Configure the alerts. You can choose to receive alerts via email or Amazon SNS.

Program:
AWSCLI:(Bash)
Aws budgets create-budget--account-id123456789012--
budget\'{
"BudgetName":"MyCostBudget","Bud
getLimit":{
"Amount":"1000",
"Unit":"USD"
},
"CostFilters":{
"LinkedAccount":["123456789012"]
},
"CostTypes":
{"IncludeTax":tru
e,
"IncludeSubscription":true,"Use
Blended":false,"IncludeRefund":
true,"IncludeCredit":true,"Includ
eUpfront":true,"IncludeRecurrin
g":true,"IncludeOtherSubscriptio
n":true,"IncludeSupport":true,"In
cludeDiscount":true,"UseAmorti
zed":false
},
"TimeUnit":"MONTHLY",
"BudgetType":"COST",
"Noti 昀椀 cationsWithSubscribers":[
{
"Noti 昀椀 cation":{
"Noti 昀椀
cationType":"ACTUAL","ComparisonOperator":
"GREATER_THAN","Threshold":100,
"ThresholdType":"PERCENT
AGE","Noti 昀椀
cationState":"ALARM"
},
"Subscribers":[
{
"SubscriptionType":"EMAIL","Ad
dress":"[email protected]"
}
]
}
]

}'
Output:

Result:
Thus, billing alerts for your Cloud Organization were implemented successfully.
EX.NO:05 Compare Cloud cost for a simple web application across AWS, Azure and GCP and
suggest the best one
Date:

Aim:
To compare Cloud cost for a simple web application across AWS, Azure and GCP and suggest the
best one

Observation:
1. AWS: AWS offers a rich array of tools , including databases , analytics , management , IoT ,
security , and enterprise applications. AWS introduced per – second billing in 2017 for EC2
Linux-based instances and EBS volumes.

2. Azure: Azure has slightly surpassed AWS in the percentage of enterprises using it . Azure
also offers various services for enterprises, and Microsoft’s long standing relationship with
this segment makes it an easy choice for some customers. While Azure is the most expensive
choice for general-purpose instances, it’s one of the most cost-effective alternatives to
compute- optimized instances.

3. Google Cloud Platform (GCP): GCP stands out thanks to its almost limitless internal
research and expertise. GCP is different due to its role in developing various open-source
technologies. Google Cloud is much cheaper than AWS and Azure for computing
optimized cloud –based instances.

The best platform depends on your specific needs and requirements. If you need a wide array of tools and
services, AWS might be the best choice. If you’ relooking for enterprise services and have a long
standing relationship with Microsoft, Azure could be your best bet.

Conclusion:
If you prioritize innovation and open- source technologies, GCP could be the right choice. For
computing optimized instances, GCP seems to be the most cost-effective. However , its essential to
understand your requirements fully before making a decision.

Result:
Thus, the comparison for Cloud cost for a simple web application across AWS , Azure and GCP were
implemented successfully.

You might also like