Skip to content

Test Server Setup

Siqi Tian edited this page Feb 5, 2017 · 2 revisions

The following setup does not use Apache, thus not including Kerberos or WebAuth. This means for your test server, any /group/ page will be freely accessible, while any /admin/ page requires Django's login.

  • Follow README.md to install dependencies.
  • Clone the repository from https://github.com/DasLab/Server_DasLab.git.
  • Run util_prep_dir.sh to create necessary folders (empty).
  • Copy backup files either from AWS instance or from daslab Google Drive. Then run python manage.py restore to unpack static files and overwrite MySQL database tables. You may need to manually create a daslab table in MySQL first if not exists.
  • Use config/*.conf files from the backup. Remember to edit config/t47_dev.py to set IS_DEVEL to true (turns on DEBUG mode).
  • Start the test server with python manage.py runserver, and it should be listening at localhost:8000/. You may need to start MySQL service first, by mysql.server start.

Server Deployment

To set up a new server for production, you need to complete the following steps besides the ones above. Most of the system requirements/settings are in the config/sys/ folder in the backup files, which are handled by util_sys_asset.sh.

  • Store SSL Certificate on the server (currently at /home/ubuntu/.ssl_cert/). Use aws iam to register them to AWS console. See here.
  • Overwrite Apache settings from backup. See /admin/ref/ for more explanations.
  • Install django-filemanager.
  • Put yuicompressor.jar in the parent directory (used by util_minify.sh).
  • Soft link gdrive executable system-wide, and restore its settings (/home/ubuntu/.drive/).
  • (optional) bash settings and others (e.g. dircolors).

  • Change IS_DEVEL to false in config/t47_dev.py.
  • Run util_minify.sh and util_chmod.sh for preparing minified files and proper permissions.

Clone this wiki locally