Difference between revisions of "OPS705 Assignment 2"

From CDOT Wiki
Jump to: navigation, search
(Created page with "In this assignment, you will install a WordPress blog in AWS using Elastic Beanstalk and RDS. Unlike labs, assignments have minimal instructions. You are given specifications...")
 
Line 1: Line 1:
In this assignment, you will install a WordPress blog in AWS using Elastic Beanstalk and RDS.
+
In this assignment, you will install a WordPress blog in AWS using Elastic Beanstalk and RDS. '''You will construct this assignment in our ''AWS Academy Learner Lab - Foundation Services'' classroom.'''
  
 
Unlike labs, assignments have minimal instructions. You are given specifications on what the assignment needs, and you must rely on your previous work in the course. If the assignment doesn't have the command you need, you can find it in your labs. As with Assignment 1, don't be afraid to do a little research!
 
Unlike labs, assignments have minimal instructions. You are given specifications on what the assignment needs, and you must rely on your previous work in the course. If the assignment doesn't have the command you need, you can find it in your labs. As with Assignment 1, don't be afraid to do a little research!
Line 10: Line 10:
 
== Virtual Private Cloud ==
 
== Virtual Private Cloud ==
 
Create a new VPC with the following settings:
 
Create a new VPC with the following settings:
# VPC only
+
# '''VPC only'''
# Name: Wordpress VPC
+
# Name: '''Wordpress VPC'''
# IPv4 CIDR: 10.0.0.0/16
+
# IPv4 CIDR: '''10.0.0.0/16'''
 
# Leave all other settings on default
 
# Leave all other settings on default
 +
 
Once created, modify this VPC with the following actions:  
 
Once created, modify this VPC with the following actions:  
# Edit DNS hostnames: Enable
+
# Edit DNS hostnames: '''Enable'''
  
 
== Subnets ==
 
== Subnets ==
 
Create two private IPv4 subnets in this VPC:
 
Create two private IPv4 subnets in this VPC:
# Private Subnet 1 – 10.0.1.0/24 – us-east-1a
+
# Private Subnet 1 – '''10.0.1.0/24''' '''us-east-1a'''
# Private Subnet 2 – 10.0.2.0/24 – us-east-1b
+
# Private Subnet 2 – '''10.0.2.0/24''' '''us-east-1b'''
 
Create two public IPv4 subnets in this VPC:
 
Create two public IPv4 subnets in this VPC:
# Public Subnet 1 – 10.0.11.0/24 – us-east-1a
+
# Public Subnet 1 – '''10.0.11.0/24''' '''us-east-1a'''
# Public Subnet 2 – 10.0.12.0/24 – us-east-1b
+
# Public Subnet 2 – '''10.0.12.0/24''' '''us-east-1b'''
 
Edit your public subnets with the following settings:
 
Edit your public subnets with the following settings:
 
# Enable auto-assign public IPv4 address
 
# Enable auto-assign public IPv4 address
Line 30: Line 31:
 
== Internet Gateway ==
 
== Internet Gateway ==
 
Create a new Internet Gateway with the following:
 
Create a new Internet Gateway with the following:
# Name: Wordpress Gateway
+
# Name: '''Wordpress Gateway'''
# Once created, attach it to your Wordpress VPC
+
# Once created, attach it to your Wordpress VPC.
  
 
== Route Tables ==
 
== Route Tables ==
Line 37: Line 38:
  
 
Create a second route table:
 
Create a second route table:
# Name: Wordpress Website Route Table
+
# Name: '''Wordpress Website Route Table'''
# VPC: Wordpress VPC
+
# VPC: '''Wordpress VPC'''
 
# Routes Entry 1:
 
# Routes Entry 1:
## Destination: 10.0.0.0/16
+
## Destination: '''10.0.0.0/16'''
## Target: local
+
## Target: '''local'''
 
# Routes Entry 2:
 
# Routes Entry 2:
## Destination: 0.0.0.0/0
+
## Destination: '''0.0.0.0/0'''
## Target: Internet Gateway – Wordpress Gateway
+
## Target: '''Internet Gateway – Wordpress Gateway'''
  
 
== Security Groups ==
 
== Security Groups ==
 
Create a security group with the following settings:
 
