-
Notifications
You must be signed in to change notification settings - Fork 31
Setup a local development repository using a Vagrant VM
We will use Vagrant & Virtualbox to do local development with a VM..
Once all is setup (below) this is a normal workflow
$ vagrant resume $ vagrant ssh € ./start.sh
... work ...
€ ctrl c (to kill the Java server) € exit $ vagrant suspend
For clarity I used $ to represent the host computers terminal and € for the VM.
Download latest .dmg package and install from https://www.virtualbox.org/wiki/Downloads
Download latest .dmg package and install from http://downloads.vagrantup.com
In Vagrant a VM that is used to create other VMs to use for development is called a "base box" (or just box). The VM's where are using contains non public files so the VM files are keept within the walled garden of Google Drive. If you have permission a FLOW box can be downloaded from Google Drive: Akvo Dev > FLOW > Deployment & setup > boxes. At the time the current box to download is called akvo-flow_precise64_4.2.6_v2 and the file name is akvo-flow_precise64_4.2.6_v2.box. Download the file to your harddrive. This guide will use the ~/Downloads/ directory as the place where the file was downloaded to.
akvo-flow_precise64_4.2.6_v2.box (Akvo FLOW, Ubuntu Precise, 64 bit, Virtualbox 4.2.6, version 2 of the box)
$ cd ~/Download $ vagrant box add akvo-flow_precise64_4.2.6_v2 ./akvo-flow_precise64_4.2.6_v2.box
$ cd $ git clone git@github.com:akvo/akvo-flow.git $ git checkout -b feature/frontend origin/feature/frontend
We know have the feature/frontend branch "active", this is needed since there is code in that branch that helps Vagrant to operate.
Now lets start the VM
$ vagrant up
This will prompt from your password, this for Vagrant to be able to share a NFS folder with the host computer If all is fine we can now connect to our VM and fire up the Java server
$ vagrant ssh € ./start.sh (on VM. Convenience script that runs "ant runserver")
Once the server is running we can open an other terminal session on the host computer and navigate to our repo
$ cd $ cd Dashboard $ rake build && rake watch
You should now be able to see the local flow instance on http://33.33.33.6/dashboard.html. Do notice that you should set the Ember app to use Local VM as data source in the Admin section if that is wanted.
We can now shut down the VM with
€ exit $ vagrant suspend
if you want to resume the VM session you do
$ vagrant resume
You can always check the status of the VM with
$ vagrant status
About Akvo Flow
Akvo Flow API
Developer Guides
- Deployments
- Development tools
- Android emulator setup
- Creating New Dashboard Instances
- Disabling Dashboard Instances
- Adding Translations to Dashboards
- Setup your development environment with IntelliJ IDEA
- Setup your development environment on Windows OS
Technical Specification
Regression Tests