13,420
edits
Changes
no edit summary
{{Admon/important|This is NOT Assignment 1 Part 1!|This is the '''ROUGH WORK''' for Murray Saul's section for OPS335 Assignment 1 - Part 1. These assignment specifications are NOT complete. <br><br>Once the assignment specifications are ready, then a link will appear in the [https://wiki.cdot.senecacollege.ca/wiki/OPS335 Main OPS335 WIKI] .}}<br><br>
== Purpose ==
== General Requirements ==
'''Weight''': 53% of the overall grade '''Due Date''': During Week 6 (in class)
'''Due Date''': During Week 5 (in class)
== Detailed Requirements ==
=== Set-up a Virtual Network (335assign) ===
Create a new virtual network on your Host Machine.
* Assign a newly-created virtual network the name: '''asg1net335assign''', and set '''forwarding to any physical device'''<br>(refer to [http://zenit.senecac.on.ca/wiki/index.php/OPS335_Installation_Lab#INVESTIGATION_2:_VIRTUAL_MACHINE_INSTALLATION lab setup]. You can have have 2 different network names: "335assign" and "ops335" without causing any problems).* Addresses in this network will start with '''10172.161''30.20' followed by the '''last two digits of your student number''' (just as your main virtual network). The subnet mask must be '''255.255.255.0'''
* There must '''<u>NOT</u>''' be a DHCP server running for this network!
* All the machines for this assignment will be connected to your newly-created virtual network called: '''asg1net335assign''' === Create a "Cloning-Source" VM (335assign Virtual Network) === Create a virtual machine that you will use as a cloning-source. Details for the cloning-source #The name of this cloning-source VM will be called: '''seedling'''.#You should use the options that you used in your lab1 to setup the static network, plus you should use the DOMAIN parameter to set the '''coniferous.trees.ops''' domain for your cloning-source.#The VM should have a command-line interface only.#Configure it to be a good cloning-source, '''making certain that the cloning-source has all the following elements prior to cloning:'''::*Don't make the virtual drive too big: you will need space for it as well as space for the clones you from your cloning-source<br>('''2GB''' should be enough for any cloning-source and clone VM that you create for this assignment).::*The hostname for this server will be called: '''seedling'''::*Make certain that you can login to your cloning-source.::*Configure your network interface for this cloning-source with a '''static''' configuration and is connected to the '''335assign''' network. Refer to the table below for IP address and hostname.<br> {| class="wikitable" | style="margin-left:50px;"! Hostname !! Address !! Purpose|-| '''spruce.coniferous.trees.ops''' (your existing source) || External Facing Address:''' DHCP assigned'''<br>Internal Virtual Bridge (virbr1):''' 172.30.20.1''' || Your '''host''' machine |-| '''seedling.coniferous.trees.ops''' || '''172.30.20.100''' || '''Cloning-source''' used to create other servers for other assignments.|}
# Make certain that you have '''iptables''' services enabled and running instead of ''Firewalld''.
# Modify the iptables to meet the following conditions:
::<ul>
::<li>All outgoing traffic is allowed.</li>
::<li>Responses to any traffic the machine sends out are allowed.</li>
::<li>Traffic on the loopback interface is allowed.</li>
::<li>The host machine (and <b>only</b> the host machine) must be able to ssh to that cloning-source VM.</li>
::<li>ICMP traffic is allowed if it originated with the <b>local network only</b>.</li>
::<li>As this is acting as the secure basis for later machines, no other traffic should be allowed.</li>
::</ul>
=== Clone "ns1" Create Full and Incremental Backups of cloning-source VM from "Cloning Source" & Perform Setup Tasks===
Perform the following steps for this section:
# This task is to be performed in your '''host''' machine.# Issue the command '''su -'''#Create a clone Bash shell script called: '''ns1/root/bin/assnBackup.bash''' from the "cloning source" that will act as your to perform a '''master DNS serverfull backup''' on using the '''asg1netgzip''' network. Refer command to backup the entire file system of your cloning-source VM to save the compressed copy to the table below for address and hostnamedirectory path: '''/backup/full/''').#Make certain This shell script should store any VM image file in the "/var/lib/libvirt/images" directory that your DNS server must has all the records extension ".qcow2" as a positional parameter to be used with a for loop. # Perform a Net-search to use the zone called: '''ops335a1.orgpv''' (''pipe-viewer'' listed in that table, including records ) command to show a text-based indicator of backup for machines that do not exist as of yetEACH VM image file. It is important You need to understand that DNS records live independently from add the machines that they are "pointing" '''EPEL repository''' toinstall the pv command.#A default setup Set execute permissions for this script, and run this Bash shell script prior to exiting your assignment work session to properly backup your cloning source. You should also make a master DNS server should be sufficientcopy of the backup on an external device (such as a USB key).# Set-up via a crontab entry, but make certain that an '''incremental backup''' of the address '''/etc/''' directory of your cloning-source to be performed every hour to the '''admin contact/backup/incremental/cloning-source''' directory. == Assignment Submission == The student is: required to prove to their professor that their set-up works correctly during the regularly-scheduled lab period. ===Assignment Evaluation Details=== *'''yoursenecaid@ops335a1.orgDemonstrate working assignment to your instructor in class:''', and <ol type="a"><li>Students need to demonstrate their assignment functionality to their professor during a lab period (like you would for any lab for "sign-off").</li><li>Students are required to prepare everything ahead of time so that you can quickly demonstrate to your instructor that slave DNS servers will all required parts of your assignment are working.</li><li>Do do proceed to the next step until you have demonstrated your assignment to your instructor to check for updated records from this master every 30 minuteserrors that may cause problems when running the checking script.<br><br></li></ol>
*Download and run a shell script to check your work (Depending on your OPS335 Instructor):
::'''Murray Saul's Classes (Sections A & B):'''<ol><li>Login as '''root''' on your '''host''' machine.</li><li>Change to the '''/root/bin''' directory.</li><li>Make certain that your '''cloning-source VM is running'''.<li>Issue the following command to install e-mail on your '''host''' machine:<source>yum install mailx </source><li>Issue the command to download a checking script for your assignment to your '''host''' machine: <source>wget http://matrix.senecac.on.ca/~murray.saul/ops335/check-assn1-p1.bash</source></li><li>Set execute permissions and run the command: '''/root/bin/check-assn1-p1.bash'''<br>(You shell script contents will be mailed to your Seneca email and to your OPS335 instructor's Seneca email. If you do '''NOT''' receive an e-mail message in your Seneca email account, then there is a problem, and you '''MUST''' rerun or contact your OPS335 instructor immediately.<br><br></li></ol>
*'''Additional Assignment Information:'''<ol type="a"><li>This assignment is to be completed individually. '''Group submissions are not allowed'''.</li><li>Test your machine to make sure it works. If a machine is not accessible (e.g. will not boot, can not be accessed through ssh from your host, etc.), or is otherwise non-functional, you may be told to '''resubmit'''.</li><li>'''Late submissions are a subject to a penalty of 10% per day'''.</li><ol>
=== Reference Materials: List of Machines / DNS Records =Evaluation Rubric==
{| class="wikitable"width=50%! Name !! Address !! Purpose|-| colspan=2 style="text-align:center;background-color:#cccccc;" |'''Student Demonstration (in class)'''|-| style="font-weight:bold" | Evaluation Item | width=10% style="text-align:right;font-weight:bold" | Mark|-| Created Virtual Network: '''335assign'''<br>(correct settings) | style="text-align:right" | /1|-| Can '''ping cloning-source from host machine''' with '''correct IPADDR'''| style="text-align:right" | /1|-| root account on host machine can '''connect to cloning-source VM''' via ssh application '''without''' password| style="text-align:right" | /1|-| cloning-source VM can connect to the Internet<br>(i.e. '''ping 8.8.8.8''')| style="text-align:right" | /1|-| cloning-source can SSH to student's '''Matrix''' account| style="text-align:right" | /1|-| colspan=2 style="text-align:center;background-color:#cccccc;" |'''Configuration (Checking Script Output)'''|-| style="font-weight:bold;" | Evaluation Item | width=10% style="text-align:right;font-weight:bold" | Mark|-| Hostname set to: '''seedling''' for cloning source | style="text-align:right" | /1|-| '''yum update performed''' | style="text-align:right" | /1|-| '''No regular users on cloning source''' (just root) | style="text-align:right" | /1|-| SELinux status set to: '''enforcing''' | style="text-align:right" | /1|-| firewalld '''stopped''' and '''inactive'''| style="text-align:right" | /1|-| iptables '''active''' and '''enabled'''| style="text-align:right" | /1|-| iptables - '''All outgoing traffic is allowed'''| style="text-align:right" | /1|-| iptables - The '''host machine''' (and only the host machine) must be '''able to ssh to the cloning-source'''| style="text-align:right" | /1|-| iptables - '''ICMP traffic is allowed''' if it originated with the '''local network only'''| style="text-align:right" | /1|-| cloning-source VM can '''connect to the Internet'''| style="text-align:right" | /1|-| '''correct static network configuration for cloning-source VM'''<br>(half mark for each network config item)| style="text-align:right" | /5
|-
| permitRootLogin set to '''host.ops335a1.orgyes''' for cloning-source VM|style="text-align:right" | 10.161.X.1 || Your host machine/2
|-
| Backup script '''ns1assnBackup.ops335a1.orgbash''' structure|style="text-align:right" | 10.161.X./2 || Master name server
|-
| Proof that '''ns2.ops335a1.orgVM full backup''' was run|style="text-align:right" | 10.161.X.3 || Slave name server/2
|-
| file.ops335a1.org '''Crontab entries executed properly'''|style="text-align:right" | 10.161.X.4 || File server/2
|-
| www.ops335a1.org '''Incremental Backup''' of '''/etc/''' directory of cloning-source to '''/backup/incremental/cloning-source''' directory|style="text-align:right" | 10.161.X.5 || Web server/2
|-
| '''source.ops335a1.orgTOTAL''' |style="text-align:right" | 10.161.X.254 || Disk image to clone from when creating new machines.'''/30'''
|}