Skip to content

Commit

Permalink
Fixes #354 -- Updated the README.md (#355)
Browse files Browse the repository at this point in the history
Changed the README.md with a more user-friendly installation guide,and updated the python version as the older versioni is not supported anymore.
  • Loading branch information
Parth1811 committed Mar 2, 2020
1 parent b123cc7 commit 97c7821
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 41 deletions.
64 changes: 35 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,17 @@ TANNER

<b><i>He who flays the hide</b></i>


About
--------
-----
TANNER is a remote data analysis, and classification service, to evaluate HTTP requests and composing the response then served by [SNARE](https://github.com/mushorg/snare) events.


Documentation
---------------
-------------
The documentation can be found [here](http://tanner.readthedocs.io).


Basic Concept
-------------

Expand All @@ -26,64 +29,67 @@ Basic Concept
Getting Started
---------------

- You need Python3. We tested primarily with **python 3.5**
- This was tested with a recent Ubuntu based Linux.

- You need Python3.6 and above for installing tanner.
- This was tested with a recent Ubuntu-based Linux.

### Setup Redis
### Steps to install TANNER

#### Step 1: Setup Redis

1. Install the Redis: ``sudo apt-get install redis-server``
2. Start it on ``localhost`` with default ``port``: ``redis-server``

### Setup PHP Sandbox
2. Run ``redis-server`` (to start it on `localhost` with default `port`)

#### Step 2: Setup PHP Sandbox

1. For PHP Sandbox setup, see sandbox [manual](https://github.com/mushorg/phpox)
2. In PHP Sandbox directory, run sandbox: ``sudo python3 sandbox.py``

### Setup Docker
#### Step 3: Setup Docker

1. Run ``sudo apt-get install docker-ce docker-ce-cli containerd.io``

1. Install [docker](https://docs.docker.com/engine/installation/linux/ubuntu/)
2. Pull the required image to use [default : ``busybox:latest``]

### Setup and run TANNER
For more info please see the detailed installation guide [here.](https://docs.docker.com/engine/installation/linux/ubuntu/)

#### Step 4: Setup and run TANNER

1. Get TANNER: `git clone https://github.com/mushorg/tanner.git`
2. Go to the TANNER source directory: ``cd tanner``
3. Install requirements: `pip3 install -r requirements.txt`
3. Install requirements: `sudo pip3 install -r requirements.txt`
4. Install TANNER: ``sudo python3 setup.py install``
5. Run TANNER: ``sudo tanner``
6. (Optional) For runnning TANNER Api ``sudo tannerapi``
7. (Optional) For runnning TANNER Web ``sudo tannerweb``

### Run Tanner Api

Run ``sudo tannerapi``
Note:- Make sure you have ```python3-dev`` incase you are facing problem with installing some requirments.
```
sudo apt-get install python3-dev
```

### Run Tanner WebUI
(Recommended) You should to bind to 0.0.0.0 when running in
<i>production</i> and on a different host than SNARE.

Run ``sudo tannerweb``
### Install and run TANNER using docker container

You obviously want to bind to 0.0.0.0 when running in <i>production</i> and on a different host than SNARE (recommended).
In case you want to run the TANNER service using docker or facing any problem
in setting up TANNER on your machine, you can follow these steps.

## Docker build instructions
1. Change current directory to `tanner/docker`
2. `docker-compose build`
3. `docker-compose up`
#### Docker build instructions
1. Change the current directory to `tanner/docker`
2. `sudo docker-compose build`
3. `sudo docker-compose up`

More information about running `docker-compose` can be found [here.](https://docs.docker.com/compose/gettingstarted/)

## Testing
Testing
-------

In order to run the tests and receive a test coverage report, we recommend running `pytest`:


pip install pytest pytest-cov
sudo pytest --cov-report term-missing --cov=tanner tanner/tests/

## Sample Output

Sample Output
-------------

```shell
# sudo tanner
Expand Down
24 changes: 12 additions & 12 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
aiohttp
aiomysql
aiohttp
aiomysql
aiohttp_jinja2==1.1.0
docker<2.6
mimesis<3.0.0
yarl
redis
aioredis
uvloop
pymongo
pylibinjection
jinja2
pycodestyle
docker<2.6
mimesis<3.0.0
yarl
redis
aioredis
uvloop
pymongo
pylibinjection
jinja2
pycodestyle
geoip2
aiodocker
tornado
Expand Down

0 comments on commit 97c7821

Please sign in to comment.