Module ImportFrom alias Expr Str Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr BinOpMod Str NameLoad Assign AttributeStore NameLoad attr BinOpMod Str NameLoad Assign AttributeStore NameLoad attr BinOpMod Str NameLoad Assign AttributeStore NameLoad attr BinOpMod Str NameLoad Assign AttributeStore NameLoad attr BinOpMod Str NameLoad Assign AttributeStore NameLoad attr BinOpMod Str NameLoad Assign AttributeStore NameLoad attr BinOpMod Str NameLoad Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr NameLoad Expr Str FunctionDef arguments args defaults body Expr Str Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr ListLoad Str Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Str decorator_list FunctionDef arguments args defaults body Expr Str Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr ListLoad Str Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Str decorator_list Expr Str FunctionDef arguments args defaults body Expr Str Assign AttributeStore NameLoad attr Str decorator_list FunctionDef arguments args defaults body Expr Str Assign AttributeStore NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign AttributeStore NameLoad attr NameLoad decorator_list Expr Str FunctionDef arguments args defaults body Expr Str Expr Call NameLoad Str keyword ListLoad NameLoad NameLoad Expr Call NameLoad Str keyword ListLoad NameLoad NameLoad NameLoad Expr Call NameLoad Expr Call NameLoad Expr Call NameLoad Expr Call NameLoad Expr Call NameLoad Expr Call NameLoad Expr Call NameLoad Expr Call NameLoad Expr Call NameLoad Expr Call NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Expr Call NameLoad BinOpMod Str NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Expr Call NameLoad BinOpMod Str NameLoad Expr Call NameLoad BinOpMod Str NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Expr Call NameLoad BinOpMod Str NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Expr Call NameLoad BinOpMod Str NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Expr Call NameLoad BinOpMod Str NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Expr Call NameLoad BinOpMod Str NameLoad decorator_list FunctionDef arguments args defaults body Expr Str With Call NameLoad keyword NameLoad body Expr Call NameLoad BinOpMod Str NameLoad Expr Call NameLoad BinOpMod Str NameLoad decorator_list Expr Str FunctionDef arguments args defaults body Expr Str Expr Call NameLoad Str keyword ListLoad NameLoad NameLoad Expr Call NameLoad Str keyword ListLoad NameLoad NameLoad NameLoad With Call NameLoad keyword NameLoad body Expr Call NameLoad Expr Call NameLoad Expr Call NameLoad Expr Call NameLoad Expr Call NameLoad Expr Call NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Expr Call NameLoad BinOpMod Str NameLoad Expr Call NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Expr Call NameLoad BinOpMod Str NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Assign AttributeStore NameLoad attr BinOpMod Str NameLoad Expr Call NameLoad BinOpMod Str NameLoad decorator_list FunctionDef arguments args defaults body Expr Str If AttributeLoad NameLoad attr body Expr Call NameLoad Str orelse Expr Call NameLoad Str decorator_list FunctionDef arguments args defaults body Expr Str Expr Call NameLoad Expr Call NameLoad decorator_list Expr Str FunctionDef arguments args NameParam defaults body Expr Str Expr Call NameLoad Str keyword ListLoad NameLoad NameLoad Expr Call NameLoad Str keyword ListLoad NameLoad NameLoad NameLoad Expr Call NameLoad Expr Call NameLoad Expr Call NameLoad NameLoad Expr Call NameLoad Expr Call NameLoad Expr Call NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign AttributeStore NameLoad attr NameLoad Expr Call NameLoad BinOpMod Str NameLoad decorator_list Expr Str FunctionDef arguments args defaults body Expr Str Expr Call NameLoad Str keyword ListLoad NameLoad NameLoad Expr Call NameLoad Expr Call NameLoad Expr Call NameLoad Expr Call NameLoad Expr Call NameLoad Expr Call NameLoad Expr Call NameLoad decorator_list FunctionDef arguments args NameParam defaults NameLoad body Expr Str Expr Call NameLoad BinOpMod Str NameLoad Expr Call NameLoad BinOpMod Str NameLoad Expr Call NameLoad BinOpMod Str NameLoad Expr Call NameLoad BinOpMod Str NameLoad decorator_list FunctionDef arguments args NameParam defaults NameLoad body Expr Str With Call NameLoad keyword NameLoad body Expr Call NameLoad BinOpMod Str NameLoad Expr Call NameLoad BinOpMod Str NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Expr Call NameLoad BinOpMod Str NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Expr Call NameLoad Str decorator_list FunctionDef arguments args defaults body Expr Str Expr Call NameLoad Str decorator_list Expr Str FunctionDef arguments args NameParam NameParam defaults body Expr Call NameLoad BinOpMod Str NameLoad With Call NameLoad AttributeLoad NameLoad attr body Expr Call NameLoad BinOpMod Str TupleLoad AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults Str body Expr Str Assign NameStore BinOpMod Str TupleLoad NameLoad AttributeLoad NameLoad attr NameLoad Assign NameStore BinOpMod Str TupleLoad AttributeLoad NameLoad attr NameLoad Expr Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults Str body Expr Str Assign NameStore BinOpMod Str TupleLoad AttributeLoad NameLoad attr NameLoad Assign NameStore BinOpMod Str AttributeLoad NameLoad attr Expr Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Assign NameStore BinOpMod Str NameLoad Expr Call NameLoad BinOpMod Str AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore BinOpMod Str NameLoad Expr Call NameLoad BinOpMod Str TupleLoad AttributeLoad NameLoad attr NameLoad NameLoad decorator_list Expr Str FunctionDef arguments args defaults body Expr Str If AttributeLoad NameLoad attr body Expr Call NameLoad Str orelse Expr Call NameLoad Str Expr Call NameLoad BinOpMod Str NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Expr Call NameLoad BinOpMod Str NameLoad decorator_list Expr Str FunctionDef arguments args defaults body Expr Str With Call NameLoad keyword NameLoad body Expr Call NameLoad BinOpMod Str NameLoad Expr Call NameLoad BinOpMod Str NameLoad Expr Call NameLoad Expr Call NameLoad BinOpMod Str NameLoad Expr Call NameLoad BinOpMod Str NameLoad Expr Call NameLoad Expr Call NameLoad BinOpMod Str NameLoad Expr Call NameLoad Expr Call NameLoad BinOpMod Str NameLoad decorator_list FunctionDef arguments args defaults body Expr Call NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Expr Call NameLoad NameLoad Expr Call NameLoad Str decorator_list FunctionDef arguments args defaults body Expr Call NameLoad Str Expr Call NameLoad Str Expr Call NameLoad Str Expr Call NameLoad Str decorator_list Expr Str FunctionDef arguments args NameParam defaults body Expr Str Assign AttributeStore NameLoad attr NameLoad Expr Call NameLoad BinOpMod Str NameLoad decorator_list FunctionDef arguments args defaults body If BoolOpAnd CompareEq AttributeLoad NameLoad attr Str CompareNotEq AttributeLoad NameLoad attr Str body Assign NameStore Call NameLoad BinOpMod Str NameLoad keyword Str If CompareNotIn NameLoad TupleLoad Str Str Str Str Str Str body Expr Call NameLoad decorator_list
N/A fabric.api * N/A 
Base configuration
 N/A N/A env site_name censusweb N/A N/A env project_name censusweb N/A N/A env database_password Xy9XKembdu N/A N/A env site_media_prefix site_media N/A N/A env admin_media_prefix admin_media N/A N/A env path N/A /home/ubuntu/sites/%(project_name)s env N/A N/A env log_path N/A /home/ubuntu/logs env N/A N/A env env_path N/A /home/ubuntu/sites/virtualenvs/%(project_name)s env N/A N/A env repo_path N/A %(path)s env N/A N/A env site_path N/A %(repo_path)s/censusweb env N/A N/A env dataprocessing_path N/A %(repo_path)s/dataprocessing env N/A N/A env apache_config_path N/A /home/ubuntu/apache/%(project_name)s env N/A N/A env python python2.7 N/A N/A env repository_url git@github.com:ireapps/census.git N/A N/A env memcached_server_address cache N/A N/A env multi_server False N/A 