Create a security group with the following settings:
# Name: Wordpress Website SG
+
# Name: '''Wordpress Website SG'''
# Description: Allows HTTP traffic inbound
+
# Description: '''Allows HTTP traffic inbound'''
# VPC: Wordpress VPC
+
# VPC: '''Wordpress VPC'''
 
# Inbound Rule:
 
# Inbound Rule:
## Type: HTTP
+
## Type: '''HTTP'''
## Source: Anywhere – IPv4 (0.0.0.0/0)
+
## Source: '''Anywhere – IPv4 (0.0.0.0/0)'''
  
 
Create a security group with the following settings:
 
Create a security group with the following settings:
# Name: Wordpress Database SG
+
# Name: '''Wordpress Database SG'''
# Description: Allows MySQL traffic locally
+
# Description: '''Allows MySQL traffic locally'''
# VPC: Wordpress VPC
+
# VPC: '''Wordpress VPC'''
 
# Inbound Rule:
 
# Inbound Rule:
## Type: MYSQL/Aurora
+
## Type: '''MYSQL/Aurora'''
## Source: Custom (Select Wordpress Website SG in the search field)
+
## Source: '''Custom''' (Select ''Wordpress Website SG'' in the search field)
  
Edit both public subnets’ route table associations to: Wordpress Website Route Table
+
Edit both public subnets’ route table associations to: '''Wordpress Website Route Table'''
  
 
= Task 2: Database =
 
= Task 2: Database =
 
Create a new RDS instance with the following settings:
 
Create a new RDS instance with the following settings:
# Engine options: MySQL
+
# Engine options: '''MySQL'''
# Templates: Free tier
+
# Templates: '''Free tier'''
# DB instance identifier: wordpress-db
+
# DB instance identifier: '''wordpress-db'''
# Master username: admin
+
# Master username: '''admin'''
# Auto generate a password
+
# '''Auto generate a password'''
# DB instance class: db.t3.micro
+
# DB instance class: '''db.t3.micro'''
# Allocated storage: 5
+
# Allocated storage: '''5'''
# Enable storage autoscaling: Unchecked
+
# Enable storage autoscaling: '''Unchecked'''
# Virtual private cloud (VPC): Wordpress VPC
+
# Virtual private cloud (VPC): '''Wordpress VPC'''
# Subnet group: Create new DB Subnet Group
+
# Subnet group: '''Create new DB Subnet Group'''
# Public access: Yes
+
# Public access: '''Yes'''
# VPC security group: Choose existing, remove default VPC, add Wordpress Database VPC
+
# VPC security group: Choose existing, remove default VPC, add '''Wordpress Database VPC'''
# Availability Zone: us-east-1a
+
# Availability Zone: '''us-east-1a'''
# Additional configuration, Initial database name: wordpress
+
# Additional configuration, Initial database name: '''wordpress'''
# Enable automated backups: Unchecked
+
# Enable automated backups: '''Unchecked'''
# Enable encryption: Unchecked
+
# Enable encryption: '''Unchecked'''
# Enable Enhanced monitoring: Unchecked
+
# Enable Enhanced monitoring: '''Unchecked'''
  
Once the database has finished creating, click on the View connection details button by the green success message at the top of the page. This gives you your database password.
+
Once the database has finished creating, click on the ''View connection details'' button by the green success message at the top of the page. This gives you your database password.
  
Store the Master username, Master password, and Endpoint in a saved document. You’ll need it later.
+
Store the ''Master username'', ''Master password'', and ''Endpoint'' in a saved document. '''You’ll need it later.'''
  
 
= Task 3: Elastic Beanstalk =
 
= Task 3: Elastic Beanstalk =
 
Create a new Elastic Beanstalk application with the following settings:
 
Create a new Elastic Beanstalk application with the following settings:
 
== Main settings ==
 
== Main settings ==
# Application name: wordpress
+
# Application name: '''wordpress'''
# Platform: PHP
+
# Platform: '''PHP'''
# Application code: Upload your code
+
# Application code: '''Upload your code'''
# Choose file: Downloaded wordpress source code zip file
+
# Choose file: '''Downloaded wordpress source code zip file'''
# Version label: wordpress-versionnumber (Example: wordpress-5.9.3)
+
# Version label: ''wordpress-versionnumber'' (Example: wordpress-5.9.3)
 
== Configure more options ==
 
