0% found this document useful (0 votes)
14 views22 pages

Abhilash CC

The document is a report on cloud computing assignments submitted by Abhilash for a Bachelor of Engineering degree in Computer Science and Engineering. It covers various topics including Docker integration with Amazon EC2, hosting static websites using Amazon S3 and CloudFront, monitoring with Amazon CloudWatch, and an introduction to Kubernetes. The report emphasizes the benefits of using these technologies for efficient application deployment and management in cloud environments.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views22 pages

Abhilash CC

The document is a report on cloud computing assignments submitted by Abhilash for a Bachelor of Engineering degree in Computer Science and Engineering. It covers various topics including Docker integration with Amazon EC2, hosting static websites using Amazon S3 and CloudFront, monitoring with Amazon CloudWatch, and an introduction to Kubernetes. The report emphasizes the benefits of using these technologies for efficient application deployment and management in cloud environments.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

RV Institute of Technology and Management

VISVESVARAYA TECHNOLOGICAL UNIVERSITY


“Jnana Sangama”, Belagavi-590018.

A Report on
“CLOUD COMPUTING ASSIGNMENT”
Submitted in the partial fulfilment of the requirements for the award of the degree of

Bachelor of Engineering in Computer Science and Engineering

Submitted by
Abhilash (1RF22CS123)
Under the Guidance of
Prabhavati K,
Assistant Professor,
CSE, RVITM

Department of Computer Science and Engineering


RV INSTITUTE OF TECHNOLOGY AND MANAGEMENT
(Affiliated to Visvesvaraya Technological University, Belagavi & Approved by AICTE, New Delhi)
JP Nagar 8th Phase, Kothanur, Bengaluru-560076
DOCKER
Docker Containers (Using EC2)

1. Introduction

Docker is a powerful platform that simplifies the development, deployment, and management of applications
within lightweight, portable containers. Containers allow developers to package applications and their
dependencies, ensuring that they run consistently across any environment. Amazon EC2 (Elastic Compute
Cloud) is a scalable computing service offered by Amazon Web Services (AWS) that allows users to run virtual
machines in the cloud. This report delves into the integration of Docker with EC2 to explore the benefits,
setup, and usage of Docker containers on EC2 instances.

2. Overview of Docker and EC2

Docker Overview

Docker is a containerization platform that enables developers to package software and its dependencies into a
unified unit called a container. Containers can be run on any system that supports Docker, ensuring consistency
across different environments—whether development, testing, or production. The core components of Docker
include:

Docker Engine: The runtime that manages and runs containers.


Docker Images: Read-only templates used to create containers. Images can be created using a Dockerfile,
a script that defines how the image is built.
Docker Containers: Lightweight, standalone executable packages that include everything needed to run a
piece of software, such as code, runtime, system tools, and libraries.
Docker Hub: A public repository of pre-built Docker images that can be pulled and used in local
environments.

Amazon EC2 Overview

Amazon EC2 is a scalable cloud computing service that provides resizable compute capacity in the cloud. EC2
instances are virtual servers that can be provisioned with various configurations for different computing needs,
including CPU power, memory, storage, and networking. Some important features of EC2 include:

On-Demand Instances: Pay-as-you-go instances with no long-term commitments.


Auto Scaling: Automatically adjust the number of instances to meet demand.
Elastic Load Balancing (ELB): Distribute traffic across multiple EC2 instances to ensure high availability.
When combined with Docker, EC2 allows users to quickly deploy and manage containerized applications in the
cloud. EC2's scalability and flexibility make it an ideal environment for running Docker containers at scale.

3. Benefits of Using Docker with EC2

Consistent deployments: Avoid "works on my machine" issues.


Simplified testing: Run automated tests inside containers.
Better resource utilization: Containers use fewer resources than VMs.
Easier scaling and orchestration: Tools like Kubernetes work seamlessly with Docker containers.

4. Setting Up Docker on EC2

To run Docker containers on EC2, you must first set up an EC2 instance and install Docker.

Below are the step-by-step instructions:

Step 1: Launch an EC2 Instance

Step2: Choose Amazon Linux as AMI

Step 3: Enable HTTP and HTTPS

Step 4: Keep the remaining options as default and launch the instance
Step 5: Go to your instances and then connect it

Step 6: After some time, linux machine is opened, execute the below commands in it

sudo yum update –y


sudo yum install docker –y
sudo service docker start
sudo service docker status
(ctrl Z)
sudo su
docker version
docker pull nginx
docker images
docker run -d -p 80:80 nginx
docker ps
7. After this go to ec2 instance -> connect -> copy public ip

8. Paste the public IP in the Browser


5. Conclusion

