Difference between revisions of "OPS705 Lab 6"

From CDOT Wiki
Jump to: navigation, search
m
(Major revision patch for AWS Educate restrictions.)
Line 1: Line 1:
{{Admon/caution|THIS LAB IS IN PREVIEW MODE|'''This lab cannot currently be completed in AWS Academy. You may preview it until the access issues are resolved.'''}}
 
 
= LAB PREPARATION =
 
= LAB PREPARATION =
  
Line 16: Line 15:
 
# Your AWS Academy login credentials
 
# Your AWS Academy login credentials
  
= INVESTIGATION 1: Installing Wordpress =
+
= INVESTIGATION: AWS Elastic Beanstalk =
In this investigation, you'll set up a Wordpress installation using AWS Elastic Beanstalk. This service takes care of all the infrastructure setup; all you need to worry about is the code platform, the code, and the database setup.
+
In this investigation, you'll set up two AWS Elastic Beanstalk instances. This service takes care of all the infrastructure setup; all you need to worry about is the code platform and the code.
  
== Part 1: Creating a Wordpress Web App ==
+
== Part 1: Logging in to AWS Academy - Cloud Foundations ==
 
To create your web app, perform the following steps:
 
To create your web app, perform the following steps:
# Log in to AWS Academy and navigate to the AWS Management Console.
+
# Log in to AWS Academy here: https://awsacademy.instructure.com/login/canvas
# Search for ''Elastic Beanstalk'' and click.
+
# Under '''Courses'', choose ''AWS Academy Cloud Foundations''
# On the main page for Elastic Beanstalk, click on the big orange '''Create Application''' button.
 
# You are now in the ''Getting Started - Create a web app'' screen.
 
# For the application name, name it ''wordpress''.
 
# Under ''Platform'', select '''PHP'''. Leave the branch and version on their defaults.
 
# Under ''Application Code'', select '''Upload your code'''.
 
# Open a new browser tab, navigate to https://wordpress.org/download and download the latest .zip package.
 
# Back in the ''Getting Started - Create a web app'' screen, go to the ''Source code origin'' section.
 
# For the version label, use the '''current name''' of the zip file. For example: '''wordpress-5.6.2''' or '''wordpress-5.7'''
 
# Select '''Local file''.
 
# Click on ''Choose file''. A local filesystem navigation window pops up. Select the wordpress .zip file you downloaded in Step 8.
 
# At the bottom of the screen, click on the white ''Configure more options'' button.
 
# In the next screen, find the ''Software'' box and click the ''Edit'' button inside.
 
# In this new screen, scroll all the way to the top. In the ''Container Options'', in the ''Document root'' field, type: <code>/wordpress</code>
 
# Click on the ''Save'' button at the bottom of the screen to apply and to go back to the ''Configure more options'' page.
 
# Scroll down to the ''Database'' box, and click ''Edit''.
 
# In the database options page, enter your username as '''admin'''. Choose a '''complex and unique password''', and save that password in a file. It will appear in the clear occasionally, so make sure it's not reused from something else.
 
# If not already present, enter '''5''' in the ''Storage'' field.
 
# Keep all other defaults.
 
# Click ''Save'' at the bottom of the page.
 
# Back in the main page, find the ''Notifications'' box and click ''Edit'' to add your Seneca e-mail address.
 
# Back in the main page, click on the ''Create app'' button at the bottom of the page.
 
