0% found this document useful (0 votes)
16 views21 pages

Interactive Session 9-Cloudcomputing

The document outlines an interaction session on Cloud Computing conducted by Mainak Chakraborty at IIT Delhi, covering topics such as virtualization, VM migration, and Docker. Key points include the differences between VMs and containers, advantages of Docker, and hands-on activities related to Docker and AWS services. The session also emphasizes the importance of resource management and provides links for further reading and practical exercises.

Uploaded by

Ronak Bhawnani
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)
16 views21 pages

Interactive Session 9-Cloudcomputing

The document outlines an interaction session on Cloud Computing conducted by Mainak Chakraborty at IIT Delhi, covering topics such as virtualization, VM migration, and Docker. Key points include the differences between VMs and containers, advantages of Docker, and hands-on activities related to Docker and AWS services. The session also emphasizes the importance of resource management and provides links for further reading and practical exercises.

Uploaded by

Ronak Bhawnani
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/ 21

Interaction Session 9

on
Cloud Computing
noc25-cs11
by
Mainak Chakraborty

28th March 2025


Indian Institute of Technology, Delhi
1
TOPICS TO BE COVERED

1. VM & Docker
2. Hands-on Session : ECS
Points to Remember:
• Total 5 more Discussion sessions to be taught
lectures and Tutorials
• Any specific problem, please upload in the
discussion forum, I will try to reply within 24
hours
• PPT and Video will be shared with everyone
• Assignments will not be solved but similar
problems will be solved.
Virtualization
•Definition: Virtualization is the creation of virtual
resources such as servers, storage devices, and
network resources.
•Goal: Optimize resource usage, improve scalability,
and isolate environments.
•Types: Hardware Virtualization, OS Virtualization,
Network Virtualization, Storage Virtualization.

•Types of Virtualization
•Hardware Virtualization: Creates virtual machines
(VMs) with isolated operating systems on physical
hardware.
•OS Virtualization (Containers): Shares host OS kernel,
lightweight, faster startup compared to VMs.
+++

LINK : https://www.cloud4u.com/blog/virtualization/
VM vs. Container

• Containers run on
• Virtual Machines
a shared OS kernel
simulate entire
• lighter weight
hardware stack (CPU,
compared to VMs.
RAM, storage).
• Hypervisor manages
VMs (e.g., VMware,
Hyper-V, KVM).

LINK : https://www.netapp.com/blog/containers-vs-vms/
What is/are the reason(s) to opt for VM migration in the cloud
computing paradigm?
• To remove a physical machine from service: VMs may be migrated to shut down or maintain a physical server
(e.g., for repairs, upgrades, or decommissioning).

• To save power consumption: In energy-aware systems, VMs are moved to consolidate workloads onto fewer
machines, allowing others to be powered down.

• To relieve the load on the congested hosts: One of the most common reasons — migrate VMs from
overloaded hosts to underutilized ones to improve performance.

•Pre-copy and Post-copy are two strategies used in live VM migration:


•Pre-copy: Memory pages are copied to the destination while the VM is still running, and any changed
pages are copied again.
•Post-copy: The VM is suspended, moved, and resumed at the destination, while remaining memory pages
are fetched as needed.
•These approaches reduce downtime and maintain service continuity, which are key goals of live
migration.
What is/are the key advantage(s) of Docker?

•. It facilitates microservice architecture


Docker is ideal for microservices because each service can run in its own container, making it easy to deploy,
scale, and manage.

• It can be used to package software


One of Docker’s main uses is to package software along with all its dependencies into a container, ensuring it
works the same in any environment.

•It can be used to model networks


Docker supports virtual networking between containers. You can create custom networks, simulate network
topologies, and isolate traffic — useful in testing and development.
Questions
•VM memory size = 512 GB
Transmission rate = 8 MB/sec
•What are the total migration time and downtime for live VM migration?
•Options:
a. 20 hours, 20 hours, b. 18 hours, 0 hours, c . 16 hours, 16 hours, d. 12 hours, 12 hours

• Convert GB to MB 512 GB = 512 × 1024 = 524,288 MB