Docker, when combined with EC2, offers a powerful solution for deploying containerized applications at scale.
By leveraging EC2’s flexible infrastructure and Docker's lightweight containerization, developers can achieve
enhanced portability, consistency, and scalability for their applications. AWS's additional services like ECS, EKS,
and ECR provide advanced features for container orchestration, management, and storage, further enhancing
the DockerEC2 ecosystem. Together, Docker and EC2 streamline the deployment pipeline, reduce costs, and
simplify the management of containerized applications in the cloud.

CLOUD FRONT
In the era of fast and reliable web services, delivering content quickly and securely to users across the globe
has become essential. Amazon Web Services (AWS) offers powerful tools to facilitate this need—among them
are Amazon S3 (Simple Storage Service) and Amazon CloudFront.

Amazon CloudFront is a fast content delivery network (CDN) service provided by AWS. It securely delivers data,
videos, applications, and APIs to users globally with low latency and high transfer speeds. This report outlines
the process of hosting a static website using Amazon S3 and distributing it via AWS CloudFront, ensuring
improved performance and global reach.

Amazon S3 allows users to store and retrieve any amount of data at any time, making it ideal for hosting static
websites. However, when traffic grows or users are globally distributed, latency and speed become issues. To
overcome this, Amazon CloudFront is used in conjunction with S3 to cache and distribute content through
edge locations worldwide, improving load times and reducing server load.

Steps to Host a Static Website with AWS S3 and CloudFront

Step 1: Create and Configure an S3 Bucket

1.Login to the AWS Console

• Navigate to the AWS Management Console and search for S3 in the services tab.

1. Create a New S3 Bucket


Click on “Create Bucket”.
Provide a unique Bucket Name.
Leave all other settings as default unless specific configurations are needed.
Click Create Bucket
1. Enable Static Website Hosting
Go to the created bucket and select the Properties tab.
Scroll down to the Static Website Hosting section.
Enable the feature and specify the index document and save the changes
1. Upload Website Files
Navigate to the Objects tab.
Click Upload and add your HTML (or other static) files.
Complete the upload process.

1. Access the Hosted Website


After the file upload, g o back to the Properties section.
Copy the Endpoint URL under Static Website Hosting.
Paste the URL into a browser to check if your website is live.
If permissions are not properly set, access may be denied until CloudFront is configured.

Step 2: Set Up CloudFront to Distribute the Website

1. Go to Cloud Front Service

From the AWS Console, search for and select CloudFront.

2. Create a New Distribution

Click on Create Distribution.


Under the Origin Settings, specify your S3 bucket as the origin.
Create a new OAI (Origin Access Identity) to securely connect CloudFront with your S3 bucket.

1. Keep Default Settings


For most static website distributions, default settings work well.
You may adjust caching, error pages, logging, and other optional settings based on needs.
2. Set Permissions
CloudFront automatically creates and applies a bucket policy to allow access to files through the
distribution.
This ensures your content remains secure while accessible via CloudFront.

1. Access via CloudFront


Once the distribution is deployed, it provides a Distribution Domain Name (a CloudFront URL).
Visit the CloudFront URL in your browser to access the website.

You’ll notice improved performance and reduced latency compared to accessing the S3 bucket URL
directly.

By combining Amazon S3 for storage and Amazon CloudFront for global distribution, developers can easily
and securely host high-performance static websites. This approach not only improves access speed through
caching at edge locations but also enhances security and scalability. With just a few steps, you can deliver your
content to users around the world in an efficient and cost-effective manner.

Amazon CloudWatch
Introduction

In cloud computing, system monitoring is critical for ensuring that resources are being used efficiently and that
applications are performing as expected. Amazon CloudWatch is a key monitoring and observability service
provided by Amazon Web Services (AWS). It enables users to monitor AWS resources and the applications they
run in real time, providing insights that help maintain operational health, optimize performance, and reduce
costs.

Amazon CloudWatch:

Amazon CloudWatch is a fully managed service designed to monitor and manage various AWS resources and
applications. It collects operational data in the form of logs, metrics, and events. This data can then be used to
gain a comprehensive view of system performance, set alarms, automate actions, and troubleshoot issues.

CloudWatch works with almost all AWS services such as Amazon EC2, RDS, Lambda, API Gateway, DynamoDB,
ECS, and many more. It also allows users to monitor custom metrics and logs from their own applications and
on-premise servers.
Key Features of Amazon CloudWatch

1. Metrics Monitoring

CloudWatch collects both default metrics from AWS services and custom metrics from user applications.
Metrics are data points related to performance, such as:

CPU utilization
Memory usage
Disk I/O
Network traffic
Request count
Error rates

These metrics can be used to identify performance bottlenecks and resource inefficiencies.

2. Alarms

Alarms in CloudWatch allow users to set thresholds for specific metrics. When these thresholds are breached,
CloudWatch can:

Send notifications (e.g., via Amazon SNS)


