openhealthcare/elcid-deployment

Name: elcid-deployment

Owner: Open Health Care

Description: Deployment and setup scripts for elCID

Created: 2016-08-03 14:11:44.0

Updated: 2016-08-03 14:12:00.0

Pushed: 2018-01-10 13:40:34.0

Homepage: null

Size: 59

Language: Python

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Installation
clone git@github.com:openhealthcare/elcid-deployment.git
lcid-deployment
rtualenv elcid-setup -a $PWD
install -r requirements.txt
ettings.ini.example settings.in
Server Setup
  1. run ./initial_bootstrap.sh
  2. workon elcid-setup
  3. Edit the variables in `settings.ini as required.
  4. install the requirements file
  5. fab server_setup

You should be up and running!

Deployment Test

Deployment to Test does not set up the cron job syncing.

Set env.db_dump_dir to load in a database dump

  1. workon elcid-setup
  2. Edit the variables in `settings.ini as required.
  3. fab deploy_test
  4. fab restart_everything

Deployement to Production

Deployment to production sets up a dump directory. It assumes this is the same directory on a different server. It will load in the most recent database dump.

  1. workon elcid-setup
  2. Edit the variables in `settings.ini as required.
  3. fab deploy_prod
  4. fab restart_everything

Database Back ups.

You want to do regular database back ups. These will get put in env.db_dump_dir. On a remote host at env.sync_host. These are set up by default if you do fab deploy_prod, or you can do it yourself with

setup_cron

Utility

All Postgres and Pip methods from postgres_helper are exposed, run the task postgres, with you method name, followed by args, kwargs.

for example

postgres:get_recent_database_dump_path

will return the latest database dump with full path.

If you want to refresh the current database. Ie drop it and load in the latest database dump you can use

postgres:refresh_database

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.