Environments
 production N/A N/A N/A N/A N/A 
    Work on production environment
     N/A N/A env settings production N/A N/A env hosts N/A census.ire.org N/A N/A env user ubuntu N/A N/A env s3_bucket censusmedia.ire.org N/A N/A env site_domain census.ire.org N/A N/A env cache_server census.ire.org N/A staging N/A N/A N/A N/A N/A 
    Work on staging environment
     N/A N/A env settings staging N/A N/A env hosts N/A census.tribapps.com N/A N/A env user ubuntu N/A N/A env s3_bucket media-beta.tribapps.com N/A N/A env site_domain census.tribapps.com N/A N/A env cache_server census.tribapps.com N/A N/A 
Branches
 stable N/A N/A N/A N/A N/A 
    Work on stable branch.
     N/A N/A env branch stable N/A master N/A N/A N/A N/A N/A 
    Work on development branch.
     N/A N/A env branch master N/A branch N/A N/A branch_name N/A N/A N/A 
    Work on any specified branch.
     N/A N/A env branch branch_name N/A N/A 
Commands - setup
 setup N/A N/A N/A N/A N/A 
    Setup a fresh virtualenv, install everything we need, and fire up the database.
    
    Does NOT perform the functions of deploy().
     N/A N/A require settings provided_by N/A production staging N/A N/A require branch provided_by N/A stable master branch N/A N/A setup_directories N/A N/A setup_virtualenv N/A N/A clone_repo N/A N/A checkout_latest N/A N/A install_requirements N/A N/A destroy_database N/A N/A create_database N/A N/A load_data N/A N/A install_apache_conf N/A N/A deploy_requirements_to_s3 N/A setup_directories N/A N/A N/A N/A N/A 
    Create directories necessary for deployment.
     N/A N/A run N/A mkdir -p %(path)s env N/A setup_virtualenv N/A N/A N/A N/A N/A 
    Setup a fresh virtualenv.
     N/A N/A run N/A virtualenv -p %(python)s --no-site-packages %(env_path)s; env N/A N/A run N/A source %(env_path)s/bin/activate; easy_install -U setuptools; easy_install -U pip; env N/A clone_repo N/A N/A N/A N/A N/A 
    Do initial clone of the git repository.
     N/A N/A run N/A git clone %(repository_url)s %(repo_path)s env N/A checkout_latest N/A N/A N/A N/A N/A 
    Pull the latest code on the specified branch.
     N/A N/A run N/A cd %(repo_path)s; git checkout %(branch)s; git pull origin %(branch)s env N/A install_requirements N/A N/A N/A N/A N/A 
    Install the required packages using pip.
     N/A N/A run N/A source %(env_path)s/bin/activate; pip install -q -r %(site_path)s/requirements.txt env N/A install_apache_conf N/A N/A N/A N/A N/A 
    Install the apache site config file.
     N/A N/A sudo N/A cp %(site_path)s/config/%(settings)s/apache %(apache_config_path)s env N/A deploy_requirements_to_s3 N/A N/A N/A N/A N/A 
    Deploy the admin media to s3.
     N/A N/A settings warn_only True N/A N/A N/A run N/A s3cmd del --recursive s3://%(s3_bucket)s/%(project_name)s/%(admin_media_prefix)s/ env N/A N/A run N/A s3cmd -P --guess-mime-type --rexclude-from=%(site_path)s/s3exclude sync %(env_path)s/src/django/django/contrib/admin/media/ s3://%(s3_bucket)s/%(project_name)s/%(admin_media_prefix)s/ env N/A N/A 
