Difference between revisions of "OPS705 Lab 6"
(Created page with "= 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 Plat...") |
(No difference)
|
Revision as of 22:36, 7 November 2021
Contents
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:
- Successfully completed Lab 5
- Watched the Week 9 video lecture
- Read through the Week 9 slides, and have them handy as a reference for concepts
- Your AWS Academy login credentials
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:
- Log in to AWS Academy and navigate to the AWS Management Console.
- Search for Elastic Beanstalk and click.
- 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:
/wordpress
- 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
- Once the web app has completed start up from Part 1, click on the Environments link.
- You'll have a single environment in the list, most likely named Wordpress-env. Click the name.
- 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.
- In the left-hand menu, click on Configuration.
- Near the bottom of this page, you'll see a section labelled Database. Next to the endpoint field, a link will be present.
- Save this link in a text document, and then open this link in a new window.
- Welcome to the MySQL database you created with the web app. We're here to grab database connector information.
- Click on the Configuration tab link.
- At the very top, look for the DB name entry. Write this down in your text file.
- Your text document should now have four pieces of information: Database Host (endpoint), Database Name, Database Username, and Database Password
- 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:
Full Name's OPS705 Blog
- Username:
Seneca Username
- Password: Use the supplied password, or choose your own.
- Your Email:
username@myseneca.ca
- 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
In this investigation, you'll interact with the Wordpress blog itself, and create a new post.
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
Post 1: Installing Wordpress Using AWS Elastic Beanstalk
. - 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
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.
Lab Submission
Submit to Blackboard's Lab Submission section full-desktop screenshots (PNG/JPG) of the following:
- The Elastic Beanstalk Environment status page for Wordpress-env.
- The Wordpress Dashboard.
- Your first blog post.
- Your second blog post.
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.