Setting up development environment - 2langnic/GlobaLeaks GitHub Wiki
This guide will help you to set up the environment for developing on globaleaks.
In this guide (evolving during the development) you will find updated information to get engaged in the development of GlobaLeaks.
Requirements
We assume installed on your system:
- Python version 2.7 already available on your system;
Clone the repository:
git clone https://github.com/globaleaks/GlobaLeaks.git
```
Install updated Pip, NodeJS, Grunt and Bower
###
````bash
curl -sL https://deb.nodesource.com/setup | sudo bash -
sudo apt-get update
sudo apt-get install build-essential nodejs python-pip libssl-dev libffi-dev
sudo npm install -g grunt grunt-cli bower
```
Set up the client:
```bash
cd GlobaLeaks/client
npm install
bower update
```
Set up the backend and it's dependencies
```bash
cd GlobaLeaks/backend
virtualenv -p python2.7 glenv
source glenv/bin/activate
python setup.py develop --always-unzip
```
### Starting GlobaLeaks on Development Environment
Usually the init script provided by the [GlobaLeaks
package](https://github.com/globaleaks/GlobaLeaks) works in system path like
/var/globaleaks to store instance files, and /usr/share/globaleaks to store
static file like the javascript+html client served by the backend service.
In this environment, you can't rely on these path, therefore you need to specify that the path are changed. This can be done with the options "-z" (development mode):
./backend/bin/globaleaks -z -d -n
If you want to run globaleaks over the server ethernet IP address, useful if you are running it into a VM and would like to access it, you need to add the "-a" and "-i" options as follow (assuming the IP of the VM running globaleaks is 172.16.225.238):
./bin/globaleaks -z -d -n -i 172.16.225.238 -a 172.16.225.238
**Other useful options**
* -l DEBUG: enable verbose debug logging
* -t: enable twisted logging
* -n: do not run in background, ^C kill the process
* -d: disable Tor usage for send notification.
When is stated, you will see the URL exposed by the service:
2013-04-30 15:50:44+0200 Visit http://127.0.0.1:8082 to interact with me
2013-04-30 15:50:44+0200 Visit http://localhost:8082 to interact with me
Read well the available options with
bin/globaleaks -h
and eventually modify the settings.py file, to hack on static variable.
emacs globaleaks/settings.py
### Unit testing
Globaleaks, following twisted's unit-testing workflow, uses [trial](http://twistedmatrix.com/documents/current/core/howto/trial.html), which should be already present on your environment after installing twisted.
Check that everything is ok running the unit tests:
```
cd backend/
python setup.py test
```
In case of error, please consider solving it and then reporting to https://github.com/globaleaks/globaleaks/issues
### Code
Congratulations! You are now ready to contribute to the Globaleaks project or to customize your own Globaleaks Client installation.
If you've some issue, please check the [Troubleshooting Guide](https://github.com/globaleaks/GlobaLeaks/wiki/Troubleshooting-guide)