Trigger automated responses (e.g., auto-scaling)
Log the event for audit and analysis

For example, an alarm can be created to notify you when CPU usage exceeds 80% on an EC2 instance.

3. Logs Management

CloudWatch Logs allows users to collect, monitor, and store logs from:

Applications
AWS Lambda functions
Amazon EC2 instances
AWS CloudTrail

Logs help in troubleshooting issues, understanding application behavior, and analyzing patterns. You can
search and filter log data, or use CloudWatch Logs Insights for advanced queries.

4. Dashboards

CloudWatch Dashboards provide a visual interface for monitoring AWS environments. Users can create
customized views with graphs and charts to track metrics and logs in real time.

Dashboards help teams stay informed and respond faster to system events.

5. Events and Automation

CloudWatch integrates with Amazon EventBridge to react to changes in your AWS environment. These events
can trigger actions such as:

Starting/stopping EC2 instances


Running Lambda functions
Sending alerts or messages

Event-driven automation helps in reducing manual effort and increasing operational efficiency.

How CloudWatch Works


The CloudWatch service works in five basic steps:

1. Data Collection: CloudWatch collects metrics and logs from AWS services and custom sources.
2. Data Storage: The data is timestamped and stored for future reference and analysis.
3. Analysis and Visualization: The collected data is analyzed using tools like CloudWatch Logs Insights and
visualized through dashboards.
4. Alarming: Thresholds are set on metrics to generate alarms and alerts.
5. Automated Response: Based on alarms or events, automated actions can be triggered.

CloudWatch supports integration with agents like the CloudWatch Agent and Unified CloudWatch Agent for
enhanced monitoring of EC2 instances and on-premise infrastructure.

Use Cases of Amazon CloudWatch

Application Monitoring: Monitor application performance, API latency, and error rates.
Infrastructure Health: Track the health of servers, databases, and other AWS components.
Security Monitoring: Detect suspicious activity or unauthorized access using logs and metrics.
Operational Automation: Automatically respond to system state changes (e.g., reboot a failed instance).
Cost Optimization: Identify and shut down underutilized resources to save on AWS bills.

Benefits of Amazon CloudWatch

Real-Time Monitoring: Monitor systems and applications in near real-time.


Automation: Automatically react to changes in the environment.
Scalability: Easily monitor thousands of resources without additional infrastructure.
Custom Metrics: Track custom application-specific metrics.
Integration: Seamless integration with AWS services and third-party tools.
Centralized View: Unified visibility across AWS regions and accounts.

Setting up Cloud Watch:


1.
2. Go to the CloudWatch service in the AWS Console.
3. Navigate to Alarms > Click on Create alarm.
3. Click Select metric

4. In the Browse tab, expand Per-Instance Metrics.

Choose a metric (e.g., CPU Utilization) for a specific EC2 instance (select the checkbox).
Click on Select metric at the bottom right to proceed.

5. Specify Metric and Conditions

In the input box for threshold value, enter a value (e.g., 20).
This means the alarm will trigger when CPU usage exceeds 20%.
(Optional) Click Additional configuration if you want to set conditions like how many evaluation periods to
consider.

6. Add Name and Description


7. Preview and Create

Conclusion

Amazon CloudWatch plays a vital role in cloud computing by providing a reliable, scalable, and comprehensive
monitoring solution. It helps businesses maintain high availability, improve performance, and reduce costs
through intelligent insights and automation. Whether you are running a simple website or a complex
distributed system on AWS, CloudWatch provides the visibility and control needed to operate efficiently and
securely.

Kubernetes
1. Introduction to Kubernetes

Kubernetes, often abbreviated as K8s, is an open-source platform designed to automate the deployment,
scaling, and management of containerized applications. It was originally developed by Google and is now
maintained by the Cloud Native Computing Foundation (CNCF).

As applications grow in complexity and scale, managing them manually across multiple machines becomes
challenging. Kubernetes addresses this by providing a system that ensures containers are deployed, updated,
and managed efficiently across a cluster of computers.

Key features of Kubernetes include:

Automated rollouts and rollbacks


Self-healing (restarts failed containers, replaces and reschedules them when nodes die)
Horizontal scaling (automatically increase/decrease the number of running containers)
Service discovery and load balancing

Kubernetes is widely adopted in modern cloud-native environments and supports most container runtimes,
including Docker, containerd, and CRI-O.

2. Kubernetes Architecture and Core Components

Kubernetes follows a master-worker architecture, comprising two main components: the control plane and the
worker nodes.
Control Plane Components:

API Server: Acts as the front end; all requests to the cluster go through the API server.
etcd: A key-value store used to store all cluster data.
Controller Manager: Handles routine tasks such as node management and replication.
Scheduler: Assigns workloads (Pods) to appropriate nodes based on resource availability and policies.

