Changes

Jump to: navigation, search

OPS705 Lab 5 (2217)

5,425 bytes added, 22:27, 28 March 2022
m
Chris.johnson moved page OPS705 Lab 5 to OPS705 Lab 5 (2217) without leaving a redirect
=== Purpose / Objectives of Lab 5 ===
In this lab, you will learn how to create a Windows Server 2019 and a Red Hat Linux virtual machine in a second cloud computing provider, Amazon Web Services (AWS). For the rest of the course, we'll be using AWS Academy, a managed classroom offering developed for educational institutions providing access to most of AWS just as they would be used in a normal production environment. More details about AWS and AWS Academy can be found in the Blackboard lectures slides and video on the subject.
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!
# Followed the e-mail instructions in your AWS Academy invite, found in your Seneca inbox
= INVESTIGATION 1: Managing a Windows Server 2019 VM in AWS Academy Amazon Web Services =In this investigation, you'll create, configure, and manage a Windows Server 2019 Virtual Machine using log in to Amazon Web Services ' Academy classroom and familiarize yourself with the interface. We'll be using AWS for the majority of our work in this course. == Part 1: Completing Your AWS Academy Registration ==# Follow the e-mail instructions in your AWS Academy invite, found in your Seneca inbox.# Check your spam filter before asking for a presecond invitation e-built imagemail. Compare # '''Warning:''' Do not create your own student account manually! Doing so can interfere with the AWS Academy account and contrast this experience with your setup of a Windows Server VM in Azure from Lab 2cause login issues. Use the e-mail invitation link for registration.
== Part 12: Logging In to AWS Academy ==
[[Image:Ops705_lab5_fig1.png|thumb|right|500px|Figure 1. AWS Academy Lab Environment.]]
This section assumes you've followed the directions in your AWS Academy invitation e-mail and have successfully logged in to your account. Check your spam filter before asking for a second invitation e-mail.
# A new browser window will launch automatically. This is the '''AWS Management Console''' where you will do most of your work. From this point on, your experience will closely match a normal production account.
= INVESTIGATION 2: Managing a Windows Server 2019 VM in AWS Academy =In this investigation, you'll create, configure, and manage a Windows Server 2019 Virtual Machine using Amazon Web Services and a pre-built image. Compare and contrast this experience with your setup of a Windows Server VM in Azure from Lab 2. == Part 21: Creating a Windows Server 2019 VM with EC2 ==[[Image:Ops705_lab5_fig2.png|thumb|right|500px|Figure 2. Default AWS Management Console view.]]
We will now create a virtual machine in AWS using the EC2 service.
# In the AWS Management Console, click on the ''Launch a virtual machine'' link.
# Click on the new entry to view the VM instance. This will display information about the VM, as well as its current state.
== Part 32: Remotely Connecting to your Windows Server VM in AWS ==
# From the Instance details page of your new VM in AWS, click on the '''Connect''' button near the top-right of your browser window.
# Don't be alarmed by the red warning!
# Once connected, open Notepad, and write <code>My name is ''insertFullName'', and I've completed the AWS Windows Server VM investigation!</code> Save the file to your VM's desktop, with the filename ''yourSenecaUsernameAWS.txt''.
== Part 43: Managing your VM from the AWS UI ==
# Go back into the Instance details page for your new VM.
# As noted earlier, this screen contains details about the VM along with its current status.
# At this point, power down your VM. Either do so from within your RDP connection, or click the '''Stop instance''' option in the AWS ''Instance state'' drop-down menu.
== Part 54: A Note About Resource Usage ==
As with our work in Microsoft Azure, keeping out costs down is important. When you aren't using a resource (like a VM), make sure it's in a stopped state.
You've been allocated $100 in AWS credits for the course, and that should be more than enough for the remaining labs. Please be responsible with your usage!
 
= INVESTIGATION 3: Managing a Linux VM in AWS EC2 =
In this investigation, we'll create, configure, and manage a Red Hat Enterprise Linux Virtual Machine using Amazon Web Services. This version of the OS is command line only, so you'll be using SSH to remotely connect to the VM and issue basic commands. This VM will be used extensively in Lab 3.
 
== Part 1: Creating A Linux VM From An Image ==
To create your Linux VM, follow the steps from ''Investigation 1, Part 1'', but with the following settings:
 
# '''Amazon Machine Image (AMI):''' Amazon Linux 2 AMI (HVM), SSD Volume Type
# '''Instance Type:''' t2.micro
# '''Configure Instance Details:''' Leave all options as they are.
# '''Add Storage:''' Leave all options as they are.
# '''Add Tags:''' Leave all options as they are.
# '''Configure Security Group:''' Leave all options as they are.
# Finish the Instance creation. Use the same key pair from Investigation 1! (Option: Choose an existing key pair)
 
== Part 2: Accessing Your Linux VM Remotely Using SSH ==
[[Image:Ops705_lab2_fig19.png|thumb|right|500px|Figure 5. The ''Connect to instance > SSH client'' page.]]
We will be accessing our new Linux VM remotely using SSH, which is a command-line (CLI) only protocol. We'll be diving into CLI in more detail during our next lab.
 
Requirements: An SSH Client
# Windows: Use the built-in '''Command Prompt''' application.
# macOS/Linux: Use the built-in '''Terminal''' application.
 
For all clients:
# In the Linux EC2 Instance summary page, click the ''Connect'' button.
# In the new ''Connect to instance'' page, click on the '''SSH client''' tab.
# Copy the example command near the bottom of the page. (Use your example command, not the one from the screenshot in this lab!)
# Choose the proper OS below and continue.
 
On Windows, Using Command Prompt:
# Open '''Command Prompt'''.
# Change directories to your default Downloads folder with the following command: <code>cd Downloads</code> (If you saved your .pem file elsewhere, navigate there. Or move the .pem file into Downloads.)
# Paste the example command from the ''Connect to instance'' page, and press Enter.
# The SSH command will ask you to confirm connecting. Type ''yes'' and press Enter.
# If login is successful, you should see a prompt like this: <code>[ec2-user@ip-172-31-95-114 ~]$ </code>
# To prove you've completed this section, run the following: <code>echo "My name is ''insertFullName'', and I've completed the Linux VM investigation." > ~/lab5.txt</code>
# To quit, type <code>exit</code>.
 
On macOS/Linux, Using Terminal:
# Open '''Terminal'''.
# Change directories to your default Downloads folder with the following command: <code>cd Downloads</code> (If you saved your .pem file elsewhere, navigate there. Or move the .pem file into Downloads.)
# Change the file permissions of your .pem file with this command: <code>chmod 400 *.pem</code>
# Paste the example command from the ''Connect to instance'' page, and press Enter.
# The SSH command will ask you to confirm connecting. Type ''yes'' and press Enter.
# If login is successful, you should see a prompt like this: <code>[ec2-user@ip-172-31-95-114 ~]$ </code>
# To prove you've completed this section, run the following: <code>echo "My name is ''insertFullName'', and I've completed the Linux VM investigation." > ~/lab5.txt</code>
# To quit, type <code>exit</code>.
 
== Part 3: Managing your Linux VM from the AWS UI ==
Managing your Linux-based VM is much the same as with your Windows VM from Investigation 1. The major difference is shutting down. As with the Windows Server VM, '''shutting down your VM when you aren't using it is essential to responsible usage'''.
 