== Configure more options ==
# Software > Document root: /wordpress
+
# Software > Document root: '''/wordpress'''
# Security > Service role: LabRole
+
# Security > Service role: '''LabRole'''
# Security > EC2 key pair: vockey
+
# Security > EC2 key pair: '''vockey'''
# Security > IAM instance profile: LabInstanceProfile
+
# Security > IAM instance profile: '''LabInstanceProfile'''
# Monitoring > System: Basic
+
# Monitoring > System: '''Basic'''
# Managed updates > Enabled: Unchecked
+
# Managed updates > Enabled: '''Unchecked'''
# Notifications: YourSenecaE-mailAddress
+
# Notifications: ''YourSenecaE-mailAddress''
# Network > VPC: Wordpress VPC
+
# Network > VPC: '''Wordpress VPC'''
# Network > Public IP address: Checked
+
# Network > Public IP address: '''Checked'''
# Network > Instance subnets: Public Subnet 1, Public Subnet 2 (both checked)
+
# Network > Instance subnets: '''Public Subnet 1, Public Subnet 2''' (both checked)
# Network > Database subnets: Private Subnet 1, Private Subnet 2 (both checked)
+
# Network > Database subnets: '''Private Subnet 1, Private Subnet 2''' (both checked)
# Instances > Wordpress Website SG (both checked)
+
# Instances > '''Wordpress Website SG''' (both checked)
 
# Create the application.
 
# Create the application.
  
Line 119: Line 120:
 
== Database Connector ==
 
== Database Connector ==
 
Use the following database connector information:
 
Use the following database connector information:
# Database Name: wordpress
+
# Database Name: '''wordpress'''
# Username: admin
+
# Username: '''admin'''
# Password: yourRDSpassword
+
# Password: ''yourRDSpassword''
# Database Host: yourRDSendpoint
+
# Database Host: ''yourRDSendpoint''
# Table Prefix: wp_
+
# Table Prefix: '''wp_'''
  
 
== Site Information ==
 
== Site Information ==
 
Set the following site information:
 
Set the following site information:
# Site Title: OPS705 Winter 2022 – Assignment 2
+
# Site Title: '''OPS705 Winter 2022 – Assignment 2'''
# Username: yourSenecaUsername
+
# Username: ''yourSenecaUsername''
# Password: Choose a strong password (do not reuse the DB password)
+
# Password: ''Choose a strong password'' (do not reuse the DB password)
# Your Email: yourSenecaEmailAddress
+
# Your Email: ''yourSenecaEmailAddress''
# Search engine visibility: Checked
+
# Search engine visibility: '''Checked'''
  
 
= Task 5: Blog Posts =
 
= Task 5: Blog Posts =

Revision as of 17:14, 9 April 2022

In this assignment, you will install a WordPress blog in AWS using Elastic Beanstalk and RDS. You will construct this assignment in our AWS Academy Learner Lab - Foundation Services classroom.

Unlike labs, assignments have minimal instructions. You are given specifications on what the assignment needs, and you must rely on your previous work in the course. If the assignment doesn't have the command you need, you can find it in your labs. As with Assignment 1, don't be afraid to do a little research!

Assignments in OPS705 are built as an assessment of your ability to meet the course objectives. As such, I'm unable to provide detailed help.

Task 1: Networking

In this task, you will create all the networking required for your new web application.

Virtual Private Cloud

Create a new VPC with the following settings:

  1. VPC only
  2. Name: Wordpress VPC
  3. IPv4 CIDR: 10.0.0.0/16
  4. Leave all other settings on default

Once created, modify this VPC with the following actions:

  1. Edit DNS hostnames: Enable

Subnets

Create two private IPv4 subnets in this VPC:

  1. Private Subnet 1 – 10.0.1.0/24us-east-1a
  2. Private Subnet 2 – 10.0.2.0/24us-east-1b

Create two public IPv4 subnets in this VPC:

  1. Public Subnet 1 – 10.0.11.0/24us-east-1a
  2. Public Subnet 2 – 10.0.12.0/24us-east-1b

Edit your public subnets with the following settings:

  1. Enable auto-assign public IPv4 address
  2. Enable resource name DNS A record on launch

Internet Gateway

Create a new Internet Gateway with the following:

  1. Name: Wordpress Gateway
  2. Once created, attach it to your Wordpress VPC.

Route Tables

