Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PGP in Cloud Computing Try it out! V 1 . 5 Great Learning. All rights reserved. 1 Try it out objective Use this hands -

PGP in Cloud Computing Try it out! V1.5 Great Learning. All rights reserved. 1 Try it out objective Use this hands-on to learn how to deploy an containerized application using Docker The goal Following are the goals of this hands-on: 1. Working knowledge of EC2 instances with Ubuntu 3. Deploying an EC2 instance 4. Understanding the docker ecosystem A. Hands-on: Launch an instance 1. Open the EC2 management console at https://console.aws.amazon.com/ec2/(you will be required to sign in)2. Change the region to N Virginia (if it is not already selected).3. From the EC2 management console, click on Launch Instance. 4. In Name and Tags field, type out any name of your instance 5. Then choose an Amazon Machine Image (AMI) page that displays a list of basic configurations. Click on Ubuntu and select Ubuntu Server 22.04 LTS. The next step is very important. Any instance other than the one mentioned below will cause an error at the time of running the container. 6. On the Choose an Instance Type page, select the t2.medium instance type. 7. Under Key pair (login), click on create a new key pair 8. Enter the key pair name of your choice, and then click on Create key pair. 9. Under Network settings, click on Edit. 10. Port 22 for SSH should already be present in the security group. Click on Add security group rule and create the rule with the following parameters a. Type : HTTP PGP in Cloud Computing Try it out! V1.5 Great Learning. All rights reserved. 2 b. Port Range : 80 c. Source Type : Anywhere 11. At last, click on Launch instance. B. Hands-on: Installation of docker 1. Select your running instance by clicking on the checkbox present on the left side. 2. Click on Connect button. 3. Click on the Connect button again present at the bottom of the page. NOTE: You must be under EC2 Instance Connect4. This will land you to the EC2 Instance Connect browser terminal. 5. Execute the below commands one by one in the terminal window. NOTE: You are already in your EC2 server, you need not SSH again. wget https://d6opu47qoi4ee.cloudfront.net/dockerinstallscript.sh bash dockerinstallscript.sh exit NOTE: Ensure you restart the shell (Refresh the page).3. Now , type the below command (notice there is no sudo) docker version NOTE: The above command should show the client and server versions and other details. The installation is now successful. C. Hands-on: Deploying the application 1. Type the below commands in the terminal window one at a time. PGP in Cloud Computing Try it out! V1.5 Great Learning. All rights reserved. 3 sudo apt update sudo apt install unzip sudo chown ubuntu:ubuntu -R /opt cd /opt wget https://d6opu47qoi4ee.cloudfront.net/reactle.zip unzip reactle.zip docker build -t reactle . docker run -d -p 80:80 reactle 2. Navigate to the public IP address of the running instance on a new web browser tab to access the application. D. Hands-on: Terminating / deleting an instance 1. Go back to the browser tab EC2 management console 2. Click on Instances in the left navigation 3. Click on the checkbox to the left of your running instance (no action is necessary if the checkbox is already selected)4. Click on the Instance state dropdown towards the top right side of the screen 5. Select Terminate instance option 6. Click on the Terminate button on the confirmation popup window 7. The instance will show in Shutting down status and a few moments later will show as Terminated 8. Terminated instances do not attract any costs and will be auto removed from the instance listing in about 2 hours (or less)9. Go back to the Lab environment and reset the Lab work area using the reset button in the top right of the screen to avoid any unintended credit charges .

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

How do managers use networks?

Answered: 1 week ago

Question

What lessons in OD contracting does this case represent?

Answered: 1 week ago

Question

Does the code suggest how long data is kept and who has access?

Answered: 1 week ago