NOTE: This site is run and maintained by Ethan. For questions regarding the course's assignments, contact a TA. For questions regarding this website (including any issues or errors you might find), contact Ethan. (Really though, if you find a problem or something that's unclear, send me an email -- assignment pages are always being updated for clarity and correction)

TAs:

A note regarding sending emails to a TA: We expect you'll make every effort to solve your problem on your own first. We expect that, if you run into a problem that requires our help, you'll first explain what you've tried to solve the problem and the results you had. Don't let this deter you from getting in contact with assignment problems, just make sure you've done the leg-work to solve your own problem. This will also help us help you if we know what you've already tried. Note that this really only applies for help with assignments. Anything else, fire an email off to us and we'll do our best to get back to you ASAP.

Assignment Links and Due-Dates

The following are the assignments and their due-dates. Links will be updated upon release. On the latter date of each assignment, submission deadlines will be 11:59pm.

Assignment Submissions

Assignment submissions are due by 11:59pm on the due date listed (the final day in the above range). Late assignments will be penalized 10% of the maximum grade for that assignment per day late. Assignment submissions are handled electronically on Brightspace, and there is no "grace period" with respect to a deadline. For example, if an assignment solution worth 30 points is submitted 6 hours late, the maximum possible grade for that assignment would be 27/30. If you require an extension, contact the instructor to avoid losing marks. Note that screenshots or other malleable evidence that a deliverable was completed on time will not be accepted. Please submit assignments to Brightspace (unless otherwise directed).

Answer documents should be a single-column PDF report with a cover page, and appropriate section headings. Do not submit word documents, rich text files, or anything other than a PDF. Clearly mark the question you are answering and include all relevant material (i.e. not just the answer, but any code/scripts written, commands run, and any output). Provide enough detail in your answers to demonstrate that you understand the concepts and commands you are running.

Please prefix your submitted compressed file with your MyCarletonOne userid, e.g., johnsmith-assignment1[.zip/.tar.gz/.tar.xz]. Any code or scripts that you wrote should be submitted in the archive, and any files contained in the archive MUST be referenced in the report.

Password-Protected File Access

There are a number of files (both required for assignments and optionally used) protected behind a username and password. These files are often referenced by links in the assignments and points to, for example from Assignment 2, here. The username and password for these password protected files are the same each time, and will be made available on Brightspace.

You are expected to have some familiarity with the Linux shell; common commands, rudimentary BASH scripting, piping and redirecting output. Many good Cheat Sheets, tutorials and guides exist that can help you review this material.

OpenStack

The Assignments will be done in Linux virtual machines, specifically created for each assignment. Each student will need an account on the SCS OpenStack platform, which is accessible only on campus or via the Carleton VPN. Instructions for creating an account and using OpenStack are available on the SCS OpenStack Support website. The user name and password for the course VM images are student and tneduts!, respectively, except for one of them (maybe assignment 2? One of them had problems). You will be asked to choose a new password upon your first login.

To access the VM images for the assignments on OpenStack, switch to the COMP4108B-W24 project through the drop-down menu at the top of the page. If you are unable to see COMP4108B-W24 in your projects list, please use the SCS Online Account Management tool to update your account.

Creating a Virtual Machine

Note: These instructions may change once the new version of OpenStack has been released.

  1. Ensure you're on the COMP4108B-W24 project at the top-left of the screen via the drop-down.
  2. Open the Compute menu on the left side of the screen.
  3. Select the Instances item.
  4. Click Launch Instance towards the right side of the screen (to the right of the search box).
  5. In the Launch Instance pop-up window:
    • Details: Enter an instance name (Note: please make it [First-Initial][Last-Name]-A1, without brackets).
    • Source: Under the Select Boot Source drop-down, select Instance Snapshot. Select the correct assignment using the up-arrow (e.g., comp4108-w24-assignment-01).
    • Flavour: Select the up-arrow next to the flavour called: comp4108.2Gram.21Gdisk.1cpu (has 21 GB of Total Disk).
    • Security Groups: Add the ping-ssh-egress.
  6. Click the blue Launch Instance button.
  7. Find your newly-created instance in the list. On the far right, click the down-arrow next to Create Snapshot and select Associate Floating IP.
  8. Under the IP Address drop-down, select an IP address and click the blue Associate button. USE THIS IP ADDRESS FOR EACH OF YOUR VMs. Note: If there are only two options in this list and neither of them work, do the following:
    1. Select the "+" to the right of the IP Address drop-down
    2. Select the ext-net-128 as the "pool"
    3. Click the blue Associate button.
    4. Check the IP Address drop-down again and a new IP address should be there for you to use.
