Git Product home page Git Product logo

afterglow-cloud's Introduction

AfterGlow-Cloud

About

AfterGlow Cloud is a visualization tool which lets users upload data and visualize the data as graphs on-the-fly. This project was part of Google's Summer of Code 2012 under the The Honeynet Project.

The core of this tool is based on the command-line tool AfterGlow. AfterGlow Cloud runs primarily on Django. A live demo can be found here.

Installation

Following provides installation requirements and procedure for AfterGlow Cloud. At a production level, since AfterGlow runs on Django; it can be deployed in a number of ways. This document however will only deal with deploying the application on Apache with mod_wsgi. If you choose to deploy it with another choice, please refer the to guidelines in the official Django documentation.

AfterGlow also requires a database system on its backend to handle its operations. Instructions below refer to using MySQL. You can again, however use any of the compatible systems that Django supports.

Instructions below are also specific to a machine running Ubuntu. If your targetted environment doesn't run Ubuntu you will have to satisfy the requirements below (specific to the distribution you are using) and then attempt to run the application.

###Requirements:

  • Apache 2 (or an alternate, see above)
  • mod_wsgi
  • MySQL (or an alternate, see above)
  • Python MySQL bindings (or an alternate, see above)
  • Python Imaging Library (PIL)
  • Django 1.4.0
  • GraphViz Library
  • Perl Text::CSV package
  • Django libraries:
  • ReCaptcha client
  • Easy thumbnails
  • OAuth2

You will also have to sign up for specific API keys and mention settings at settings.py (Step #6 below)

###Instructions:

  1. Most of the above packages can be installed on a Ubuntu machine with the following; even if you have a fresh install of Ubuntu. Missing packages (or all) are installed. It's also assumed that you'd want to install the application in your home folder, merely as an example (throughout the document):

$ sudo apt-get install git apache2 libapache2-mod-wsgi mysql-server libmysqlclient-dev
$ sudo apt-get install python-pip python-mysqldb libtext-csv-perl graphviz python-imaging

  1. Install Django 1.4.0 and the libraries AfterGlow requires:

~$ sudo pip install Django==1.4.0 recaptcha-client easy_thumbnails oauth2

  1. Clone this repository to obtain the application files:

~$ git clone https://github.com/ayrus/afterglow-cloud.git

  1. Change permissions of certain folders to rwxrwxrwx (these folders are written to by Apache while performing various operations):

$ cd afterglow-cloud/afterglow_cloud/
/afterglow-cloud/afterglow_cloud$ chmod 777 user_config/ user_data/ user_logs/ user_logs_parsed/
afterglow_cloud/app/static/gallery/ afterglow_cloud/app/static/gallery_thumbs/ afterglow_cloud/app/static/rendered/

  1. Create a database for AfterGlow to use (this example will use the database name as "af").

$ mysql -u user -p

Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.

Once logged in to the MySQL prompt, create the database:

mysql> create database af;

Query OK, 1 row affected (0.00 sec)

  1. Edit settings.py at afterglow_cloud/settings.py (if you're currently in ~/afterglow-cloud/afterglow_cloud). This file contains important configuration for the application to run. You'll have to edit Lines #10-88 with the instructions inside. The file has been commented in detail to help you out.

  2. Create tables in the database with Django's syncdb command.

~/afterglow-cloud/afterglow_cloud$ python ../manage.py syncdb

If everything went well, you should see something like this:

Creating tables ...
Creating table auth_permission
.
.
.
Installing custom SQL ...
Installing indexes ...
Installed 0 object(s) from 0 fixture(s)

  1. At this point, the application should be ready to run in a development environment (with django's runserver). To deploy it on Apache with mod_wsgi:

Open /etc/apache2/httpd.conf in an editor and add the following:
(your username is assumed to be foo, and as indicated earlier it's assumed that you've cloned the application files to your home folder).

WSGIPythonPath /home/foo/afterglow-cloud/afterglow_cloud

Alias /static/ /home/foo/afterglow-cloud/afterglow_cloud/afterglow_cloud/app/static/

<Directory /home/foo/afterglow-cloud/afterglow_cloud/afterglow_cloud/app/static>
Order deny,allow
Allow from all
</Directory>

WSGIScriptAlias / /home/foo/afterglow-cloud/afterglow_cloud/afterglow_cloud/wsgi.py

<Directory /home/foo/afterglow-cloud/afterglow_cloud/afterglow_cloud>
<Files wsgi.py>
Order deny,allow
Allow from all
</Files>
</Directory>

Note: Several assumptions have been made above.

  • You do not have any sites enabled on Apache. If you do, ideally the WSGIPythonPath declaration goes in /etc/apache2/httpd.conf and the rest of the above should go in your VirtualHost declaration for the site you want to enable/serve the application with.

  • It is also assumed that you'd want to use Apache to serve the static files as well. You can however serve it with another dedicated server as mentioned in the documentation.

  1. Reload and restart apache:

$ sudo service apache2 reload
$ sudo service apache2 restart

You should now have the application running in complete from your Apache server.
(if you followed these instructions as-is, this would ideally be at http://localhost ).

Links

Blog post detailing the features available in the first version can be viewed here.

Contacts / Bugs

Questions / Comments? Email us at [email protected].

afterglow-cloud's People

Contributors

ayrus avatar tanya-guza avatar zrlram avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.