[ Home | Schedule | Labs | Policy ]

Labs

Lab assignments

Collaboration Policy

See here.

Lab Environment

A Ubuntu 22.04 x86-64 environment is needed for the labs. The labs do not require a lot of CPU/memory resources, but to avoid weird errors it is better to have more than 8 cores and 16G memory. If you do not have access to this, consider using a virtual machine (on cloud). We do not provide machines. The labs may work on other architectures, but it is not tested.

Lab Repository Setup

Our labs are distributed and submitted through Github. Sign up an account if you don’t yet have one. Then join the labs assignment system via this link. Choose your student ID in the next page. If you don’t see your ID there, stop (don’t click skip) and contact the lecturer. Then follow the hints on the next page for initial setup of your private labs repo. (Github sometimes fails this step. Retry after a few minutes if it happens.)

You will submit labs by pushing to your private repo (as many times as you want) and we will collect labs for grading after the lab deadline directly from Github. Below are the steps for setting up the lab environment on your laptop. If you are not familiar with the git version control system, follow the resources here to get started.

Clone your repo by typing the following in a terminal:

$ git clone git@github.com:shuai-teaching/raftlab25-<YourGithubUsername>.git  
$ cd raftlab25-<YourGithubUsername>

You will see that a directory named raftlab25-<YourGithubUsername> has been created under your home directory.

Setting up the upstream repo

The repo you created is currently empty. Add the upstream and sync with it.

$ git remote add upstream https://github.com/stonysystems/dslabs-cpp 
$ git fetch upstream 

Next you will checkout the branch for the lab you are going to solve. For example, for lab 1:

$ git checkout -b lab-raft-solution upstream/lab-25 
$ git submodule update --init
$ git push -u origin lab-raft-solution

Before compile, you need to install needed software dependencies.

bash apt_packages.sh

Compile commands

make clean
make labtest

Test commands

./build/labtest -f config/raft_lab_test.yml

Submit

Commit your code to the lab-raft-solution branch, with a message starting with “submit” (lower case).

Acknowledgements

These labs are inspired by the C++/Go labs of MIT 6.824.