• : Calculate total migration time Time = 524,288 ÷ 8 = 65,536 seconds
•Convert to hours: 65,536 ÷ 3600 ≈ 18.2 hours
•So, both migration time and downtime are about 18 hours.

LINK : https://www.cloud4u.com/blog/virtualization/
Docker

•In Docker:
•Configuration effort involves setting up the environment — like writing a Dockerfile, specifying dependencies,
OS, and app code.
•Resource management (CPU, memory, storage, etc.) is handled separately by the Docker Engine or orchestrators
like Docker Compose, Kubernetes, or Swarm.

LINK : https://www.cloud4u.com/blog/virtualization/
VM vs. Container

LINK : https://www.netapp.com/blog/containers-vs-vms/
What is Docker ?- Platform as a Service (PaaS)
•Docker is an open-source containerization platform.
•Allows packaging, shipping, and running applications
in isolated containers.
•Components:
•Docker Engine (runtime)
•Docker Images (blueprints for containers)
•Docker Containers (running instances of images)

Docker Components
• Docker file: Script used to build Docker images
automatically.
• Docker Image: Read-only template containing
the application, libraries, and dependencies.
• Docker Container: Lightweight, executable
instance created from Docker Image.
• Docker Engine: Runs and manages Docker
containers.

LINK : https://www.geeksforgeeks.org/docker-instruction-commands/
• Docker is the
foundational
containerization
technology that lets you
build and run
containers.
• Docker Hub is a registry
where you can store,
share, and retrieve
Docker images.
• Docker Compose is a
tool for configuring,
running, and managing
multiple containers
together in an
application.
• What’s the Difference Between Docker
Images and Containers?

• Docker is a containerization platform that


you can use to package software in
containers and run them on target
machines.
• Docker containers run on any machine or
virtual machine where the Docker engine is
installed. And they run without knowledge
of the underlying system architecture. The
Docker engine only runs on the Linux
operating system. A Docker container is a
container made using the Docker
containerization platform; there are also
other less popular containerization
platforms.
• containers do run as isolated processes in
user space on a shared operating system
kernel. Containers share the host operating
system kernel with other containers.
Hands-on Docker
•Install Docker Desktop- from website
•docker –v
•docker run -it ubuntu
•Whoami
•https://hub.docker.com/
•https://docs.docker.com/reference/cli/docker/https:/
/docs.docker.com/reference/cli/docker/

LINK : https://aws.amazon.com/compliance/shared-responsibility-model/
•A Dockerfile is a text-based document that's
used to create a container image. It provides
instructions to the image builder on the
commands to run, files to copy, startup command,
Docker File
and more.

•FROM <image> - this specifies the base image


that the build will extend.
•WORKDIR <path> - this instruction specifies
the "working directory" or the path in the image
where files will be copied and commands will be
executed.
•COPY <host-path> <image-path> - this
instruction tells the builder to copy files from the
host and put them into the container image.
•RUN <command> - this instruction tells the
builder to run the specified command.
•ENV <name> <value> - this instruction sets an
environment variable that a running container
will use.
•EXPOSE <port-number> - this instruction sets
configuration on the image that indicates a port
the image would like to expose.
•USER <user-or-uid> - this instruction sets the
default user for all subsequent instructions.
•CMD ["<command>", "<arg1>"] - this
instruction sets the default command a container
using this image will run.
LINK :
Let's Create a Flask App
•Docker init
•app.py, 8080
•Docker build first-time .
•Docker run –d –p 8080:8080 first-time
•Check docker desktop

LINK :
Hands-on Session Checklist
• AWS Free-tier Account
Step 1

• IAM User
Step 2 • MFA

• Budget – zero spend


Step 3

• ECR, ECS, Fargate- introduction


Step 4
AWS ECR

https://aws.amazon.com/ecr/
AWS ECS

https://aws.amazon.com/ecs/
How does it work ?

https://docs.aws.amazon.com/AmazonECS/late
st/developerguide/Welcome.html
AWS Fargate

https://aws.amazon.com/fargate/

You might also like