git clone [email protected]:openhealthcare/elcid-deployment.git
cd elcid-deployment
mkvirtualenv elcid-setup -a $PWD
pip install -r requirements.txt
cp settings.ini.example settings.in
- run ./initial_bootstrap.sh
- workon elcid-setup
- Edit the variables in `settings.ini as required.
- install the requirements file
- fab server_setup
You should be up and running!
Deployment to Test does not set up the cron job syncing.
Set env.db_dump_dir to load in a database dump
- workon elcid-setup
- Edit the variables in `settings.ini as required.
- fab deploy_test
- fab restart_everything
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.
- workon elcid-setup
- Edit the variables in `settings.ini as required.
- fab deploy_prod
- fab restart_everything
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
fab setup_cron
All Postgres and Pip methods from postgres_helper are exposed, run the task postgres, with you method name, followed by args, kwargs.
for example
fab 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
fab postgres:refresh_database