Please read the attached ‘AWS Cloud Migration Project’ word document for details on things required.? ‘Project_AWS_PoC_Cloud_Mig
Please read the attached "AWS Cloud Migration Project" word document for details on things required.
"Project_AWS_PoC_Cloud_Migration" word document includes steps, labs and required executive summary.
Project: Build Proof of Concept for BallotOnline Cloud Migration
In previous projects, you have investigated and reported on several aspects of cloud technology crucial to BallotOnline's cloud migration. To make a final determination, you have been asked to build a proof of concept for migrating the company’s website to Amazon Web Services' (AWS) cloud.
You will conduct the proof of concept in several steps.
1. You will build an AWS migration environment and configure web services needed.
2. You will test the migration environment.
3. You will prepare a cloud monitoring dashboard.
4. You will cause site outages and investigate the results on the monitoring dashboard.
In each of these steps, you will prepare lab reports documenting your efforts with the report templates provided.
Finally, you will prepare and submit the final Proof of Concept report.
STEP 1: Build an AWS Migration Environment and Configure the Web Services
The BallotOnline management has asked you to build out an environment as a proof of concept on Amazon Web Services (AWS) to migrate the BallotOnline web service. This environment will consist of virtual servers or virtual machines made up of two instances of EC2 that will both be used to serve out the BallotOnline website.
You will use AWS Elastic Load Balancer to split the traffic going to this site (so each of the EC2 instance will serve half of the Internet traffic) and you will also use AWS Auto Scaling to ensure that the servers can scale to support the demand. (In our specific instance, we want to make sure if one of the servers is down, a new instance will automatically be spun up.)
After the basic infrastructure is provisioned, then you will configure the web servers to be able to provide web services.
Lab 1: Build AWS Migration Environment Lab
Overview
In this lab, you will set up the core infrastructure. This includes your virtual machines (or instances)
in AWS Elastic Compute Cloud (EC2), Auto-Scaling group, and Elastic Load Balancer.
Log In to the AWS Console
• Log in to your AWS Academy Classroom.
• Click on the AWS Console button.
Launch an Instance
1. In the AWS services search box, type the following and hit Return or Enter on the keyboard to
access the Amazon Elastic Compute Cloud (Amazon EC2) web service. Alternatively, you can also access ec2 by clicking on the Services link (on the upper left corner of the screen) and selecting EC2 from the list of services.
2. On the Resources screen, under Launch Instance, click Launch instance.
Used with permission from Amazon Web Services.
Alt text= Screenshot of the launch instance.
3. Choose an Amazon Machine Image (AMI). You should select the Amazon Linux AMI,
located at the top of the screen.
Used with permission from Amazon Web Services.
Alt text= Screenshot of the AMI.
4. Choose an Instance Type. Be sure that you are selecting the t2.micro, which is free-tier
eligible.
Configure Instance Details
5. Click on the Next: Configure Instance Details button.
6. On the Configure Instance Details screen, change the following values from their defaults:
Number of instances: 2
Note that on this screen and subsequent screens, you have the option to move the cursor
over the “letter i” circles for more information on each field.
Configure Launch Configuration and AutoScaling
7. Click on the Launch into Auto Scaling Group button, and then click Use a Launch
Configuration link in the pop-up window that appears. Click Continue.
8. On the Create Launch Configuration screen, enter the following information:
Name: LAB 625 Lab
9. If the Create Launch Configuration screen does not pre-populate the AMI and instance type
you’ve chosen, you will need to click in the AMI box and search by AMI id of the AWS Linux
AMI for that AMI, and manually choose the t2.micro instance
type.
Make sure you check “Enable EC2 instance detailed monitoring within CloudWatch” in the
Monitoring section, and select “Create a new security group” in Security Group section (note
the security group name), as well as your existing key pair in Key Pairs (login) section.
10. If you don’t have an existing keypair, in the Select an Existing Key Pair or Create a New
Key Pair box, select "Create a new key pair." For the key pair name, enter:
Lab625-key
Click the Download Key Pair button.
Save this private key file in a secure and accessible location on your computer. You will not
be able to download it again from Amazon. You will need this key for future lab activities in
LAB 625. Do not share this key file with anyone else since it will permit that person to
manage your Amazon instances.
Save the key as the following file name on your computer:
Lab625-key.pem
11. Accept all other defaults, check the acknowledgement at the bottom, and click Create
Launch Configuration
12. You will be kicked out to your Launch Configuration console, in which you can select your
launch configuration and click on Create Auto Scaling Group in Actions drop-down.
13. In the new Auto Scaling Group wizard, first give your group a name, like LAB625-ASG. on
the Network screen, pick the us-east-1a default subnet. On the Load Balancing – optional
screen, click No Load Balancer at this time (you will create it afterwards), and check “Enable
group metrics collection within CloudWatch” in the Additional settings – optional – Monitoring
section at the bottom. On the next screen – Group Size – set the Desired capacity to 2,
Minimum to 1, and Maximum to 2. On the following screens accept all other defaults, and on
the Review screen click on Create Auto Scaling Group. Wait till your instances are up and
running as seen in Instances screen of EC2 service.
14. Click on the Instances link on the left side of the screen.
Create Load Balancer
15. Now you can create your load balancer. If you are not already there, log into the AWS
console, and click on EC2.
16. Click on Load Balancers under Load Balancing on the left menu.
17. Click Create Load Balancer.
18. Under Classic Load Balancer at the bottom of Select load balancer type screen, click
Create.
19. On the screen labeled Step 1: Define Load Balancer Screen, enter the following:
Load Balancer name: LAB625-LB
Leave all of the other settings as defaults (indicated below):
Create LB inside: DEFAULT SETTING
Create an internal load balancer: Unchecked
Enable advanced VPC configuration: Unchecked
Load balancer protocol: HTTP
Load balancer port: 80
Instance Protocol: HTTP
Instance port: 80
20. Click Next: Assign Security Groups.
21. On the screen labeled Step 2: Assign Security Groups, select the security group created for
your launch configuration in Step 9, and unselect any others.
22. Click Next: Configure Security Settings on the screen labeled Step 3: Configure Security
Settings.
*Ignore the security warning. We are not using SSL in this course.
30. Click Next: Configure Health Check.
31. On the screen labeled Step 4: Configure Health Check, enter the following:
Ping Protocol: HTTP
Ping Port: 80
Ping Path: /index.html
Response Timeout: 5 seconds
Interval: 30 seconds
Unhealthy threshold: 2
Healthy threshold: 10
32. Click Next: Add EC2 Instances.
33. In the Add EC2 Instances screen, don’t add any instances at this time. They will be added
from your auto scaling group in the link step 39.
34. Click Next: Add Tags.
Tagging helps you to manage your instances, images, and other resources in Amazon EC2.
To learn more about tagging, you can explore the Tagging Your Amazon EC2 Resources
page.
35. On the screen labeled Step 6: Add Tags, enter the following:
Key: Name
Value: Webserver
36. Click Review and Create.
37. On the Step 7: Review screen: Click Create.
38. On the Load Balancer Creation Status screen, click Close.
39. You will now link your load balancer to your auto scaling group. Go to the Auto Scaling
Groups console, select your group, and in the Details tab, scroll down to the Load balancing
section, click on Edit and select your Classic load balancer LAB625-LB. Click Update.
40. Go back to the Load Balancer console and look for the DNS name for your new load
balancer.
EXAMPLE: LAB625-LB-1234567890.us-east-1.elb.amazonaws.com
Configure Security
41. To add a security rule to allow an HTTP connection to our instances, start by going to the
Security Groups menu in the AWS console, and click on it.
42. Under Security Groups, select the security group associated with the Launch Configuration
of your Auto Scaling Group, and in the Actions menu click on Edit inbound rules.
43. Add a new rule for HTTP with the following settings:
Type: HTTP
Protocol: TCP
Port Range: 80
Source: Anywhere
Add a new rule for SSH with the following settings:
Type: SSH
Protocol: TCP
Port Range: 22
Source: Anywhere
1. Click Save Rules.
44. Go to the Instances menu, in the AWS console, and click on Instances.
45. Under Instances, locate the Public IP Address for your instances.
EXAMPLE: 64.23.23.43
STEP 2: Test Web Services Migration
In the previous step, you built out infrastructure on AWS as a proof of concept to support BallotOnline's website.
Now, you will configure the EC2 instances with NGIX, a widely used web service and test the migration of the BallotOnline web site to these EC2 instances.
BallotOnline is concerned about performing an actual migration, so you will instead deploy the company's website code to the web servers that you configured in the previous step. The current webmaster of the BallotOnline website has provided you with the files to migrate to AWS.
Lab 2: Web Services Test Migration Lab
Overview
In this lab, you will configure the new BallotOnline web servers and migrate the BallotOnline website. You will build out new web services on each of your AWS EC2 instances and migrate the BallotOnline website to them.
After you complete this lab, you will have two web server instances behind a load balancer with auto-scaling enabled. This permits the website to remain available even if one of your instances is down for maintenance.
Connect to Your Instances
1. Log in to your AWS Academy.
2. Go to your LAB 625 classroom.
3. Click on the AWS Console button and go to EC2 (Amazon Elastic Compute Cloud).
4. Click on the Instances link on the left side of the screen.
5. Click the checkbox to the left of your first instance and then click the Connect button above your instance list.
6. You will see a screen that enables you to connect to your instance either using a Java SSH client or a standalone SSH client. For this step, you will follow the instructions provided by Amazon for your specific instance. If you are on a pre-Windows 10 computer, you will use PuTTY. If you are on a Windows 10, Mac or Linux computer, you will use the built-in SSH command.
Below are the specific instructions to use PuTTY to connect to your EC2 instance from a pre-Windows 10 system.
Download PuTTY (pre-Windows 10) or Use SSH (Windows 10/Linux/Mac OS)
7. Here, your instructions will vary depending on your operating system. If you are using Windows, follow the steps for installing PuTTY. If you are using Mac or Linux, follow the instructions for using SSH on Mac or Linux. Click the left side of the panel for Windows PuTTY instructions or Mac or Linux SSH instructions. If you are using Windows prior to Version 10, follow the steps for installing PuTTY. If you are using Windows 10, Mac, or Linux, follow the instructions for using SSH on Windows 10, Mac or Linux.
Installing Security Updates
8. If you get prompted to install security updates, do so by typing:
sudo yum update
The instructions are for updating the yum installer. The sudo command is used to perform the update as a superuser.
Whenever you are entering commands, pay close attention to the spelling and spacing. If you get error messages, it’s probably because the command is not typed correctly.
Notice that there are spaces between commands. We typed sudo [space] yum [space] update.
9. You will get a confirmation prompt. Type the following:
y
and press Enter.
When the installation is complete, you will see "Complete!” on the screen as shown below.
A screenshot of ec2 shell showing "Complete!"
Once the yum installer is updated, you will install nginx, which is a web server software for Linux.
Install nginx
10. Install the nginx web server on the instance. To do this, type the following in the command line:
sudo amazon-linux-extras install nginx1
Then, press Enter or Return.
11. You will be prompted with: Is this ok [y/d/N]:
Again, enter the following in the command line:
y
Then, press Enter or Return.
Upon successful completion of the installation, you will again see “Complete!” on the screen. If you did not get this, double check your commands to make sure you have typed them in correctly.
12. Create a directory for the BallotOnline website data:
sudo mkdir –p /data/www
Press Enter or Return.
13. Copy the BallotOnline website from the legacy BallotOnline website URL. First, you will switch to the directory that you just created:
cd /data/www
14. Next, you will download the website files from the legacy web server. The files have been compressed into website.zip and the URL is www.ballotonline.biz/website.zip.
Enter the following in the command line and then press Enter or Return.
sudo wget www.ballotonline.biz/website.zip
15. Now, you will unzip the file into the /data/www/BallotOnline directory.
Enter the following in the command line and then press Enter or Return.
sudo unzip website.zip -d /data/www/BallotOnline
16. Check to make sure that the website files were downloaded to the /data/www/BallotOnline directory by entering the following in the command line and then pressing Enter or Return.
cat /data/www/BallotOnline/index.html
You now should see html code similar to the screen below, starting with <!DOCTYPE html>
A screenshot of the content of the index.html file.
Update Website Permissions
17. Change the permissions on the website files to make them less restrictive by entering the following in the command line and then pressing Enter or Return.
sudo chmod -R 755 /data/www/BallotOnline
Replace the default nginx configuration file (located in /etc/nginx/nginx.conf) with the one that is provided within the zip file that you have downloaded and unzipped.
Enter the following in the command line and then press Enter or Return.
sudo mv /etc/nginx/nginx.conf /etc/nginx/nginx.conf.old
You can confirm that the nginx.conf is no longer there by typing this command and then pressing Enter or Return.
cat /etc/nginx/nginx.conf
Note: You should receive an error "No such file or directory"
18. For the next line, you will copy the nginx.conf that we have downloaded as part of the website.zip file to the correct location.
Enter the following in the command line and then press Enter or Return.
sudo cp /data/www/BallotOnline/nginx.conf /etc/nginx/
You should now have a file named nginx.conf in the /etc/nginx directory.
To double-check, type the following in the command line and then press Enter or Return.
cat /etc/nginx/nginx.conf
You should see the content of nginx.conf from the /etc/nginx directory.
19. Start nginx by entering the following in the command line and then press Enter or Return.
sudo nginx
Note: If you already started nginx for some reason, then you must reload the configuration with: sudo nginx –s reload.
Test the Web Server
20. Go to the Public IP Address for Instance 1 that is in your lab report via a web browser to see if you can access the index.html file:
http://NN.NN.NN.NN/index.html
21.After you've made sure your instance is configured correctly and serves the BallotOnline web page, you will create the AMI (Amazon Machine Image) from the instance.
In the Instances list of the EC2 service dashboard, select your instance, and then click on Actions – Images and Templates – Create Image.
In the Create Image screen, put in a name of LAB 625 P3 Web Server Image, and click Create Image at the bottom. Your image will be created. You can verify it by clicking on AMI under Images on the left in the dashboard.
22. In AWS Academy student accounts, instances are stopped when your session ends. If an instance belongs to an auto-scaling group, the auto-scaling service will mark the stopped instance as Unhealthy, remove it from the group, terminate it, and provision a new instance in its place (in our case, using the Launch Configuration created in Project 3 Step 1 with plain Linux image, without nginx and the BallotOnline website installed).
To remedy this, you will create a new Launch Configuration specifying the AMI created above and starting nginx upon initial instance launch. You will then update your auto-scaling group so that it uses the new launch configuration
In the EC2 dashboard, under Auto Scaling, click on Launch Configurations, and then on Create Launch Configuration. Give it a name like LAB 625 Lab New, and for Amazon Machine Image drop down the list and select your newly created LAB 625 P3 Web Server Image. You should find it among Owned By Me images.
For Instance Type, select t2.micro, as before. Under Additional Configuration – Optional, check the box to enable Enable EC2 instance detailed monitoring with CloudWatch. Then, in the drop down Advanced details, and under User Data, click on As Text and enter the following two lines in the box:
screenshot of text entered into the User Data box (with the "As text" option selected) that reads #!/bin/bash on the first line and nginx on the second line
Source: Amazon
This will ensure nginx is started up at each instance launch. User Data commands are run as a super user, so no need for sudo. See User Data for more information.
Scroll down to Security Groups, click on Select an Existing Security Group, and choose the auto-scaling security group you created in Project 3 Step 1, with SSH and HTTP inbound rules.
For key pair, select again your key pair you created in Step 1 of Project 3, making sure you have the private key file (.pem) handy. Double check everything. Check the Acknowledgement at the bottom, and then click on Create Launch Configuration. Verify that it shows in the Launch Configurations list under Auto Scaling.
Step 3: Prepare a Test-Environment Monitoring Dashboard
In this step, you will learn how AWS CloudWatch can be used to monitor system performance. You will create a CloudWatch dashboard in this step to monitor the resources in your test environment.
In addition to system performance, cloud users can also monitor their billing charges being accrued as cloud resources are provisioned and used. AWS provides a special set of metrics for monitoring billing charges, which can be used to set up a billing dashboard. You will not work with billing dashboards in this course, but it is worthwhile to know what they are and how to use them.
Lab 3: Prepare Measurements and Dashboard
Set Up Amazon CloudWatch Service Dashboard for BallotOnline
Now you will configure the CloudWatch Service dashboard for BallotOnline.
5. If you are not already logged in, sign in to the AWS CloudWatch Console again.
6. Click the Dashboards menu on the left.
7. Click on the BallotOnline-Dashboard link.
8. Click on Add widget.
9. On the Add to this dashboard screen, select Number and then click Configure.
10. At the top of the screen, select 1d.
11. At the top left of the screen, click on the pencil icon next to Untitled graph and type the
following:
BallotOnline Load Balancer Stats
Click the checkmark icon to save the change.
12. On the Add metric graph screen, you will be adding several metrics. The first metric that
you will add is for the Elastic Load Balancer.
13. Click on the ELB link.
14. Scroll down and click on Per-LB Metrics.
You will need to select the checkbox for the following metrics (skip the metric if you do not
see it in the Per-LB metrics list):
Metric Purpose
☑"#$ HealthyHostCount Displays the number of healthy EC2 instances in the load
balancer pool
☑"#$
EstimatedALBActiveConnectionCount
Displays the number of active connections to the load
balancer
☑"#$ UnHealthyHostCount Displays the number of unhealthy EC2 instances in the load
balancer pool
☑"#$ HTTPCode_ELB_5XX Displays the number of HTTP 5xx codes returned by the
load balance
☑"#$ HTTPCode_Backend_4XX Displays the number of HTTP 4xx codes returned by the
load balancer
15. Click Create Widget.
16. Click on the BallotOnline-Dashboard link.
17. Click on Add Widget.
18. On the Add to this dashboard screen, select Line and then click Configure.
At the top of the screen, select 1d.
19. At the top left of the screen, click on the pencil icon next to Untitled graph and type the
following:
BallotOnline Load Balancer Graph
Click the checkmark icon to save the change.
20. On the Add metric graph screen, you will be adding several metrics. The next metric that
you will add is for the Elastic Load Balancer.
21. Click on the ELB link.
22. Scroll down and click on Per-LB Metrics.
You will need to select the checkbox for the following metrics (skip the metric if you do not
see it in the Per-LB metrics list):
Metric Purpose
☑"#$ HealthyHostCount Displays the number of healthy EC2 instances in the load
balancer pool
☑"#$
EstimatedALBActiveConnectionCount
Displays the number of active connections to the load
balancer
☑"#$ UnHealthyHostCount Displays the number of unhealthy EC2 instances in the load
balancer pool
☑"#$ HTTPCode_ELB_5XX Displays the number of HTTP 5xx codes returned by the
load balancer
☑"#$ HTTPCode_Backend_4XX Displays the number of HTTP 4xx codes returned by the
load balancer
23. Click Create Widget.
24. On the Dashboard screen, select the bottom right corner of that graph that you just created
and drag to enlarge until the graph is the same size as the stats window above.
25. Click Add Widget.
26. On the Add to this dashboard screen, select Number, and then click Configure.
27. At the top of the screen, select 1d.
28. At the top left of the screen, click on the pencil icon next to Untitled graph and type the
following:
BallotOnline Auto-Scaling Group Metrics
Click the checkmark icon to save the change.
29. On the Add metric graph screen, you will be adding several metrics. The next metric that
you will add is for the Auto Scaling Group.
30. Click on the EC2 link.
31. Click on By Auto Scaling Group.
You will need to select the checkbox for the following metrics:
Metric Purpose
☑"#$ NetworkOut Displays the outbound network traffic
☑"#$ NetworkIn Displays the inbound network traffic
☑"#$ CPUUtilization Displays the CPU utilization for the entire auto-scaling group
Click Create Widget.
32. Click on BallotOnline-Dashboard.
33. Click Save Dashboard.
34. Click 1d on the upper right. This is to select that you want to see one-day worth of
monitoring.
35. Select at least three other metrics to add to your dashboard and follow the same basic
instructions as above to add them. You may add metrics and display them as line, stacked,
or number graphs. You may add the same metrics as in the steps above, but you need to
display them using a different graph type (i.e., if they are a number graph, then you need to
display as either line or stacked).
Step 4: Cause Site Outages and Report Results
Part of the development process includes anticipating possible problems that may come up, testing them, and capturing the results in the monitoring dashboard. In order to do that, you will perform another lab.
Lab 4 Cause Site Outages and Report Results
You are required to submit a lab report to the assignment dropbox in Project 3, Step 4. Throughout
the steps below within this lab, you will see indicators labeled with LAB REPORT. At those points,
you should incorporate an item from that step into your report.
Examples include screenshots of your progress, URLs for running AWS instances, and summaries
of your progress.
Write a paragraph in your lab report summarizing what you expect to get out of this lab assignment,
how you expect it to help you in the Cloud Computing program at UNIVERSITY, and whether you foresee
complications in completing the labs.
1. In a web browser, log in to your AWS Academy LAB 625 classroom, click on the "AWS
Console" button, and select the CloudWatch service.
If your AWS resources do not appear, check to see if the correct region is selected. If not,
use the navigation bar to change the region to the region where your AWS resources are
located.
2. Click the Dashboards menu on the left.
3. Click on the BallotOnline-Dashboard link, and you should see a screen like the one below.
Used with permission from Amazon Web Services.
LAB REPORT
Take a screenshot of your CloudWatch dashboard before proceeding and insert it into your
lab report. You should also write a paragraph explaining how you expect your CloudWatch
dashboard to be affected by the activities in this lab.
4. Go to the BallotOnline New Web Service URL from your Project 2 Lab Report.
Example:
http://LAB625-LB-1234567890.us-east-1.elb.amazonaws.com
5. Now, to generate traffic and errors, you are going to append a nonexistent web page to the
end of the BallotOnline New Web Service URL from the previous step.
Example:
http://LAB625-LB-1234567890.us-east-1.elb.amazonaws.com/this-page-does-not-exist.html
LAB REPORT
Take a screenshot of the results that you receive in your browser and insert it into your lab
report.
6. Monitor your CloudWatch Dashboard while you refresh your browser window for the above
nonexistent webpage 20 times.
7.
Collepals.com Plagiarism Free Papers
Are you looking for custom essay writing service or even dissertation writing services? Just request for our write my paper service, and we'll match you with the best essay writer in your subject! With an exceptional team of professional academic experts in a wide range of subjects, we can guarantee you an unrivaled quality of custom-written papers.
Get ZERO PLAGIARISM, HUMAN WRITTEN ESSAYS
Why Hire Collepals.com writers to do your paper?
Quality- We are experienced and have access to ample research materials.
We write plagiarism Free Content
Confidential- We never share or sell your personal information to third parties.
Support-Chat with us today! We are always waiting to answer all your questions.