Module Expr Str Import alias ImportFrom alias alias alias alias ImportFrom alias alias alias ImportFrom alias ImportFrom alias alias ImportFrom alias ImportFrom alias alias ImportFrom alias Assign AttributeStore NameLoad attr NameLoad FunctionDef arguments args defaults body Expr Str Expr Call NameLoad Str Str Str Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args defaults body Expr Str Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Str Expr Call NameLoad Expr Call NameLoad NameLoad decorator_list NameLoad FunctionDef arguments args defaults body Expr Str Expr Call NameLoad Assign AttributeStore NameLoad attr ListLoad AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args defaults body Expr Str Expr Call NameLoad Assign AttributeStore NameLoad attr ListLoad AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args defaults body Expr Str Expr Call NameLoad Assign AttributeStore NameLoad attr ListLoad AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam defaults NameLoad body Expr Str If BoolOpOr CompareIs NameLoad NameLoad CompareNotEq AttributeLoad NameLoad attr ListLoad Str body Expr Call NameLoad Str Assign NameStore ListLoad Str Str Str Str If CompareNotIn NameLoad NameLoad body Expr Call NameLoad Call AttributeLoad Str attr NameLoad Expr Call NameLoad Call AttributeLoad Str attr NameLoad Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Call AttributeLoad Str attr NameLoad Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Call AttributeLoad Str attr NameLoad With Call NameLoad Call AttributeLoad Str attr NameLoad body Expr Call NameLoad Str Expr Call NameLoad Str Expr Call NameLoad Str keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword Str Expr Call NameLoad Str keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword NameLoad keyword Str With Call NameLoad AttributeLoad NameLoad attr body Expr Call NameLoad Str With Call NameLoad Call AttributeLoad Str attr NameLoad body Expr Call NameLoad Call AttributeLoad Str attr NameLoad With Call NameLoad Call AttributeLoad Str attr NameLoad body Expr Call NameLoad Str Expr Call NameLoad Str decorator_list NameLoad Call NameLoad keyword AttributeLoad NameLoad attr FunctionDef arguments args defaults body Expr Str Expr Call NameLoad Str With Call NameLoad AttributeLoad NameLoad attr body With Call NameLoad keyword Str body Expr Call NameLoad Str With Call NameLoad AttributeLoad NameLoad attr body Expr Call NameLoad Str Expr Call NameLoad Str Expr Call NameLoad Str Expr Call NameLoad Str With Call NameLoad Call AttributeLoad Str attr NameLoad body Expr Call NameLoad Call AttributeLoad Str attr NameLoad Expr Call NameLoad Str Expr Call NameLoad Call AttributeLoad Str attr NameLoad Expr Call NameLoad Call AttributeLoad Str attr NameLoad Expr Call NameLoad Str With Call NameLoad AttributeLoad NameLoad attr body Expr Call NameLoad Call AttributeLoad Str attr NameLoad decorator_list Call NameLoad keyword Str Call NameLoad keyword AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam defaults NameLoad NameLoad body Expr Str Expr Call NameLoad Str With Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str body If NameLoad body Expr Call NameLoad Str Expr Call NameLoad Str With Call NameLoad Call AttributeLoad Str attr NameLoad body If NameLoad body Expr Call NameLoad Call AttributeLoad Str attr NameLoad Expr Call NameLoad Str If NameLoad body Expr Call NameLoad Call AttributeLoad Str attr NameLoad Expr Call NameLoad Call AttributeLoad Str attr NameLoad Expr Call NameLoad Str With Call NameLoad AttributeLoad NameLoad attr body Expr Call NameLoad Call AttributeLoad Str attr NameLoad decorator_list Call NameLoad keyword Str Call NameLoad keyword AttributeLoad NameLoad attr
N/A N/A 
Deployment script for the Refinery Platform software environment

