Skip to the content.

Setting up a VM for Local Development

In this class, it is important that we have a unified environment for doing development. Since Rhodes does not dictate a particular environment, each of your computers may run different operating systems, have different tools installed, etc.

If your computer is running OSX or a Linux variant, your operating system is compatible with the environment that we will be using. You may have to install software and change your environment, but you will be ok doing development out of the box. If you are running Windows, you will have some friction.

Instead of asking you to install a bunch of tools and software, you can run a virtual machine on your computer that has an environment that works out of the box for course.

Note, if you are already using Linux, you can probably just install the tools required. See this section below

What’s a virtual machine?

A virtual machine (VM) is a computer that, like a physical computer, runs an operating system (e.g., MacOS, Windows, etc.) and associated applications. However, unlike a physical computer, a virtual machine is entirely comprised of software.

This means that you run a program that acts as a computer that you can install software on, log in to, and use as if it were a separate physical computer.

Essentially VMs allows you to use one computer with one host operating system (e.g., MacOS) to run one or more guest VMs with (potentially different) operating systems.

Why VMs?

It’s really important that you have the correct software and libraries installed on your computer. If you don’t you to have to worry about installing a bunch of software that you’re not familiar with, or modifying your own computer, you can just run a VM that has the correct environment for doing development.

So, I’ll provide you with a VM image (basically a template VM) that you can run. This VM will have everything that you need for the class installed, and you never will have to worry about trying to configure your computer to work for the course. If the environment for the course changes, you’ll run a command or two that will automatically upgrade the VM.

Step 1 in doing this is installing a virtualization environment (i.e., “tool that can manage, start, and stop VMs”). There are several products you could use for this (VMWare and Parallels are popular commercial products), but VirtualBox is a free and open source virtualization environment that will be perfectly suitable for this course.

Setting up your course environment

  1. First, download and install VirtualBox.
  2. Next, download the course VM image. Warning: This is a large file (~4GB).
  3. To install the image, open VirtualBox and click on File -> Import Appliance (VirtualBox calls VM images “appliances”).
    1. In the dialog box that pops up, select the .ova file you downloaded and click continue.
    2. The resulting dialog box asks you to configure machine parameters. For now, accept the defaults and continue (or change the name, if you want).
    3. At this point, you now should have a VM that shows up in the list of VMs in VirtualBox. Before you start the VM, we will do a little more configuration. Click on the machine and click on “settings.”
      • Verify that the VM has 2048 MB of memory. Depending on your computer, this may be a lot, and we can turn this down in the future.
      • On MacOS (especially the latest versions), I have had stability trouble with VirtualBox. This ended up being related to the virtual video card configuration.

        To avoid this, go to the Display settings menu. Give your machine 64 MB of video memory and set the Graphics Controller to VBoxSVGA. Make sure “Enable 3D Acceleration” is clicked.

        If you have a Windows or Linux computer, this may not be necessary, but in general, giving the VM more video memory will result in a smoother experience.

  4. To start your newly-created VM, click on it and click “Start.” You can then take control of the system using your mouse/keyboard and use it as if it were any other computer.
  5. Your username and password for the VM are both dev.
  6. Congratulations! You now have your computer set up for this class!

The next step now is to take some time to familiarize yourself with the basics of Ubuntu.

  1. Familiarize yourself with Ubuntu Linux.
  2. Familiarize yourself with a Unix command line and an editor.

Updating the course environment

If, during the course of the semester I update the tools required for the class, you can update your VM without reinstalling it.

Open a terminal, update the already-installed script that installs the class environment:

cd class-env-setup
git pull
sudo ./install.sh
sudo ./optional.sh

Note that these instructions may change.

If you already use Linux

If you already use Linux, that’s fine, you can ensure that you have an appropriate environment by using the script provided via Github. This is the script that is used to initialize the images for the class.