Changes

Jump to: navigation, search

OPS345 Lab 3

1,925 bytes added, 02:13, 2 January 2022
THIS PAGE IS A DRAFT, NOT A REAL COURSE PAGE
''' The current schedule for OPS345 is here: [[OPS335_Weekly_Schedule]]
* www instance was created in In the last lab, with we created the '''ww''' instance:* With a static private IP, and (10.3.45.11)* We set up port fowarding done from forwarding for the SSH protocol so that incoming TCP packets to port 2211 on router are forwarded to TCP port 22 on ww. = Storage for the web server = In this lab we'll configure ww to function as a web server. The most important piece of learning in this lab is managing one type of storage available on AWS: '''Elastic Block Storage (EBS)'''.  An EBS volume looks like any other block storage device (e.g. a harddrive partition) to an operating system in an AWS instance. But of course it's not a partition or a harddrive or an LVM logical volume, its actual implementation details are internal to AWS and of no concern to us, the users. The concept should be familiar to you because it's so similar to how in OPS245 you've created a virtual harddrive in VMware and attached it to an existing VM. * First go to Volumes under Elastic Block Store. Notice that some volumes are already there. These are the virtual harddrives which your existing VMs have been installed on, where they store all the operating system files, the contents of the home directories, and anything else "on the harddrive".* Click "Create volume". [[File:AWSCreateVolume.png|800px|border|center]] * Don't neglect to click the "Info" link on each option. Remember that even though it may sound incomprehensible at first: you will pick up some knowledge every time you read this stuff, and eventually this will become easier to understand.* Set the size to '''1GB'''. This is the minimum allowed and is more than enough for what you need.* Set its Name to '''www-data'''.* Now you need to attach it to the ww VM.  [[File:AWSAttachVolume.png|800px|border|center]] * yum install httpd iptablesThe name of the device doesn't really matter. Mine turned out to be /dev/sdf. Note that you don't need to shut down your VM nor even reboot it. The action you performed is the equivalent of plugging in a hot-servicespluggable storage device into a Linux desktop or laptop. * enable iptablesIn your ww terminal check that the new device showed up and is the correct size: [[File:AWSVolumeAttached.png|800px|border|center]]    
* before starting the service, we'll configure the server to store all webpages on a separate volume: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-attaching-volume.html
** 1GB in us-east-1a
** rename to www-data
** attach to www (note reboot is not required)
* ls /dev/xvd* -l # note /dev/xvdf

Navigation menu