Commands - deployment
 deploy N/A N/A N/A N/A N/A 
    Deploy the latest version of the site to the server and restart Apache2.
    
    Does not perform the functions of load_new_data().
     N/A N/A require settings provided_by N/A production staging N/A N/A require branch provided_by N/A stable master branch N/A N/A settings warn_only True N/A N/A N/A maintenance_up N/A N/A checkout_latest N/A N/A gzip_assets N/A N/A deploy_to_s3 N/A N/A maintenance_down N/A N/A clear_cache N/A maintenance_up N/A N/A N/A N/A N/A 
    Install the Apache maintenance configuration.
     N/A N/A sudo N/A cp %(site_path)s/config/%(settings)s/apache_maintenance %(apache_config_path)s env N/A N/A reboot N/A gzip_assets N/A N/A N/A N/A N/A 
    GZips every file in the media directory and places the new file
    in the gzip directory with the same filename.
     N/A N/A run N/A cd %(site_path)s; python gzip_assets.py env N/A deploy_to_s3 N/A N/A N/A N/A N/A 
    Deploy the latest project site media to S3.
     N/A N/A env gzip_path N/A %(site_path)s/gzip_media/ env N/A N/A run N/A s3cmd -P --add-header=Content-encoding:gzip --guess-mime-type --rexclude-from=%(site_path)s/s3exclude sync %(gzip_path)s s3://%(s3_bucket)s/%(project_name)s/%(site_media_prefix)s/ env N/A reboot N/A N/A N/A N/A N/A 
    Restart the Apache2 server.
     N/A N/A env multi_server N/A N/A N/A run bounce-apaches-for-cluster N/A N/A N/A sudo service apache2 restart N/A maintenance_down N/A N/A N/A N/A N/A 
    Reinstall the normal site configuration.
     N/A N/A install_apache_conf N/A N/A reboot N/A N/A 
