PageRenderTime 53ms CodeModel.GetById 27ms RepoModel.GetById 1ms app.codeStats 0ms

/README.rst

https://github.com/ceari/edacc_web
ReStructuredText | 177 lines | 135 code | 42 blank | 0 comment | 0 complexity | 4c377af40e547b076894d8a1688d8359 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://edacc.github.io/ 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 provides a simple way to publish experiment information and results on
  9. the web that can be accessed using a web browser.
  10. It features graphical and statistical analysis options, using the language R
  11. to draw various graphs and lets users see the solver configurations and instances used in an experiment
  12. as well 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.8 (Micro Webframework)
  26. - Flask-WTF 0.3.3 (Flask extension for WTForms)
  27. - Flask-Actions 0.5.2 (Flask extension)
  28. - Flask-Mail (Flask extension)
  29. - Flask-KVSession (Flask extension)
  30. - Werkzeug 0.8 (Webframework, Flask dependency)
  31. - Jinja2 2.5 (Template Engine)
  32. - PyLZMA 0.4.2 (Python LZMA SDK bindings)
  33. - rpy2 2.1.4 (Python R interface)
  34. - pbkdf2 (Python PBKDF2 hash function implementation)
  35. - PIL 1.1.7
  36. - numpy 1.5.1
  37. - pygame 1.9
  38. - lxml 2.3
  39. - scikits.learn (borgexplorer plugin dependency)
  40. - scipy (borgexplorer plugin dependency)
  41. - R 2.11 (language for statistical computing and graphics)
  42. - R packages 'np', 'ellipse', 'fields', 'surv2sample', 'akima', 'RColorBrewer' (available via CRAN)
  43. - python-memcached v1.45 + memcached 1.4.5 (optional, enable/disable in config.py)
  44. Development Installation Guide
  45. ------------------------
  46. 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,
  47. using e.g. the distribution's package manager) to get the development server running. The development server is not suited
  48. for anything but personal use.
  49. To get rpy2 working the GNU linker (ld) has to be able to find libR.so. Add the folder containing
  50. libR.so (usually /usr/lib/R/lib) to the ld config: Create a file called R.conf containing the
  51. path in the folder /etc/ld.so.conf.d/ and run ldconfig without parameters as root to update.
  52. Additionally, you have to install the R package 'np' which provides non-parametric statistical
  53. methods. This package can be installed by running "install.packages('np')" within the R interpreter.
  54. 1. Install R and configure ld as described above
  55. 2. Create a virtual python environment in some directory outside(!) the extracted edacc_web-1.0/ directory::
  56. > virtualenv env
  57. 3. Activate the virtual environment: (This will set up some environment variables in your bash session so
  58. Python packages are installed to the virtual environment)::
  59. > source env/bin/activate
  60. 4. Install the web frontend python package into the virtual environment. If there are errors read 5) and run setup.py again after::
  61. > python setup.py install
  62. 5. Install the dependencies that can't be installed by the setup procedure. Some of them need to be compiled and require the
  63. appropriate libraries. On most linux distributions you can find binaries in the package manager.
  64. This applies mostly to numpy, mysql-python, rpy2 and pygame::
  65. > Ubuntu: apt-get install python-numpy python-pygame python-mysqldb python-rpy2
  66. > Arch Linux: pacman -S python-pygame python2-numpy mysql-python
  67. 6. Adjust the configuration in "env/lib/python<PYTHONVERSION>/site-packages/edacc_web-1.0-py<PYTHONVERSION>.egg/edacc/local_config.py"
  68. 7. Copy the server.py file from the edacc_web-1.0 directory to some directory and delete the edacc_web-1.0 directory.
  69. 8. Run "python server.py" which will start a web server on port 5000 listening on all IPs of the machine (Make sure
  70. the virtual environment is activated, see 3.)
  71. Summary:
  72. pip install mysql-python pil pylzma numpy scipy flask flask-cache flask-wtf flask-actions flask-mail flask-kvsession rpy2 lxml scikits.learn sqlalchemy
  73. Installation
  74. ------------
  75. The preferred installation method is behind a full scale web server like Apache instead of the builtin development server.
  76. To get rpy2 working the GNU linker (ld) has to be able to find libR.so. Add the folder containing
  77. libR.so (usually /usr/lib/R/lib) to the ld config: Create a file called R.conf containing the
  78. path in the folder /etc/ld.so.conf.d/ and run ldconfig without parameters as root to update.
  79. Additionally, you have to install the R package 'np' which provides non-parametric statistical
  80. methods. This package can be installed by running "install.packages('np')" within the R interpreter (as root).
  81. The following installation example outlines the step that have to be taken to install the web frontend on Ubuntu 10.04
  82. running on the Apache 2.2.14 web server. For performance reasons (e.g. query latency) the web frontend should run on the
  83. same machine that the EDACC database runs on::
  84. - Install Apache and the WSGI module:
  85. > apt-get install apache2 libapache2-mod-wsgi
  86. - Copy the web frontend files to /srv/edacc_web/, create an empty error.log file and change their ownership to the Apache user:
  87. > touch /srv/edacc_web/error.log
  88. > chown www-data:www-data -R /srv/edacc_web
  89. - Create an Apache virtual host file at /etc/apache2/sites-available/edacc_web, containing:
  90. <VirtualHost *:80>
  91. ServerAdmin email@email.com
  92. ServerName foo.server.com
  93. LimitRequestLine 51200000
  94. WSGIDaemonProcess edacc processes=1 threads=15
  95. WSGIScriptAlias / /srv/edacc_web/edacc_web.wsgi
  96. Alias /static/ /srv/edacc_web/edacc/static/
  97. <Directory /srv/edacc_web>
  98. WSGIProcessGroup edacc
  99. WSGIApplicationGroup %{GLOBAL}
  100. Order deny,allow
  101. Allow from all
  102. </Directory>
  103. <Directory /srv/edacc_web/edacc/static>
  104. Order allow,deny
  105. Allow from all
  106. </Directory>
  107. </VirtualHost>
  108. - Install dependencies and create a virtual environment for Python libraries:
  109. > apt-get install python-pip python-virtualenv python-scipy python-pygame python-imaging python-numpy python-lxml
  110. > virtualenv /srv/edacc_web/env
  111. > apt-get build-dep python-mysqldb
  112. > apt-get install r-base
  113. > echo "/usr/lib/R/lib" > /etc/ld.so.conf.d/R.config
  114. > ldconfig
  115. > source /srv/edacc_web/env/bin/activate
  116. > pip install mysql-python
  117. > pip install rpy2
  118. > pip install flask flask-wtf flask-actions flask-mail flask-cache flask-kvsession
  119. > pip install sqlalchemy pylzma pbkdf2
  120. - Install R libraries ("R" launches the R interpreter):
  121. > R
  122. > (in R) install.packages('np')
  123. - Create a WSGI file at /srv/edacc_web/edacc_web.wsgi with the following content:
  124. import site, sys, os
  125. site.addsitedir('/srv/edacc_web/env/lib/python2.6/site-packages')
  126. sys.path.append('/srv/edacc_web')
  127. sys.path.append('/srv/edacc_web/edacc')
  128. os.environ['PYTHON_EGG_CACHE'] = '/tmp'
  129. sys.stdout = sys.stderr
  130. from edacc.web import app as application
  131. - Configure the web frontend by editing /srv/edacc_web/edacc/config.py
  132. - Enable the Apache virtual host created earlier:
  133. > a2ensite edacc_web
  134. > service apache2 restart
  135. The web frontend should now be running under http://foo.server.com/