commit d61c0ee7381789d0c71a9e5c3a3bbc5324026dbb Author: iwakeh iwakeh@torproject.org Date: Mon Jul 25 22:39:20 2016 +0200
Removed Vagrant and added links to wiki guide docs. --- CONTRIB.md | 90 ++-------------------------------------------------- Vagrantfile | 19 ----------- vagrant/bootstrap.sh | 30 ------------------ 3 files changed, 3 insertions(+), 136 deletions(-)
diff --git a/CONTRIB.md b/CONTRIB.md index d971ec4..a432069 100644 --- a/CONTRIB.md +++ b/CONTRIB.md @@ -1,92 +1,8 @@ # Contributor Guide
-This guide is meant for people who want to contribute patches to Onionoo. -It contains the following sections: - - - Patch format - - Whitespace conventions - - Vagrant-based development environment - - Documentation overview - - Versions - -## Patch format - -Format your patches using `git format-patch` if you want to submit just a -single, small commit. -If you want to submit more than one commit, push your changes to a public -Git repository somewhere that can be pulled from. - -## Whitespace conventions - -Whitespace conventions are important, because whitespace changes bloat -patches and make them harder to review. -If we all agree on the same whitespace conventions, the only changes to -review are actually meaningful changes. -If you need to make whitespace changes, because files did not conform to -whitespace conventions before, do these changes in one or more separate -commits that contain nothing else than whitespace changes. - -The following whitespace conventions apply: - - - Maximum line width is 74 characters. Why 74? Because it looks pretty -in vim in a 80-character terminal with line numbers turned on. - - Full sentences are followed by a period and two spaces. An exception -to this rule are sentences in markup files like Markdown; in this case, -each sentence should start with a newline, so that a change in one -sentence doesn't cause changes to all subsequent sentences. An exception -to this exception are multiple sentences in a single bullet point. - - Indentations use two spaces, no tabs. Continuations use four spaces. - - Attributes and methods are typically separated by two newlines. An -exception are attributes with getters and setters which can be written -without separating newlines. - - All source files end with two newlines. - -## Vagrant-based development environment - -Before using Vagrant, make sure that Onionoo builds correctly on the host -system. -This may require running `git submodule init && git submodule update`, as -well as providing all required libraries. - -The given Vagrant file uses Version 2, i.e., a Vagrant installation -of version 1.1 or above is necessary. -The following was tested using 1.4.3 and VirtualBox 4.3.14. -(Wheezy stable only provides 1.0.3, Jessie provides 1.4.3) - -Local changes to the Vagrantfile: -Tell Vagrant how much memory the virtual machine may use, i.e., change - -``` -vb.memory = 4096 -``` - -to some value that makes sense on your machine. -Rule of thumb: less than half the RAM, but as much as you want to spare. - -Create a Debian Wheezy 64 bit instance: - -``` -vagrant up -``` - -This command downloads the virtual machine imagine, unless it has been -downloaded before, creates a new virtual machine, and runs the bootstrap -script in `vagrant/bootstrap.sh`. This may take a few minutes. - -Once this is all done, log into the virtual machine and change to the -Onionoo working directory: - -``` -vagrant ssh -cd /srv/onionoo.torproject.org/onionoo/ -``` - -Important: better avoid runninng Ant in the `/vagrant/` directory (which -is shared with the host), or the guest system will write directly to the -host system, which performs not really well. - -Read the INSTALL file and make the appropriate changes to adapt everything -to your setup, e.g., memory settings. +Please refer to our Contributor and Java coding style documents +available in The Tor Project's wiki: +https://trac.torproject.org/projects/tor/wiki/org/teams/MetricsTeam/Document...
## Documentation overview
diff --git a/Vagrantfile b/Vagrantfile deleted file mode 100644 index c30e452..0000000 --- a/Vagrantfile +++ /dev/null @@ -1,19 +0,0 @@ -VAGRANTFILE_API_VERSION = "2" - -Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| - - config.vm.box = "wheezy64" - config.vm.box_url = "http://puppet-vagrant-boxes.puppetlabs.com/debian-73-x64-virtualbox-puppet.b..." - - config.vm.boot_timeout = 60 - - config.vm.network "forwarded_port", guest: 8080, host: 8080 - - config.vm.provider "virtualbox" do |vb| - vb.memory = 4096 - end - - config.vm.provision :shell, :path => "vagrant/bootstrap.sh" - -end - diff --git a/vagrant/bootstrap.sh b/vagrant/bootstrap.sh deleted file mode 100644 index 13138cc..0000000 --- a/vagrant/bootstrap.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env bash - -echo "Starting provisioning." - -echo "Updating package list and upgrading existing packages." -apt-get update -apt-get -y upgrade - -echo "Removing Java 6 packages." -apt-get purge -y openjdk-6-jdk default-jre - -echo "Installing required packages." -apt-get install -y openjdk-7-jdk -apt-get install -y libcommons-codec-java libcommons-compress-java \ -libcommons-lang3-java libgoogle-gson-java junit4 libservlet3.0-java \ -ant libslf4j-java liblogback-java unzip libjetty8-java - -echo "Setting up paths and creating symbolic links." -mkdir -p /srv/onionoo.torproject.org/onionoo/ -cd /srv/onionoo.torproject.org/onionoo/ -ln -s /vagrant/build.xml -ln -s /vagrant/deps -ln -s /vagrant/etc -ln -s /vagrant/geoip -ln -s /vagrant/src -ln -s /vagrant/web -chown -R vagrant:vagrant /srv/onionoo.torproject.org/ - -echo "Done provisioning." -