From dd709066f7d0e53934a3def13fedc8a05821eea4 Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Wed, 3 Aug 2016 22:19:57 +0530 Subject: [PATCH] Update HACKING file with Vagrant information --- HACKING | 55 +++++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 41 insertions(+), 14 deletions(-) diff --git a/HACKING b/HACKING index 8b15e5df7..1acf58923 100644 --- a/HACKING +++ b/HACKING @@ -1,6 +1,33 @@ # Hacking -## Installing for Development +## Setting Up Development Environment Using Vagrant + +Vagrant is a free software command line utility for managing the life +cycle of virtual machines. FreedomBox project provides ready made +virtual machines for use with Vagrant. These images make setting up +of environment for Plinth development rather simple. + +1. Install Vagrant and VirtualBox: + + $ sudo apt install virtualbox vagrant + +2. Download, setup, run and configure virtual machine for Plinth + development using Vagrant: + + $ vagrant up + +3. To access Plinth, visit https://localhost:4430/plinth/ + +4. Make changes to the source code on your host machine as usual. + Then to make the changes reflect on the virtual machine, run: + + $ vagrant provision + +## Manually Setting Up for Development + +It is recommended that you use Vagrant to setup your development +environment. However, for some reason, you wish setup manually, the +following tips will help: 1. Instead of running "setup.py install" after every source modification, run the following command: @@ -34,6 +61,19 @@ You need to add 'actions' directory to be allowed for 'sudo' commands. See data/etc/sudoers.d/plinth for a hint. +### Testing Inside a Virtual Machine + +1. Checkout source on the host. + +2. Share the source folder and mount it on virtual machine. This could be done + over NFS, SSH-fs or 'Shared Folders' feature on VirtualBox. + +3. Run 'setup.py develop' or 'setup.py install' as described above on guest + machine. + +4. Access the guest machine's Plinth web UI from host after setting bridging or + NATing for guest virtual machine. + ## Running Tests 1. Run tests: @@ -58,19 +98,6 @@ indicate which statements or branches were executed via the tests (green) and which statements or branches were not executed (red). -## Testing Inside a Virtual Machine - -1. Checkout source on the host. - -2. Share the source folder and mount it on virtual machine. This could be done - over NFS, SSH-fs or 'Shared Folders' feature on VirtualBox. - -3. Run 'setup.py develop' or 'setup.py install' as described above on guest - machine. - -4. Access the guest machine's Plinth web UI from host after setting bridging or - NATing for guest virtual machine. - ## Building the Documentation Separately Plinth man page is built from DocBook source in the doc/ directory.