You have two options to shut down your Linux VM:
# From within Linux: Log back in to the Linux VM via SSH, and run the following command: <code>sudo systemctl poweroff</code>
# From AWS: In the EC2 ''Instance summary'' page for the VM, use the '''Instance state''' drop-down menu and select '''Stop Instance'''.
 
Either way will fully shutdown the VM properly.
 
That's it!
 
= References =
* '''What is Amazon EC2?''' (Windows Instances) - https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/concepts.html
* '''What is Amazon EC2?''' (Linux Instances) - https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/concepts.html
= Lab Submission =
[[Image:Ops705_lab2_fig20.png|thumb|right|500px|Figure 6. Example of the SSH text portion for screenshot #4.]]
Submit to Blackboard's ''Lab Submission'' section full-desktop screenshots (PNG/JPG) of the following:
# The EC2 Instances page, with all currently created VMs listed.# The Instance details page for the Windows VM you created in this lab, powered on.
# A running RDP connection to this new VM, with the text file you created open in Notepad. (Do not fullscreen Notepad.)
# The Instance details page for the Linux VM you created in this lab, powered on.
# A running SSH connection to this new VM, and the following commands run and its output visible onscreen: <code>hostnamectl; cat ~/lab5.txt</code>
# The EC2 Instances page, with all currently created VMs listed and powered on.
'''Your professor will not check your lab until the screenshots have been submitted.'''

Navigation menu