Skip to content
David Dinh edited this page Sep 24, 2013 · 4 revisions

A quick way to get started with Asp that avoids installing and configuring dependencies is to use our VirtualBox VM, which comes with all required dependencies.

  1. Install VirtualBox for your host platform from http://www.virtualbox.org/
  2. Download the Asp VirtualBox VM (390 MB)
  3. Open VirtualBox. In the VirtualBox manager, choose File -> Import Appliance. Select the .ova file, click Next, and then click Import.
  4. In the VirtualBox Manager, double-click the "Asp SEJITS Debian" VM.
  5. The virtual machine will then boot. Once the log-in prompt appears, log in with username "vagrant", password "vagrant".
  6. In your home directory there will be a directory called "asp". Do "cd asp" and then type "git pull" to download the latest version of Asp.
  7. To test that your Asp system is working correctly, run the unit tests with: ./run_tests.sh
  8. The VM window is fixed in size. To get a larger window with a scrollbar, you will need to SSH into your VM as follows:
    • If you are on Mac OS X, you may need to create a Host-Only Network. To do so:
      • Click VirtualBox menu -> Preferences -> Network.
      • Press the "+" button to the right of the list to add an adapter.
      • Press the screwdriver icon. For your IPv4 Address enter "192.168.56.1". Click "DHCP Server". In the four fields, enter: "192.168.56.1", "255.255.255.0", "192.168.56.2", and "192.168.56.255".
      • Reboot your VM by typing "sudo reboot -n" and log back in.
    • Type: "/sbin/ifconfig" and examine the "inet addr" next to "eth1". On your host machine, use an SSH client (such as PuTTY) to connect to this IP.
    • This will create a resizable console window. You can also use an SFTP or SCP client (such as WinSCP) to copy files between your host and the VirtualBox machine.
  9. VirtualBox's Shared Folders support is convenient for sharing files between the host and VM. To configure Shared Folders:
    • In the VM window, click Devices -> Shared Folders. Click the "+" icon to the right of the folders list.
    • In "Folder Path", enter a host file path that will be visible from inside the VM. Enter "share" for the "Folder Name". Check "Auto-mount" and "Make permanent". Click OK. Click OK.
    • Reboot the machine with "sudo reboot -n" and log back in.
    • Do: "ls /media/sf_share". You should see your shared host files. You can copy files to and from this directory to share them between the host and VM.
  10. At this point you are prepared to do Asp development.
    • You can edit Python files using a text editor inside the VM, or copy them into your shared directory and use a host editor. A variety of common text editors are preinstalled on the system, including Emacs, vim, and pico.
    • When you have changes to check in, you must use "git add" to add any files you have added or modified, "git commit -m """ to commit your changes locally, and "git push" to push your committed changes to the server. For more about Git, see the Git Book. You will need to get permission from us to do "git push".
      • Note: When you git push you will be asked to log in with your github username and password. You can also install your github SSH private key in ~/.ssh/id_rsa to avoid this prompt.
    • There is no build process for Python, since it's an interpreted language. Instead, you can create unit tests that exercise your code and run them. See existing unit tests (e.g. ~/asp/specializers/array_doubler/tests/arraydoubler_test.py and ~/asp/specializers/array_doubler/tests/run_tests.sh) for an example of how to do this.