# Your new Wordpress application will now be created. This takes about 10 minutes. The log screen will update it's progress as it goes and let you know when it's complete.
 
  
== Part 2: Configuring the Wordpress Installation ==
+
== Part 2: Module 6 Activity - AWS Elastic Beanstalk ==
# Once the web app has completed start up from Part 1, click on the ''Environments'' link.
+
# Navigate to ''Modules'' in the left-hand menu bar.
# You'll have a single environment in the list, most likely named ''Wordpress-env''. Click the name.
+
# Scroll down to ''Module 6 - Compute''
# Here, you can see the basic status of the web app and associated information. You can also update the code running here if you'd like.
+
# Click on ''Activity - AWS Elastic Beanstalk''
# In the left-hand menu, click on ''Configuration''.
+
# Follow the lab instructions.
# Near the bottom of this page, you'll see a section labelled ''Database''. Next to the ''endpoint'' field, a link will be present.
+
# While you complete the lab, take the following screenshots:
# Save this link in a text document, and then open this link in a new window.
+
## First view of your pre-created sample Elastic Beanstalk environment status page.
# Welcome to the MySQL database you created with the web app. We're here to grab database connector information.
+
## The HTTP 404 Tomcat error page from clicking on the URL for the hosted resource.
# Click on the ''Configuration'' tab link.
+
## View of your environment status page with the updated code deployed.
# At the very top, look for the ''DB name'' entry. Write this down in your text file.
+
## The Congratulations web page from clicking on the URL for the hosted resource using your new code.
# Your text document should now have four pieces of information: Database Host (endpoint), Database Name, Database Username, and Database Password
+
## A listing of your EC2 instances running the above resources to show you've fully explored the lab.
# Go back to your first window,  the ''Wordpress-env'' status page. In the left-hand menu, click on the ''Go to environment'' link.
 
# This brings you to the Wordpress configuration webpage for your personal installation.
 
# Select ''English (United States)'', and then the blue ''Continue'' button.
 
# This page just reminds you to have the information from Step 10 handy. (Don't worry about ''Table prefix'', we'll be using the default.) Click ''Let's go!''.
 
# In the next page, enter the database information from your text file. Leave ''Table Prefix'' at its default.
 
# When ready, click ''Submit''.
 
# If your connector information is correct, you'll get a congratulations page. ("All right, sparky!"). Click ''Run the installation''. If you got an error page, go back and double-check your information.
 
# Now, we're in the blog settings page. Use the following settings:
 
# '''Site Title''': <code>Full Name's OPS705 Blog</code>
 
# '''Username''': <code>Seneca Username</code>
 
# '''Password''': Use the supplied password, or choose your own.
 
# '''Your Email''': <code>username@myseneca.ca</code>
 
# '''Search engine visibility''': Check the box.
 
# When ready, click the ''Install Wordpress'' button.
 
# Shortly, you'll see a ''Success!'' splash page confirming your username. Click the ''Log In'' button to login to your new blog.
 
  
= INVESTIGATION 2: Working with Wordpress =
+
== Part 3: A Note About Resource Usage ==
In this investigation, you'll interact with the Wordpress blog itself, and create a new post.
+
Module labs only need to be ended to shut down all resources. Remember, your created work is '''not''' preserved after you end the lab!
 
 
== Part 1: Writing a Blog Entry ==
 
# Look around at the Dashboard and familiarize yourself with the available settings.
 
# Create a blog post with the title <code>Post 1: Installing Wordpress Using AWS Elastic Beanstalk</code>.
 
# In the post itself, using your own words, describe your opinion of the installation process and how it compares to other work you've done in this course (or outside this course). Write approximately 500 words. Grammar and spelling are unimportant, as long as I can understand what you're getting at.
 
 
 
== Part 2: Research Blog Entry ==
 
