Skip to content

Latest commit

 

History

History
129 lines (94 loc) · 8.6 KB

infra.md

File metadata and controls

129 lines (94 loc) · 8.6 KB

Infrastructure

This page contains helpful information pertaining to setting up, completing and submtting problem sets required for CS-145. We have divided it into the following sections for your convenience:

We strongly recommend you do all problem sets using the virtual machine environment we provide. Before loading our environment, you will need to install a virtual machine monitor.

Installing a virtual machine monitor

A virtual machine monitor, or VMM, is a piece of software that allows you to run another operating system “virtually,” inside your base operating system. For example, you can run Linux inside Windows.

We have had good experiences with a commercial VMM called VMware. VMware’s Mac OS X product is called VMware Fusion, and its Windows product is called VMware Workstation. These products are not free, but you can get an academic license to use one for the duration of the class. You can also use a freely-available VMM, such as Oracle’s VirtualBox.

To obtain VMware:

  1. Fill out this Google form with your name, e-mail, HUID, etc, requesting the latest version of VMware for your computer platform (VMware Fusion for Mac OS X, VMware Workstation for Windows, or (rarely) VMware Workstation for Linux). You will receive an account at the VMware Software Center once your request is approved. This step is manual and it may take up to one business day for you to receive a response.

    Your account at the VMware Software Center will have user name and initial email address both set to your Harvard email address.

  2. The VMware Software Center is set up like a store. On the “store front” page, select the latest version of the VMware product you need for your platform (Fusion or Workstation for Windows). If you see both a free and a non-free offering of the product, choose the free one.

  3. Click the Add to Cart button, then proceed through the check-out process until you reach a screen with a Start Download button. Click the Start Download button to download the installer.

  4. On the store front page, click on Your Account/Orders under the Hello, <your email> menu. Click on View Details to see your Serial Number or Product Key. You will need that information to run VMware.

  5. If you’re installing Fusion:

    1. Click on the file you downloaded to mount the VMware Fusion icon on your desktop.

    2. Click on the VMware Fusion (or VMware Fusion.app) icon in the new window, click Open if prompted, and type your password if prompted. Follow the instructions to install Fusion. When prompted for a license key, use the serial number generated for you by the VMware Software Center.

    If you’re installing Workstation for Windows:

    1. Click on the file you downloaded and launch VMware Workstation’s installer. If you are asked whether to allow the installer to make changes to your computer, enter your password, and click Yes.
    2. A window entitled Welcome to the VMware Workstation Pro Setup Wizard should appear. Click Next.
    3. When prompted with a license agreement, select I accept the terms in the license agreement, then click Next.
    4. You'll next come to a Custom Setup window. You need not change the Install Location. You'll probably want to select Enhanced Keyboard Driver, and then select Next.
    5. On the next screen, User Experience Settings uncheck the Help improve VMware Workstation Pro box and click Next.
    6. When prompted about Shortcuts, leave both boxes checked and click Next.
    7. You'll now come to the Ready to install VMware Workstation Pro screen; select Install. It will take a minute or two for the installation.
    8. When you come to the Completed the VMware Workstation Pro Setup Wizard screen, click on License, and paste the license key that you got from the VMware store. Then click Finish.

Setting up the VM environment

We run all our programs in a virtual machine. The VM has the P4 and Mininet environment already set up for you. For project2 and project4 which do not use P4 or Mininet, we still recommend you do these projects using this VM.

  • Download the virtual machine we prepared. The virtual machine files for VMWare can be downloaded at this link.

  • Install the VM. Directly use your virtual machine software to open the VM file downloaded. The username and the password of this VM are both p4. Note: The VM file is large. It could consume about 40G disk size in your laptop. Please reserve enough space in your disk before installing the VM.

  • Login to the VM. right click on the VM in your VM library and select "Connect to SSH".

Machine guidelines

There are some optional tasks throughout the projects in this course which we will mark as "High-end machine only" tasks. These tasks work as expected only if the machine you are running the VM on has a processor that is equivalent to or better than an i7 with a clockrate higher than 2.8 GHz and if you have at least 8 GB of RAM. We recommend allowing your VM usage of at least two CPU cores and at least 8 GB of RAM (the higher the better, for both). You will not be penalized in any way if you do not complete these tasks due to machine constraints. These are purely optional.

Addendum: using Virtual box

While the recommended virtual achine monitor for our course is VMWare, our projects work without issues on Virtual Box as well. We can provide a Virtual Box VM on request. Here are some helpful notes in case you prefer Virtual Box.

  • For SSH access: Usually it is hard to use the virtual machine directly through your hypervisor. We have installed OpenSSH server in this virtual machine so that you can use it through ssh command. You can connect to your virtual machine by typing: ssh p4@localhost -p 1338

  • Saving disk space: as you work on your VM for extended periods of time, you might notice a disk overhead larger than the files you added to your VM. We encourage taking steps to reduce virtual disk size after completing each project in case you are on a machine that does not have a lot of disk space. You can use this post as a helpful guideline for reducing your virtual disk size.

Using github classroom

This course uses git and github classroom for all its projects. The Harvard SEAS git introduction is a good way to get set up with git quickly. Please take a look at git notes for the CS 61 Fall 2020 offering for a more interesting introduction. We discuss using github classroom for our projects here.

Requesting your project clone

Each project has or will have a github classroom link posted on our course website. Please click the link after you are signed into your github account. This will begin the process of creating a project clone repository for you. You will get an email notification when your cloned repository is accessible.

Clone project contents

After booting your virtual machine, you need to clone this project repository in your virtual machine

git clone https://github.com/Harvard-CS145/projectX-YYY.git

where X (1-8) is the project number, and YYY is your Github username. The description and code skeletons of each minor project are in this repository. In this repository, you will finish your coding in each minor project, test your programs, and submit your codes into Github for grading.

Submitting the project

Simply commiting and pushing all changes to the main branch of your cloned project repository counts as a submission. We will consider the most recent commit prior to the project deadline as your final submission. In the case of extensions, please leave a note Not ready for grading on your commited repo, and mark your final submission as Ready for grading. We will count late hours accordingly.

Note: Some notes about VMWare were borrowed from the CS 61 offered by Eddie Kohler.