Skip to content
This repository has been archived by the owner on Apr 19, 2022. It is now read-only.
/ miracle Public archive

Repeatable data analysis workflows for computational models

Notifications You must be signed in to change notification settings

comses/miracle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Digging into Data: Mining relationships among variables in large datasets from complex systems

Setup

We use docker compose to organize MIRACLE's components. These consist of Docker images for the following:

  • Container for a Django uWSGI application server and Celery running under supervisord. We are aware that Docker best practices call for one process per container, but in the interests of expediency and limited development resources we've bundled Django and celery together for the interim. If you'd like to help split them out, please send us a PR!
  • One container for an nginx reverse proxy
  • Container for a modified version of the Radiant business analytics Shiny app
  • Container for DeployR that provides our R script execution environment

First steps

Local development

  • Copy development.yml to docker-compose.yml
  • Copy and edit the Django settings files cp django/miracle/settings/local.py.example django/miracle/settings/local.py
  • Running docker-compose build && docker-compose up django will start a Django development server on port 8000

Production configuration and deployment

  • Copy production.yml to docker-compose.yml and edit the relevant environment variables for MIRACLE_ADMIN
  • Copy SSL certs and private key into the nginx directory as server.crt and server.key, respectively

Edit secrets manually

  • Copy deploy/deployr/deployr.conf.example to deploy/deployr/deployr.conf and change the username / passwords so that the deployr container will create a custom user that can be accessed from Django.
  • set matching postgresql user password in deploy/db/init-db-user.sh and django/miracle/settings/local.py

Build the images and spin up the docker containers

  • Build the images and start the containers via % sh build.sh
  • In the future, you can start everything up via docker-compose up -d and take them down via docker-compose down
  • The miracle homepage should be live at https://localhost at this point

Loading Data

You can load the luxedemo.packrat.tar.gz and rhea.packrat.tar.gz from the miracle example projects github repository via the command line by downloading the packrat.tar.gz files into the django directory (this project's source tree is mapped to /code/ in the Django container by default) and performing the following steps:

% docker-compose exec django bash # login to the container
% cd django;
% ./manage.py load_project luxedemo.packrat.tar.gz --creator=<username> --project=luxedemo
% ./manage.py load_project rhea.packrat.tar.gz --creator=<username> --project=rhea

Status

Build Status Coverage Status Code Health