# Create a second post describing, in your own words, the differences between the AWS Elastic Beanstalk web application you've installed, and a traditional ''LAMP'' stack. Compare and contrast the two. This will require a little research on your part, but will increase your understanding of PaaS overall. Bonus marks will be given for exceptionally good explanations at my discretion (everyone loves a good visual diagram!).
 
  
== Part 3: A Note About Resource Usage ==
+
== Part 4: Exploration ==
Web apps are a bit different when it comes to resource usage. They're essentially always on, and meant to be that way. This is where auto-scaling becomes important, but that's out of scope for this lab. For now, leaving your new blog running is expected.
+
A second AWS Academy classroom is available to you, '''AWS Academy Learner Lab - Foundation Services''. Here, you can explore the Elastic Beanstalk service (along with many others), create instances that will remain for the duration of the class, and try things out. I highly encourage you to take a look and play around! Read through the sidebar readme doc for service restrictions.
  
 
= Lab Submission =
 
= Lab Submission =
 
Submit to Blackboard's ''Lab Submission'' section '''full-desktop screenshots''' (PNG/JPG) of the following:
 
Submit to Blackboard's ''Lab Submission'' section '''full-desktop screenshots''' (PNG/JPG) of the following:
# The Elastic Beanstalk Environment status page for ''Wordpress-env''.
+
# First view of your pre-created sample Elastic Beanstalk environment status page.
# The Wordpress Dashboard.
+
# The HTTP 404 Tomcat error page from clicking on the URL for the hosted resource.
# Your first blog post.
+
# View of your environment status page with the updated code deployed.
# Your second blog post.
+
# The Congratulations web page from clicking on the URL for the hosted resource using your new code.
 
+
# A listing of your EC2 instances running the above resources to show you've fully explored the lab.
'''In the ''Comments'' text box for your submission on Blackboard, include the URL to each of your blog posts.'''
 
 
 
Your professor will review your blog directly; the screenshots are a backup in case of catastrophic issues.
 
  
 
Labs aren't marked until screenshots have been submitted.
 
Labs aren't marked until screenshots have been submitted.

Revision as of 14:21, 23 November 2021

LAB PREPARATION

Purpose / Objectives of Lab 6

In this lab, you will learn how to create a very simple web application in Amazon Web Services to demonstrate a Platform-as-a-Service deployment. We'll be using AWS Elastic Beanstalk for this lab. For more information about these technologies, refer to the Week 8 and Week 9 lectures and slides.

While you are working through this lab, it is highly recommended that you write down general notes and commands to help you remember how to do this lab. You may use your notes during tests, so fill it out accordingly!

If you encounter technical issues, please contact your professor via e-mail or in your section's Microsoft Teams group.

Minimum Requirements

Before beginning, you must have:

  1. Successfully completed Lab 5
  2. Watched the Week 9 video lecture
  3. Read through the Week 9 slides, and have them handy as a reference for concepts
  4. Your AWS Academy login credentials

INVESTIGATION: AWS Elastic Beanstalk

In this investigation, you'll set up two AWS Elastic Beanstalk instances. This service takes care of all the infrastructure setup; all you need to worry about is the code platform and the code.

Part 1: Logging in to AWS Academy - Cloud Foundations

To create your web app, perform the following steps:

  1. Log in to AWS Academy here: https://awsacademy.instructure.com/login/canvas
  2. Under 'Courses, choose AWS Academy Cloud Foundations

Part 2: Module 6 Activity - AWS Elastic Beanstalk

  1. Navigate to Modules in the left-hand menu bar.
  2. Scroll down to Module 6 - Compute
  3. Click on Activity - AWS Elastic Beanstalk
  4. Follow the lab instructions.
  5. While you complete the lab, take the following screenshots:
    1. First view of your pre-created sample Elastic Beanstalk environment status page.
    2. The HTTP 404 Tomcat error page from clicking on the URL for the hosted resource.
    3. View of your environment status page with the updated code deployed.
    4. The Congratulations web page from clicking on the URL for the hosted resource using your new code.
    5. A listing of your EC2 instances running the above resources to show you've fully explored the lab.

Part 3: A Note About Resource Usage

Module labs only need to be ended to shut down all resources. Remember, your created work is not preserved after you end the lab!

Part 4: Exploration

A second AWS Academy classroom is available to you, 'AWS Academy Learner Lab - Foundation Services. Here, you can explore the Elastic Beanstalk service (along with many others), create instances that will remain for the duration of the class, and try things out. I highly encourage you to take a look and play around! Read through the sidebar readme doc for service restrictions.

Lab Submission

Submit to Blackboard's Lab Submission section full-desktop screenshots (PNG/JPG) of the following:

  1. First view of your pre-created sample Elastic Beanstalk environment status page.
  2. The HTTP 404 Tomcat error page from clicking on the URL for the hosted resource.
  3. View of your environment status page with the updated code deployed.
  4. The Congratulations web page from clicking on the URL for the hosted resource using your new code.
  5. A listing of your EC2 instances running the above resources to show you've fully explored the lab.

Labs aren't marked until screenshots have been submitted.