Commands - rollback
 rollback N/A N/A commit_id N/A N/A N/A 
    Rolls back to specified git commit hash or tag.
    
    There is NO guarantee we have committed a valid dataset for an arbitrary
    commit hash.
     N/A N/A require settings provided_by N/A production staging N/A N/A require branch provided_by N/A stable master branch N/A N/A maintenance_up N/A N/A checkout_latest N/A N/A git_reset commit_id N/A N/A gzip_assets N/A N/A deploy_to_s3 N/A N/A maintenance_down N/A git_reset N/A N/A commit_id N/A N/A N/A 
    Reset the git repository to an arbitrary commit hash or tag.
     N/A N/A env commit_id commit_id N/A N/A run N/A cd %(repo_path)s; git reset --hard %(commit_id)s env N/A N/A 
Commands - data
 load_new_data N/A N/A N/A N/A N/A 
    Erase the current database and load new data from the SQL dump file.
     N/A N/A require settings provided_by N/A production staging N/A N/A maintenance_up N/A N/A pgpool_down N/A N/A destroy_database N/A N/A create_database N/A N/A load_data N/A N/A pgpool_up N/A N/A maintenance_down N/A create_database N/A N/A func N/A run N/A N/A 
    Creates the user and database for this project.
     N/A N/A func N/A createuser -s %(project_name)s env N/A N/A func N/A echo "ALTER USER %(project_name)s with password %(database_password)s" | psql postgres env N/A N/A func N/A echo "GRANT ALL PRIVILEGES TO %(project_name)s;" | psql postgres env N/A N/A func N/A createdb -O %(project_name)s %(project_name)s -T template_postgis env N/A destroy_database N/A N/A func N/A run N/A N/A 
    Destroys the user and database for this project.
    
    Will not cause the fab to fail if they do not exist.
     N/A N/A settings warn_only True N/A N/A N/A func N/A dropdb %(project_name)s env N/A N/A func N/A dropuser %(project_name)s env N/A load_data N/A N/A N/A N/A N/A 
    Loads data from the repository into PostgreSQL.
     N/A N/A run N/A psql -q %(project_name)s < %(site_path)s/data/psql/dump.sql env N/A pgpool_down N/A N/A N/A N/A N/A 
    Stop pgpool so that it won't prevent the database from being rebuilt.
     N/A N/A sudo /etc/init.d/pgpool stop N/A pgpool_up N/A N/A N/A N/A N/A 
    Start pgpool.
     N/A N/A sudo /etc/init.d/pgpool start N/A N/A 