Edit your default route table for your Wordpress VPC and add the name: VPC-local Route Table

Create a second route table:

  1. Name: Wordpress Website Route Table
  2. VPC: Wordpress VPC
  3. Routes Entry 1:
    1. Destination: 10.0.0.0/16
    2. Target: local
  4. Routes Entry 2:
    1. Destination: 0.0.0.0/0
    2. Target: Internet Gateway – Wordpress Gateway

Security Groups

Create a security group with the following settings:

  1. Name: Wordpress Website SG
  2. Description: Allows HTTP traffic inbound
  3. VPC: Wordpress VPC
  4. Inbound Rule:
    1. Type: HTTP
    2. Source: Anywhere – IPv4 (0.0.0.0/0)

Create a security group with the following settings:

  1. Name: Wordpress Database SG
  2. Description: Allows MySQL traffic locally
  3. VPC: Wordpress VPC
  4. Inbound Rule:
    1. Type: MYSQL/Aurora
    2. Source: Custom (Select Wordpress Website SG in the search field)

Edit both public subnets’ route table associations to: Wordpress Website Route Table

Task 2: Database

Create a new RDS instance with the following settings:

  1. Engine options: MySQL
  2. Templates: Free tier
  3. DB instance identifier: wordpress-db
  4. Master username: admin
  5. Auto generate a password
  6. DB instance class: db.t3.micro
  7. Allocated storage: 5
  8. Enable storage autoscaling: Unchecked
  9. Virtual private cloud (VPC): Wordpress VPC
  10. Subnet group: Create new DB Subnet Group
  11. Public access: Yes
  12. VPC security group: Choose existing, remove default VPC, add Wordpress Database VPC
  13. Availability Zone: us-east-1a
  14. Additional configuration, Initial database name: wordpress
  15. Enable automated backups: Unchecked
  16. Enable encryption: Unchecked
  17. Enable Enhanced monitoring: Unchecked

Once the database has finished creating, click on the View connection details button by the green success message at the top of the page. This gives you your database password.

Store the Master username, Master password, and Endpoint in a saved document. You’ll need it later.

Task 3: Elastic Beanstalk

Create a new Elastic Beanstalk application with the following settings:

Main settings

  1. Application name: wordpress
  2. Platform: PHP
  3. Application code: Upload your code
  4. Choose file: Downloaded wordpress source code zip file
  5. Version label: wordpress-versionnumber (Example: wordpress-5.9.3)

Configure more options

  1. Software > Document root: /wordpress
  2. Security > Service role: LabRole
  3. Security > EC2 key pair: vockey
  4. Security > IAM instance profile: LabInstanceProfile
  5. Monitoring > System: Basic
  6. Managed updates > Enabled: Unchecked
  7. Notifications: YourSenecaE-mailAddress
  8. Network > VPC: Wordpress VPC
  9. Network > Public IP address: Checked
  10. Network > Instance subnets: Public Subnet 1, Public Subnet 2 (both checked)
  11. Network > Database subnets: Private Subnet 1, Private Subnet 2 (both checked)
  12. Instances > Wordpress Website SG (both checked)
  13. Create the application.

While you wait for the creation to complete, check your e-mail to confirm your notification subscription.

Task 4: Site Configuration

Open the URL presented in the Wordpress EBS instance and begin the site setup:

Database Connector

Use the following database connector information:

  1. Database Name: wordpress
  2. Username: admin
  3. Password: yourRDSpassword
  4. Database Host: yourRDSendpoint
  5. Table Prefix: wp_

Site Information

Set the following site information:

  1. Site Title: OPS705 Winter 2022 – Assignment 2
  2. Username: yourSenecaUsername
  3. Password: Choose a strong password (do not reuse the DB password)
  4. Your Email: yourSenecaEmailAddress
  5. Search engine visibility: Checked

Task 5: Blog Posts

Delete the first template post and create one post each with your answers to the following questions:

  1. How would you describe how you set up this Elastic Beanstalk+Database instance of Wordpress to a student who has just finished OPS705 Week 1?
  2. What was the most difficult part of this assignment for you?
  3. What parts of this assignment did you find easier compared to our IaaS version of Wordpress from Assignment 1?
  4. In the context of this assignment, briefly describe the function of the following: VPCs, subnets, security groups, route tables, internet gateways