Node Components:

Kubelet: An agent running on each node that ensures containers are running in a Pod.
Kube-proxy: Maintains network rules and handles communication inside or outside the cluster.
Container Runtime: Software responsible for running the containers

Core Concepts:

Pods: The smallest deployable unit in Kubernetes. A Pod can host one or more tightly coupled containers.
Services: Abstract a set of Pods and provide a stable IP and DNS name, enabling load balancing and
discovery.
Deployments: Allow declarative updates for Pods and ReplicaSets. They help in rolling updates and
rollback.
ReplicaSet: Ensures a specified number of Pod replicas are running at any given time.
Namespaces: Provide logical separation between different environments (e.g., dev, test, production)
within a cluster.

3. Advantages and Use Cases of Kubernetes

Advantages of Using Kubernetes:

Portability: Runs on any platform — public cloud, private cloud, or on-premises.


Scalability: Easily scale applications up and down as needed.
High Availability: Built-in mechanisms for fault tolerance and self-healing.
Resource Optimization: Efficiently manages hardware resources and scheduling of workloads.
Automation: Reduces manual effort with features like auto-scaling, automated deployments, and
monitoring.

Use Cases:

Microservices Architecture: Kubernetes simplifies managing microservices by handling service discovery,


traffic routing, and scaling.
CI/CD Pipelines: Automates testing, deployment, and rollback in continuous integration/deployment
workflows.
Hybrid Cloud & Multi-Cloud Deployments: Easily run and manage workloads across various environments.
Big Data & AI Workloads: Ideal for running distributed data-processing applications like Apache Spark or
machine learning workloads.

Conclusion:

Kubernetes has become a standard in container orchestration, enabling organizations to deliver and scale
applications with high reliability and speed. It abstracts much of the operational complexity and empowers
teams to focus more on development and innovation rather than infrastructure management.

CLOUD MONITORING
Introduction

Cloud monitoring is the process of observing, reviewing, and managing the operational workflow and
performance of cloud-based services, infrastructure, and applications.

In AWS, cloud monitoring means tracking the performance, availability, and usage of your AWS resources (like
EC2, RDS, Lambda, etc.) using built-in tools and services.

Cloud monitoring in AWS involves tracking the performance, availability, and health of AWS resources using
services like Amazon CloudWatch, AWS CloudTrail, AWS Config, and AWS X-Ray. CloudWatch collects metrics,
logs, and sets alarms for resources such as EC2, RDS, and Lambda. CloudTrail records API activity for auditing
and security, while AWS Config monitors configuration changes and compliance. X-Ray helps trace and debug
distributed applications. These tools enable proactive issue detection, performance optimization, cost control,
and enhanced security. AWS cloud monitoring ensures reliable and efficient cloud operations by providing real-
time visibility and actionable insights into your infrastructure and applications.

Why Do we need Cloud Monitoring?


We need cloud monitoring in AWS to ensure that cloud resources and applications run smoothly, securely, and
efficiently. It helps detect problems early, such as high CPU usage or application errors, so they can be fixed
before affecting users. Monitoring also helps track performance trends, optimize resource usage, and reduce
unnecessary costs. It plays a key role in maintaining security by logging user activity and identifying unusual
behavior.

Benefits of using Cloud Monitoring System:

1. Cloud monitoring tools help identify potential problems—like latency, errors, or downtime— before they
impact users or critical services.

2. By tracking metrics and logs, you can optimize application performance, ensure high availability, and quickly
resolve performance bottlenecks.

3. Monitoring scales alongside your cloud infrastructure, helping you manage everything from small setups to
complex, multi-cloud environments without losing visibility.

4. Helps detect unusual activity, unauthorized access, or configuration drift, which is essential for maintaining
security standards and meeting compliance requirements.

5. Centralized dashboards, alerts, and automation reduce manual work, improve collaboration across teams,
and streamline DevOps and incident response workflows.

Creating a cloud monitoring dashboard with Cloud Watch:


1. In AWS console, search and go to Amazon CloudWatch.
2. One can create a dashboard and add a widget.
3. Choose a widget type (e.g., Line, Number, Stacked Area, etc.).
1.

1. Select Metrics required such as : Requests, CPU utilization.


1. Configure & add Widgets

1. Once all widgets are added, click Save dashboard.

Conclusion:

In conclusion, creating a CloudWatch dashboard for CloudFront enables you to effectively monitor your
content delivery metrics in real-time. It provides clear visibility into key performance indicators like request
count, data transfer, and error rates. By visualizing these metrics, you can quickly detect and respond to issues,
optimize content delivery, and ensure a smooth user experience. This kind of proactive monitoring is essential
for maintaining high availability, performance, and reliability in your AWS environment.

Department of Computer Science and Engineering 1

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy