PageRenderTime 64ms CodeModel.GetById 34ms RepoModel.GetById 0ms app.codeStats 0ms

/docs/overview.rst

https://github.com/ceari/edacc_web
ReStructuredText | 171 lines | 129 code | 42 blank | 0 comment | 0 complexity | d38460bcc5fbba1cb5ee67a65839934d MD5 | raw file
Possible License(s): JSON, BSD-3-Clause
  1. EDACC Web Frontend
  2. ==================
  3. Experiment Design and Administration for Computer Clusters for SAT Solvers.
  4. See http://sourceforge.net/projects/edacc/ for the EDACC project.
  5. An instance of this web frontend is running at http://edacc2.informatik.uni-ulm.de
  6. Description
  7. -----------
  8. This project accompanies the EDACC Java Swing application and provides a simple way to publish
  9. experiment information and results on the web that can be accessed using a web browser.
  10. It features the same graphical analysis options as the Java application using the language R
  11. to draw various graphs and lets users see the solver configurations and instances used in an experiment
  12. aswell as the individual jobs that were run.
  13. Additionally, you can set up an EDACC database to run a solver competition, where users can register
  14. and submit solvers using the web frontend.
  15. Implementation
  16. --------------
  17. This web application is written in Python and due to using Werkzeug and Flask (web frameworks) it is
  18. WSGI-compatible, which means it can be deployed on any web server supporting Python and WSGI.
  19. (e.g. Apache (using mod_wsgi), lighttpd, nginx, Tornado, just to name a few)
  20. Dependencies
  21. ------------
  22. - Python 2.6.5 or 2.7.1 http://www.python.org
  23. - SQLAlchemy 0.6.5 (SQL Toolkit and Object Relational Mapper)
  24. - mysql-python 1.2.3c1 (Python MySQL adapter)
  25. - Flask 0.6 (Micro Webframework)
  26. - Flask-WTF 0.3.3 (Flask extension for WTForms)
  27. - Flask-Actions 0.5.2 (Flask extension)
  28. - Werkzeug 0.6.2 (Webframework, Flask dependency)
  29. - Jinja2 2.5 (Template Engine)
  30. - PyLZMA 0.4.2 (Python LZMA SDK bindings)
  31. - rpy2 2.1.4 (Python R interface)
  32. - PIL 1.1.7
  33. - numpy 1.5.1
  34. - pygame 1.9
  35. - scikits.learn (borgexplorer plugin dependency)
  36. - scipy (borgexplorer plugin dependency)
  37. - R 2.11 (language for statistical computing and graphics)
  38. - R package 'np' (available via CRAN)
  39. - python-memcached v1.45 + memcached 1.4.5 (optional, enable/disable in config.py)
  40. Quick Installation Guide
  41. ------------------------
  42. To illustrate an installation here's what you would have to do on a linux system (assuming Python, python-pip and python-virtualenv are installed,
  43. using e.g. the distribution's package manager) to get the development server running. The development server is not suited
  44. for anything but personal use.
  45. To get rpy2 working the GNU linker (ld) has to be able to find libR.so. Add the folder containing
  46. libR.so (usually /usr/lib/R/lib) to the ld config: Create a file called R.conf containing the
  47. path in the folder /etc/ld.so.conf.d/ and run ldconfig without parameters as root to update.
  48. Additionally, you have to install the R package 'np' which provides non-parametric statistical
  49. methods. This package can be installed by running "install.packages('np')" within the R interpreter.
  50. 1. Install R and configure ld as described above
  51. 2. Create a virtual python environment in some directory outside(!) the extracted edacc_web-1.0/ directory::
  52. > virtualenv env
  53. 3. Activate the virtual environment: (This will set up some environment variables in your bash session so
  54. Python packages are installed to the virtual environment)::
  55. > source env/bin/activate
  56. 4. Install the web frontend python package into the virtual environment. If there are errors read 5) and run setup.py again after::
  57. > python setup.py install
  58. 5. Install the dependencies that can't be installed by the setup procedure. Some of them need to be compiled and require the
  59. appropriate libraries. On most linux distributions you can find binaries in the package manager.
  60. This applies mostly to numpy, mysql-python, rpy2 and pygame::
  61. > Ubuntu: apt-get install python-numpy python-pygame python-mysqldb python-rpy2
  62. > Arch Linux: pacman -S python-pygame python2-numpy mysql-python
  63. 6. Adjust the configuration in "env/lib/python<PYTHONVERSION>/site-packages/edacc_web-1.0-py<PYTHONVERSION>.egg/edacc/local_config.py"
  64. 7. Copy the server.py file from the edacc_web-1.0 directory to some directory and delete the edacc_web-1.0 directory.
  65. 8. Run "python server.py" which will start a web server on port 5000 listening on all IPs of the machine (Make sure
  66. the virtual environment is activated, see 3.)
  67. Installation
  68. ------------
  69. The preferred installation method is behind a full scale web server like Apache instead of the builtin development server.
  70. To get rpy2 working the GNU linker (ld) has to be able to find libR.so. Add the folder containing
  71. libR.so (usually /usr/lib/R/lib) to the ld config: Create a file called R.conf containing the
  72. path in the folder /etc/ld.so.conf.d/ and run ldconfig without parameters as root to update.
  73. Additionally, you have to install the R package 'np' which provides non-parametric statistical
  74. methods. This package can be installed by running "install.packages('np')" within the R interpreter (as root).
  75. The following installation example outlines the step that have to be taken to install the web frontend on Ubuntu 10.04
  76. running on the Apache 2.2.14 web server. For performance reasons (e.g. query latency) the web frontend should run on the
  77. same machine that the EDACC database runs on::
  78. - Install Apache and the WSGI module:
  79. > apt-get install apache2 libapache2-mod-wsgi
  80. - Copy the web frontend files to /srv/edacc_web/, create an empty error.log file and change their ownership to the Apache user:
  81. > touch /srv/edacc_web/error.log
  82. > chown www-data:www-data -R /srv/edacc_web
  83. - Create an Apache virtual host file at /etc/apache2/sites-available/edacc_web, containing:
  84. <VirtualHost *:80>
  85. ServerAdmin email@email.com
  86. ServerName foo.server.com
  87. LimitRequestLine 51200000
  88. WSGIDaemonProcess edacc processes=1 threads=15
  89. WSGIScriptAlias / /srv/edacc_web/edacc_web.wsgi
  90. Alias /static/ /srv/edacc_web/edacc/static/
  91. <Directory /srv/edacc_web>
  92. WSGIProcessGroup edacc
  93. WSGIApplicationGroup %{GLOBAL}
  94. Order deny,allow
  95. Allow from all
  96. </Directory>
  97. <Directory /srv/edacc_web/edacc/static>
  98. Order allow,deny
  99. Allow from all
  100. </Directory>
  101. </VirtualHost>
  102. - Install dependencies and create a virtual environment for Python libraries:
  103. > apt-get install python-pip python-virtualenv python-scipy python-pygame python-imaging python-numpy
  104. > virtualenv /srv/edacc_web/env
  105. > apt-get build-dep python-mysqldb
  106. > apt-get install r-base
  107. > echo "/usr/lib/R/lib" > /etc/ld.so.conf.d/R.config
  108. > ldconfig
  109. > source /srv/edacc_web/env/bin/activate
  110. > pip install mysql-python
  111. > pip install rpy2
  112. > pip install flask flask-wtf flask-actions
  113. > pip install sqlalchemy pylzma
  114. - Install R libraries ("R" launches the R interpreter):
  115. > R
  116. > (in R) install.packages('np')
  117. - Create a WSGI file at /srv/edacc_web/edacc_web.wsgi with the following content:
  118. import site, sys, os
  119. site.addsitedir('/srv/edacc_web/env/lib/python2.6/site-packages')
  120. sys.path.append('/srv/edacc_web')
  121. sys.path.append('/srv/edacc_web/edacc')
  122. os.environ['PYTHON_EGG_CACHE'] = '/tmp'
  123. sys.stdout = sys.stderr
  124. from edacc.web import app as application
  125. - Configure the web frontend by editing /srv/edacc_web/edacc/config.py
  126. - Enable the Apache virtual host created earlier:
  127. > a2ensite edacc_web
  128. > service apache2 restart
  129. The web frontend should now be running under http://foo.server.com/