Attention:

When naming your VM, PLEASE include your name and the assignment number in the instance name (e.g., [First-Initial][Last-Name]-A1, without brackets). This makes it significantly easier for me to determine who owns each VM and get into contact with you should the need arise. I can't enforce this, but your cooperation is much appreciated.

SSH access

The SCS OpenStack How-To document, available on the SCS OpenStack support website, provides all the necessary steps to enable SSH access to your VM. In summary, from your VM's Instance Overview page, use the drop-down menu to complete the following actions:

  1. Add the ping-ssh-egress security group to your VM instance.
  2. Associate a floating IP address with your VM instance on OpenStack.

PLEASE DO NOT HOG IP ADDRESSES. We have limited public IP addresses available. If you need to have 2 VM instances, please only assign a public IP address to one of them. You can then SSH into that VM, and use it to access your other VMs through their private IP addresses (in the 192.168.18-19.x subnet).

On Mac or Linux, the standard SSH client is likely your best option for connecting to your VM. On Windows, there are a number of clients to choose from, including MobaXterm; or the more commonly-used PuTTY. Note that MobaXTerm comes with a built-in SCP client, which will likely make copying files back and forth between your machine and the VM much easier. This choice is up to you.

Simplifying Your SSH Life

Because the VM's are only available from the Carleton network, you will need to find some way of connecting to the Carleton network and then to your VM, such as by using a VPN. You can also ProxyCommand option, which can either be added in your ssh command line, or by editing the ssh config file (which is much nicer in the long term).

To simplify your ssh command, edit the config file which is in the .ssh folder. On my personal machine, the .ssh folder is in my user folder.

Append the following to the config file:

Host access
	Hostname access.scs.carleton.ca
	User [your scs username]
				
Host comp4108
	ProxyCommand ssh.exe -q -W %h:%p access
	Hostname [the ip address of your VM]
	User student

Once this is complete, you should be able to connect to your VM using the command ssh comp4108 and you will be prompted to enter your SCS password and the VM password.

Copying files to/from your VM

You may use SCP to transfer files between your VM and your local machine. SCP runs over SSH, so you should configure your VM allow SSH traffic, as described above.

Hint:
If you are going to be transfering more than one file off of the VM you want to consider creating a compressed archive of the files on the VM, and then copying the archive to your local machine. The Linux format of choice is a Gzipped Tarball: tar collects a bunch of files into one, and gzip compresses the collected file to produce a tar.gz file. You can do this all in one step with:

tar -cvzf my_archive.tar.gz directoryName

This will create (-c) a gzipped (-z) archive file (-f) named my_archive.tar.gz by collecting/compressing the contents of the directory directoryName.

Linux or macOS

To copy a file (or recursively copy a directory, if the optional -R parameter is specified) from your VM to the current working directory on your local machine, launch a terminal, navigate to your desired directory, and run:

scp [-R] student@VM.IP.address:/some/path/source.file .

To copy a file from your local machine to your VM, run:

scp [-R] source.file student@VM.IP.address:/destination/path

Type man scp or visit this page for more information.

Windows

Install WinSCP, a GUI file transfer program that understands the SCP protocol. See the WinSCP documentation for more information. Alternatively, MobaXterm comes with a SCP client built-in and can be used as the Linux client can, or has a GUI-based built-in file browser that can be used as drag-and-drop.

If You Made Your SSH Life Easier

Alternatively, if you have made your ssh life easier by following the earlier instructions, you can use the following command on your local machine to copy a file from your VM to the current working directory on your local machine:

scp [-R] comp4108:/some/path/source.file .

To copy a file from your local machine to your VM, run:

scp [-R] source.file comp4108:/destination/path