Skip to content
Matt Magoffin edited this page Feb 2, 2015 · 25 revisions

SolarNetwork Developer Virtual Machine Guide

This guide describes how to set up a SolarNetwork development virtual machine (VM) using Virtual Box and Vagrant. This is a convenient way to get started with SolarNetwork development, as all the required software will be available in the VM. The VM features:

  1. Ubuntu host with minimal X window manager
  2. Postgres server with plv8 for SolarNet development
  3. pgAdmin III Postgres GUI
  4. Eclipse IDE
  5. Firefox web browser
  6. Cloned SolarNetwork git repositories
  7. Basic developer configuration

Requirements

The VM requires Virtual Box and is initially set up using Vagrant. Install both of these before continuing. The VM will be allocated 1GB of RAM by default, but you may want to configure more if your system has enough RAM. The VM will also be allocated a 20 GB disk image (although only a few GB will be used at the start), so you must have that much disk space available.

Virtual Machine setup

Download the solarnetwork-dev repository, or clone it via https://github.com/SolarNetwork/solarnetwork-dev.git. Once downloaded or cloned, perform the following:

cd solarnetwork-dev/vagrant/solarnet-dev
vagrant up

Vagrant will download the VM image and then start configuring the SolarNetwork environment. This can take some time, as the image itself must be downloaded as well several hundred MB of software packages. You should see output similar to this:

Bringing machine 'solarnet' up with 'virtualbox' provider...
==> solarnet: Importing base box 'ubuntu/trusty32'...
==> solarnet: Matching MAC address for NAT networking...
==> solarnet: Checking if box 'ubuntu/trusty32' is up to date...
==> solarnet: Setting the name of the VM: SolarNet Dev
...

SolarNetwork development environment setup complete. Log into the VM as
solardev:solardev and Eclipse will launch automatically. Right-click on
the desktop to access a menu of other options. 

Eclipse setup

When Eclipse first launches, it won't have any projects configured. A Team Project Set will have been created for you that contains all the SolarNetwork projects. Import this now by selecting File > Import... > Team > Team Project Set.

Click Next > and in the dialog that follows, enter a File path of /home/solardev/SolarNetworkTeamProjectSet.psf (or use the Browse... button to select this file), and then click Finished. This will import all the projects into Eclipse.

Clone this wiki locally