Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The idea is that Vagrant uses VirtualBox to provision a virtual machine for our pre-configured image, box. This virtual machine contains a fully integrated development environment, including everything you'll need to develop software for our team. Now open up a Git Bash window (on Windows) or a terminal window (on Mac), and run the following commands:

First, clone the repo: checkout the ubuntu-20.04 branch for the new box

Code Block
# Clone the repo
git clone https://github.com/uw-midsun/box.git && cd box
# checkout the ubuntu-20.04 branch for the new version of the box
git checkout ubuntu-20.04


Then, you will have to download our vagrant box:

...

Code Block
languagebash
# You should still be ssh'd into the box
# Check with whoami - it should say "vagrant"
whoami
# Access the shared folder - found at box/shared
cd ~/shared
# Clone the firmware repo
git clone https://github.com/uw-midsun/firmware_xiv.git && cd firmware_xiv
# Try to build the firmware
make build_allscons


Info

Note: Using passwords to authenticate Git operations with Github.com will soon be deprecated as shown here: Token Authentication Required

If you have already performed git clone with https, you will need to set up a token to be able to push any changes to our repo and you will need to enter this token in replacement of your password each time you push.

Alternatively, you can set up an ssh key to link it with your account so you don't have to re-enter you username and token each time you want to push. To learn how to add an ssh key you can run the commands in this tutorial within your VM: Add an SSH Key. Then, make sure to link it to your Github account. Also, if you have already performed git clone with https, you will need to switch to ssh by performing the command below. If you don't, you will constantly be prompted for your user/token still even if you've already added your ssh key and linked it to your Github account.

Code Block
languagebash
# Make sure you are in the git repo
cd firmware_xiv

# Switch from https to ssh
git remote set-url origin git@github.com:uw-midsun/firmware_xiv.git


...

Please use the email that's associated with your GitHub account.

Update existing box

to update existing boxes to ubuntu-20.04, navigate to your box folder

get the new box from the ubuntu-20.04 branch

Code Block
git fetch && git checkout ubuntu-20.04

you might also need to destroy the old box

Code Block
vagrant halt
vagrant destroy
vagrant up

after you ssh into the new box, you should see this message

Code Block
Welcome to Ubuntu 20.04.3 LTS

 * Documentation:  https://help.ubuntu.com        
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage   

 * Super-optimized for small spaces - read how we shrank the memory
   footprint of MicroK8s to make it the smallest full K8s around.

   https://ubuntu.com/blog/microk8s-memory-optimisation

if your message lists a ubuntu version other than 20.04, I don't know what happened, message ShiCheng on slack and we'll figure it out.

After updating the box, you may need to reconfigure your git configurations, follow the steps above.


Usage

Code Block
languagebash
# Bring up the virtual machine
# This step is only necessary after a reboot
vagrant up
# Access the box
vagrant ssh
# Move to the firmware_xiv folder
cd shared/firmware_xiv
# See https://github.com/uw-midsun/firmware_xiv #usage for some common commands
make [cmd] ...

# To exit the virtual machine press CTRL + D
# Stop the virtual machine
vagrant halt

...