2022mt13057 EdgeComputing Assignment2 AWS Docker

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 14

Edge Computing Assignment 2

Submitted by: Likhit Gatagat


2022MT13057
Bits, Pilani, WILP
Email:
BITS 2022MT13057@wilp.bits-pilani.ac.in
SSZG586 – Edge Computing Assignment
Pilani
May 6, 2024 1
Edge Computing Practical Session
Problem Statement: Create a VM using AWS and install docker image (ubuntu) and capture
your work in the screenshot format and upload it in Assignment 2

Topics to be covered:

 Cloud

 VM Creation

 Docker
Create and Start an AWS EC2 Instance

Created a standard free tier ubuntu image instance


Generate the PEM and PPK file

Created a key pair while creating an EC2 instance and downloaded the .pem file
Connect to EC2 Instance using PuTTY

Using putty entered the ipv4 address of the EC instance and provided the private key file for the credential
authentication. User entered as ubuntu which is the default username.
Update the packages

Updating the system packages before installing Docker: command: sudo apt-get update
Instal Docker

Installing Docker: command: sudo apt-get install docker.io Checking Docker Version: command: docker –version
Pull the Docker Ubuntu Image

We pulled the ubuntu image from the


docker hub, central repository of
docker without mentioning the
version, so it fetched the latest
available image of ubuntu.
Run the Ubuntu Docker Image

command: sudo docker run -it -d ubuntu


-it: interactive -d: in the background
Check Ubuntu container

To list all the running containers, execute:


command used: sudo docker ps
Start the Ubuntu container

To start the containers, execute:


command used : sudo docker exec -it
<container_id> bash
Perform action on the instance

Once connected to container we can perform all the operations


seamlessly as we execute it on standalone ubuntu machine. Here we tried
creating a directory named “likhit_2022mt13057_edge_demo”
Remove Docker

Now that we are done with the practical assignment, let’s release the resources for saving the cost.
To remove we need to first exit the container -> stop the docker container -> then remove container
 Stop the docker: command used: sudo docker stop container_id
 Remove docker: command used: sudo docker rm container_id
Terminate the EC2 Instance

Since our practical session is completed and the given problem statement is executed, we terminated
the AWS EC2 instance so that billing is stopped.

You might also like