Commands - Data Processing
 run_unattended_batch_command N/A N/A command command_log N/A N/A N/A N/A run N/A touch %s command_log N/A N/A cd N/A env dataprocessing_path N/A N/A N/A run N/A source %s/bin/activate; nohup %s >> %s < /dev/null & N/A N/A env env_path command command_log N/A batch_sf N/A N/A state fake N/A N/A N/A 
    Kick off the SF 2000 data loader for a state.
     N/A command N/A ./batch_sf.sh %s %s %s N/A state N/A env settings fake N/A loader_log N/A %s/census.load.%s.log N/A N/A env log_path state N/A N/A run_unattended_batch_command command loader_log N/A batch_sf_everything N/A N/A fake N/A N/A N/A 
    Kick off the SF data loaders for all states.

    USE WITH CAUTION!
     N/A command N/A python batch_sf_everything.py %s %s N/A N/A env settings fake N/A loader_log N/A %s/census.load.everything.log N/A env log_path N/A N/A run_unattended_batch_command command loader_log N/A batch_test N/A N/A N/A N/A N/A 
    Kick off the test data loader.

    USE WITH CAUTION!
     N/A loader_log N/A %(log_path)s/census.load.test.log env N/A N/A run_unattended_batch_command N/A ./batch_test.sh %s N/A env settings loader_log N/A make_state_public N/A N/A state N/A N/A N/A 
    Make a state's data public.
     N/A loader_log N/A %(log_path)s/census.make_public.log env N/A N/A run_unattended_batch_command N/A python make_state_public.py %s %s N/A N/A env settings state loader_log N/A N/A 
Commands - miscellaneous
 clear_cache N/A N/A N/A N/A N/A 
    Restart memcache, wiping the current cache.
     N/A N/A env multi_server N/A N/A N/A run bounce-memcaches-for-cluster N/A N/A N/A sudo service memcached restart N/A N/A run N/A curl -X PURGE -H "Host: %(site_domain)s" http://%(cache_server)s/ env N/A echo_host N/A N/A N/A N/A N/A 
    Echo the current host to the command line.
     N/A N/A run N/A echo %(settings)s; echo %(hosts)s env N/A N/A 
Deaths, destroyers of worlds
 shiva_the_destroyer N/A N/A N/A N/A N/A 
    Remove all directories, databases, etc. associated with the application.
     N/A N/A settings warn_only True N/A N/A N/A run N/A rm -Rf %(path)s env N/A N/A run N/A rm -Rf %(env_path)s env N/A N/A pgpool_down N/A N/A run N/A dropdb %(project_name)s env N/A N/A run N/A dropuser %(project_name)s env N/A N/A pgpool_up N/A N/A sudo N/A rm %(apache_config_path)s env N/A N/A reboot N/A N/A run N/A s3cmd del --recursive s3://%(s3_bucket)s/ env N/A local_shiva N/A N/A N/A N/A N/A N/A destroy_database local N/A local_bootstrap N/A N/A N/A N/A N/A N/A create_database local N/A N/A local python manage.py syncdb --noinput N/A local_load_geodata N/A N/A N/A N/A N/A N/A local mkdir -p /tmp/geofetch N/A N/A local ./fetch_geodata.sh /tmp/geofetch 10 N/A N/A local cp data/shapefiles/definitions.py /tmp/geofetch N/A N/A local ./manage.py load_shapefiles -c -d /tmp/geofetch N/A N/A 
Utility functions (not to be called directly)
 _execute_psql N/A N/A query N/A N/A N/A 
    Executes a PostgreSQL command using the command line interface.
     N/A N/A env query query N/A N/A run N/A cd %(site_path)s; psql -q %(project_name)s -c "%(query)s" env N/A _confirm_branch N/A N/A N/A N/A N/A N/A N/A N/A env settings production N/A N/A env branch stable N/A N/A answer N/A prompt N/A You are trying to deploy the '%(branch)s' branch to production.
You should really only deploy a stable branch.
Do you know what you're doing? env default Not at all N/A N/A answer N/A y Y yes Yes buzz off screw you N/A N/A N/A exit N/A