Requirements:
* ~/.fabricrc (see fabricrc.sample for details):
* deployment_base_dir on the remote hosts must be owned by project_user
* project_user home dir must exist
* local user account running this script must be able to:
** run commands as root on target hosts using sudo
** SSH in to the target hosts as project_user
** access Refinery Github account using an SSH key

 N/A os fabric.api env run sudo execute fabric.context_managers prefix cd shell_env fabric.contrib.files sed fabric.decorators task with_settings fabric.operations require fabric.utils abort puts fabtools.vagrant vagrant N/A N/A env forward_agent True setup N/A N/A N/A N/A N/A Check if the required variable were initialized in ~/.fabricrc N/A N/A require project_user refinery_project_dir refinery_virtualenv_name N/A N/A env refinery_app_dir N/A N/A N/A os path join N/A env refinery_project_dir refinery N/A N/A env refinery_ui_dir N/A N/A N/A os path join N/A env refinery_app_dir ui N/A vm N/A N/A N/A N/A N/A Configure environment for deployment on Vagrant VM N/A N/A env project_user vagrant N/A N/A env refinery_project_dir /vagrant N/A N/A env refinery_virtual_env_name refinery-platform N/A N/A setup N/A N/A execute vagrant N/A task dev N/A N/A N/A N/A N/A Set config for deployment on development VM N/A N/A setup N/A N/A env hosts N/A N/A env dev_host N/A task stage N/A N/A N/A N/A N/A Set config for deployment on staging VM N/A N/A setup N/A N/A env hosts N/A N/A env stage_host N/A task prod N/A N/A N/A N/A N/A Set config for deployment on production VM N/A N/A setup N/A N/A env hosts N/A N/A env prod_host N/A task conf N/A N/A mode N/A None N/A N/A Switch Refinery configurations on Vagrant VM N/A N/A N/A mode None N/A N/A env hosts N/A vagrant@127.0.0.1:2222 N/A N/A N/A abort usage: fab vm conf:<mode> N/A modes N/A dev djdt gdev prod N/A N/A mode modes N/A N/A N/A abort N/A N/A Mode must be one of {} format modes N/A N/A puts N/A N/A Switching Refinery running on Vagrant VM to '{}' mode format mode N/A N/A env shell_before export DJANGO_SETTINGS_MODULE=config.settings.* N/A N/A env shell_after N/A N/A export DJANGO_SETTINGS_MODULE=config.settings.{} format mode N/A N/A env apache_before SetEnv DJANGO_SETTINGS_MODULE config.settings.* N/A N/A env apache_after N/A N/A SetEnv DJANGO_SETTINGS_MODULE config.settings.{} format mode N/A N/A prefix N/A N/A workon {refinery_virtualenv_name} format env N/A N/A N/A run supervisorctl shutdown N/A N/A sudo /usr/sbin/service apache2 stop N/A N/A sed /home/vagrant/.profile before N/A env shell_before after N/A env shell_after backup N/A N/A sed /etc/apache2/sites-available/001-refinery.conf before N/A env apache_before after N/A env apache_after use_sudo True backup N/A N/A cd N/A env refinery_ui_dir N/A N/A N/A run grunt make N/A N/A prefix N/A N/A workon {refinery_virtualenv_name} format env N/A N/A N/A run N/A N/A {refinery_app_dir}/manage.py collectstatic --clear --noinput format env N/A N/A prefix N/A N/A workon {refinery_virtualenv_name} format env N/A N/A N/A run supervisord N/A N/A sudo /usr/sbin/service apache2 start N/A task N/A with_settings user N/A env project_user update_refinery N/A N/A N/A N/A N/A Perform full update of a Refinery Platform instance N/A N/A puts Updating Refinery N/A N/A cd N/A env refinery_project_dir N/A N/A N/A shell_env GIT_MERGE_AUTOEDIT no N/A N/A N/A run git pull N/A N/A cd N/A env refinery_ui_dir N/A N/A N/A run npm prune && npm update N/A N/A run rm -rf bower_components N/A N/A run bower update --config.interactive=false N/A N/A run grunt make N/A N/A prefix N/A N/A workon {refinery_virtualenv_name} format env N/A N/A N/A run N/A N/A pip install -r {refinery_project_dir}/requirements.txt format env N/A N/A run find . -name '*.pyc' -delete N/A N/A run N/A N/A {refinery_app_dir}/manage.py syncdb --migrate --noinput format env N/A N/A run N/A N/A {refinery_app_dir}/manage.py collectstatic --clear --noinput format env N/A N/A run supervisorctl reload N/A N/A cd N/A env refinery_project_dir N/A N/A N/A run N/A N/A touch {refinery_app_dir}/config/wsgi.py format env N/A N/A task alias update N/A with_settings user N/A env project_user relaunch_refinery N/A N/A dependencies migrations N/A False False N/A N/A Perform a relaunch of a Refinery Platform instance, including processing
    of grunt tasks
    dependencies: update bower and pip dependencies
    migrations: apply migrations
     N/A N/A puts Relaunching Refinery N/A N/A cd N/A N/A N/A os path join N/A env refinery_app_dir ui N/A N/A dependencies N/A N/A N/A run bower update --config.interactive=false N/A N/A run grunt make N/A N/A prefix N/A N/A workon {refinery_virtualenv_name} format env N/A N/A dependencies N/A N/A N/A run N/A N/A pip install -r {refinery_project_dir}/requirements.txt format env N/A N/A run find . -name '*.pyc' -delete N/A migrations N/A N/A N/A run N/A N/A {refinery_app_dir}/manage.py syncdb --migrate format env N/A N/A run N/A N/A {refinery_app_dir}/manage.py collectstatic --noinput format env N/A N/A run supervisorctl restart all N/A N/A cd N/A env refinery_project_dir N/A N/A N/A run N/A N/A touch {refinery_app_dir}/config/wsgi.py format env N/A N/A task alias relaunch N/A with_settings user N/A env project_user