Implements task-19015. Removed obsolete scripts and changed INSTALL.md

This commit is contained in:
iwakeh 2016-06-03 15:32:44 +02:00
parent e89f50ec0e
commit 295adfb877
8 changed files with 11 additions and 81 deletions

View File

@ -24,26 +24,12 @@ that you're using `/srv/collector.torproject.org/` as working directory,
but feel free to use another directory that better suits your needs.
$ sudo mkdir -p /srv/collector.torproject.org/
$ sudo chown vagrant:vagrant /srv/collector.torproject.org/
Install a few packages:
$ sudo apt-get install openjdk-6-jdk ant libcommons-codec-java \
libcommons-compress-java
Clone the metrics-db repository
-------------------------------
$ cd /srv/collector.torproject.org/
$ git clone https://git.torproject.org/metrics-db
Clone required submodule metrics-lib
------------------------------------
$ git submodule init
$ git submodule update
$ sudo apt-get ant junit4 libasm4-java libcommons-codec-java \
libcommons-compress-java libcommons-lang3-java libgoogle-gson-java \
liblogback-java liboro-java libslf4j-java libxz-java openjdk-7-jdk
Compile CollecTor
@ -55,26 +41,21 @@ $ ant compile
Configure the relay descriptor downloader
-----------------------------------------
Edit the config file and uncomment and edit at least the following line:
Run
$ java -DLOGBASE=/path/to/logs -jar collector-<version>.jar releaydescs
once in order to obtain a configuration properties file.
DownloadRelayDescriptors 1
Edit collector.properties and set at least the following value to true:
DownloadRelayDescriptors = true
Run the relay descriptor downloader
-----------------------------------
$ bin/run-relaydescs
$ java -DLOGBASE=/path/to/logs -jar collector-<version>.jar releaydescs
Set up an hourly cronjob for the relay descriptor downloader
------------------------------------------------------------
Ideally, run the relay descriptor downloader once per hour by adding a
crontab entry like the following:
6 * * * * cd /srv/collector.torproject.org/db/ && bin/run-relaydescs
Watch out for INFO-level logs in the `log/` directory. In particular, the
Watch out for INFO-level logs in the log directory you configured. In particular, the
lines following "Statistics on the completeness of written relay
descriptors:" is quite important.

View File

@ -1,20 +0,0 @@
handlers= java.util.logging.FileHandler, java.util.logging.ConsoleHandler
.level = FINER
# if the following dir pattern is changed, LOGGINGPATH='log' in run-all
# needs to be adapted.
java.util.logging.FileHandler.pattern = ./log/collector-%g.log
java.util.logging.FileHandler.limit = 5000000
java.util.logging.FileHandler.count = 9
java.util.logging.FileHandler.append = true
java.util.logging.FileHandler.level = FINER
java.util.logging.FileHandler.formatter = java.util.logging.SimpleFormatter
java.util.logging.ConsoleHandler.level = WARNING
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
java.util.logging.SimpleFormatter.format = %1$tF %1$tT %4$s %2$s %5$s%n
sun.net.www.level = SEVERE
sun.level = SEVERE

View File

@ -1,16 +0,0 @@
#!/bin/sh
TOKEN=`expr substr $1 5 20`
# if the path is changed in properties, this needs to be adapted.
LOGGINGPATH='log'
if ! test -d $LOGGINGPATH
then mkdir $LOGGINGPATH
fi
# the following uses one logging configuration for all modules
java -Xmx2g -Djava.util.logging.config.file=./bin/logging.properties -jar collector-0.9.0-dev.jar $TOKEN
# this would use a special log config for each module
# java -Xmx2g -Djava.util.logging.config.file=./bin/logging.$TOKEN.properties -jar collector-0.9.0-dev.jar $TOKEN

View File

@ -1,3 +0,0 @@
#!/bin/sh
`dirname $0`/run-all `basename $0`

View File

@ -1,3 +0,0 @@
#!/bin/sh
`dirname $0`/run-all `basename $0`

View File

@ -1,3 +0,0 @@
#!/bin/sh
`dirname $0`/run-all `basename $0`

View File

@ -1,3 +0,0 @@
#!/bin/sh
`dirname $0`/run-all `basename $0`

View File

@ -1,3 +0,0 @@
#!/bin/sh
`dirname $0`/run-all run-updateindex