chg: Change directory used to store raw data

pull/12/head
Raphaël Vinot 2018-04-01 19:05:48 +02:00
parent 3512290cc2
commit 595fa671d7
4 changed files with 43 additions and 6 deletions

View File

@ -1,18 +1,55 @@
# BGP-Ranking
New version of BGP Ranking, complete rewrite in python3.6+ and an ARDB backend
# Installation
**IMPORTANT**: run it in a virtualenv, seriously. This install guide assumes you know what it is, and use one.
## Install redis
```bash
git clone https://github.com/antirez/redis.git
cd redis
git checkout 4.0
make
make test
cd ..
```
## Install ardb
```bash
git clone https://github.com/yinqiwen/ardb.git
cd ardb
make
cd ..
```
## Install BGP Ranking
```bash
git clone https://github.com/D4-project/BGP-Ranking.git
cd BGP-Ranking
pip install -r requirements.txt
pip install -e .
export BGPRANKING_HOME='./'
start.py
```
# Directory structure
*Config files*: `listimport / modules_config / *.json`
*Config files*: `bgpranking / config / *.json`
*Per-module parsers*: `listimport / parsers`
*Per-module parsers*: `bgpraking / parsers`
*Libraries* : `listimport / libs`
*Libraries* : `brpranking / libs`
# Raw dataset directory structure
## Files to import
*Note*: The default location of `<storage_directory>` is the root directory of the repo.
`<storage_directory> / <vendor> / <listname>`
## Last modified date (if possible) and lock file

View File

@ -22,7 +22,7 @@ class ModulesArchiver():
if not config_dir:
config_dir = get_config_path()
if not storage_directory:
self.storage_directory = get_homedir()
self.storage_directory = get_homedir() / 'rawdata'
modules_config = config_dir / 'modules'
modules_paths = [modulepath for modulepath in modules_config.glob('*.json')]
self.modules = [DeepArchive(path, self.storage_directory, loglevel) for path in modules_paths]

View File

@ -21,7 +21,7 @@ class ModulesManager(AbstractManager):
if not config_dir:
config_dir = get_config_path()
if not storage_directory:
storage_directory = get_homedir()
storage_directory = get_homedir() / 'rawdata'
modules_config = config_dir / 'modules'
modules_paths = [modulepath for modulepath in modules_config.glob('*.json')]
self.modules = [Fetcher(path, storage_directory, loglevel) for path in modules_paths]

View File

@ -19,7 +19,7 @@ class ParserManager(AbstractManager):
if not config_dir:
config_dir = get_config_path()
if not storage_directory:
storage_directory = get_homedir()
storage_directory = get_homedir() / 'rawdata'
modules_config = config_dir / 'modules'
modules_paths = [modulepath for modulepath in modules_config.glob('*.json')]
self.modules = [RawFilesParser(path, storage_directory, loglevel) for path in modules_paths]