Readying VM for the Course

Once you have created you fresh VM, you need to get it ready for the course. Make sure you have a fast, reliable internet connection before you start.

Note: Much of this step involves setting up git, which is great tool for collaborative development and version management. We use git (behind the scene) to keep your VM up to date with the myriad of tools and data that we will use in this course. While we don’t require that you know git, we encourage you to explore it further because it can be very useful for your team project.

Follow these steps carefully:

1. Point your Web browser (either on your VM or your host—it doesn’t matter) to the Duke GitLab website, and sign in with your Duke netid. From your Dashboard view, click “Manage SSH keys.” Then click “Add SSH key” on the right. A text box will open up waiting for you to fill out; we will come to back to this.

2. Get a shell on your VM, and type in these commands:
wget -N

Follow the instructions. You will be asked to copy and paste your public key to the Duke gitorious website. Make sure you copy the entire public key (which spans multiple lines and should start with ssh-rsa and end with Switch back to your Web browser, paste the copied output into the text box, and click “Save.” After a short while, you will see a green check next to the key you just uploaded (if not, refresh the page or try adding the key again). At this point, switch back to your VM shell and hit ENTER to continue.

Note: When running, if you type something wrong and find that your BACKSPACE/DELETE key doesn’t work, just hit CONTROL-c and re-run bash when you are back at the shell prompt.

Note: When running, you might encounter a warning saying that the authenticity of host ‘ (’ can’t be established; it’s okay—just type yes to continue.

3. [NEED TO WORK ON THIS …] If all goes well, you will notice git pulling files from the course repository. Once it’s done, issue the following command in your VM shell:
This command will likely take quite a while as it installs a lot of tools necessary for the course. Throughout the course, you will need to re-run this command every now and then to keep your VM updated; we will remind you when it is necessary.

4. Reboot your VM. Assuming you use Vagrant and have been following instructions from Creating and Running VM, you should go back and continue with those instructions, which will walk you through the proper steps of rebooting.

Note: Although normally you should be able reboot from inside the VM shell using the command
sudo shutdown -r now
it unfortunately does NOT work with certain Vagrant features, so we recommend against it.