OPS705 Lab 7 (2207)

From CDOT Wiki
Revision as of 23:03, 23 November 2020 by Chris.johnson (talk | contribs) (Created page with "= LAB PREPARATION = === Purpose / Objectives of Lab 7 === In this lab, you will learn how to create a very simple web application in Amazon Web Services to demonstrate a Plat...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

LAB PREPARATION

Purpose / Objectives of Lab 7

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 10 lecture 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 6
  2. Watched the Week 6 video lecture
  3. Read through the Week 6 slides, and have them handy as a reference for concepts
  4. Your Seneca Azure login credentials
  5. Your linked mobile device for 2FA

INVESTIGATION 1: Installing Wordpress

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.

Part 1: Creating a Wordpress Web App

To create your web app, perform the following steps:

  1. Log in to AWS Educate and navigate to the AWS Management Console.
  2. Search for Elastic Beanstalk and click.
  3. On the main page for Elastic Beanstalk, click on the big orange Create Application button.
  4. You are now in the Getting Started - Create a web app screen.
  5. For the application name, name it wordpress.
  6. Under Platform, select PHP. Leave the branch and version on their defaults.
  7. Under Application Code, select Upload your code.
  8. Open a new browser tab, navigate to https://wordpress.org/download and download the latest .zip package.
  9. Back in the Getting Started - Create a web app screen, go to the Source code origin section.
  10. For the version label, use wordpress-5.5.3.
  11. Select 'Local file.
  12. Click on Choose file. A local filesystem navigation window pops up. Select the wordpress .zip file you downloaded in Step 8.
  13. At the bottom of the screen, click on the white Configure more options button.
  14. In the next screen, find the Software box and click the Edit button inside.
  15. In this new screen, scroll all the way to the top. In the Container Options, in the Document root field, type: /wordpress
  16. Click on the Continue button at the bottom of the screen to apply and to go back to the Configure more options page.
  17. Scroll down to the Database box, and click Edit.
  18. 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.
  19. If not already present, enter 5 in the Storage field.
  20. Keep all other defaults.
  21. Click Save at the bottom of the page.
  22. Back in the main page, find the Notifications box and click Edit to add your Seneca e-mail address.
  23. Back in the main page, click on the Create app button at the bottom of the page.
  24. 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

  1. Once the web app has completed start up from Part 1, click on the Environments link.
  2. You'll have a single environment in the list, most likely named Wordpress-env. Click the name.
  3. 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.
  4. In the left-hand menu, click on Configuration.
  5. Near the bottom of this page, you'll see a section labelled Database. Next to the endpoint field, a link will be present.
  6. Save this link in a text document, and then open this link in a new window.
  7. Welcome to the MySQL database you created with the web app. We're here to grab database connector information.
  8. Click on the Configuration tab link.
  9. At the very top, look for the DB name entry. Write this down in your text file.
  10. Your text document should now have four pieces of information: Database Host (endpoint), Database Name, Database Username, and Database Password
  11. Go back to your first window, the Wordpress-env status page. In the left-hand menu, click on the Go to environment link.
  12. This brings you to the Wordpress configuration webpage for your personal installation.
  13. Select English (United States), and then the blue Continue button.
  14. 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!.
  15. In the next page, enter the database information from your text file. Leave Table Prefix at its default.
  16. When ready, click Submit.
  17. 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.
  18. Now, we're in the blog settings page. Use the following settings:
  19. Site Title: Full Name's OPS705 Blog
  20. Username: Seneca Username
  21. Password: Use the supplied password, or choose your own.
  22. Your Email: username@myseneca.ca
  23. Search engine visibility: Check the box.
  24. When ready, click the Install Wordpress button.
  25. Shortly, you'll see a Success! splash page confirming your username. Click the Log In button to login to your new blog.

Part 3: Writing a Blog Entry

  1. Look around at the Dashboard and familarize yourself with the available settings.
  2. Create a blog post with the title Post 1: Installing Wordpress Using AWS Elastic Beanstalk.
  3. In the post itself, using your own words, describe how 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 4: A Note About Resource Usage

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 course. For now, leaving your new blog running is expected.

Lab Submission

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

  1. The Elastic Beanstalk Environment status page for Wordpress-env.
  2. The Wordpress Dashboard.
  3. Your blog post.

In the text box for your submission on Blackboard, include the URL to your blog post.

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.