Skip to content

afgane/ghem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Running the server during development

To run this Django application locally, start by installing Python and virtualenv. When developing locally, build a local virtualenv, install the dependencies and start the server:

$ cd <project root dir>
$ git clone https://github.com/afgane/ghem.git
$ virtualenv .
$ source bin/activate
$ pip install -r ghem/requirements.txt
$ python ghem/ghem/manage.py runserver

Production deployment

To deploy this app on an machine (e.g., cloud image), have it run behind a web proxy (e.g., nginx), and start at machine boot, do the following steps. By default, scripts included in the repository assume the code is cloned to (i.e., the project root directory is) /home/ubuntu/weather.

  1. Do all of the above above steps excluding starting the development server
  2. Place nginx.conf in ?/nginx/conf/. directory
  3. Make sure nginx starts at instance boot (already happens for CloudMan images)
  4. Place ghem_upstart.conf in /etc/init (to test that the service invocation works, make sure nginx is running and then start the service with: service ghem_upstart start)
  5. Clean up and bundle the image (if using CloudBioLinux scripts, this can be done with the following command: fab -f fabfile.py -u ubuntu -i [key] -H [ip] install_biolinux:target=cleanup)

Logging and debugging

The default location for the source of the Django app is /home/ubuntu/weather. The app starts up via an Upstart job service ghem_upstart status|start|stop|restart and runs run_gunicorn.sh from the source repo.

The location of the log file for the Django app is specified in run_gunicorn.sh file (defaults to /tmp/log/gunicorn/ghem.log).

All of the models to be run are stored in /var/opt/IMOGEN/

The job manager (i.e., SGE) scripts are stored in [DRMAAJobRunner.jobs_working_dir]/run_##.sh, which defaults to /mnt/transient_nfs/ghem/jobs_working_dir. The stdout/err for those scripts is stored in the same directory with names matching the submission script and .out/.err extensions.

The locations of CloudMan log files, which is used to orchestrate the setup of the system, are in the the following locations:

  1. /opt/cloudman/pkg/ec2autorun.log
  2. /tmp/cm/cm_boot.log
  3. /mnt/cm/paster.log

About

Imogen Portal

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published