Update fabfile to user global environment configuration, abstracted tasks for platform, webserver and database manager

This commit is contained in:
Roberto Rosario
2012-06-01 01:55:09 -04:00
parent ccf41ae67d
commit 9f0d7966bc
21 changed files with 374 additions and 196 deletions

View File

@@ -0,0 +1,18 @@
from fabric.api import run, sudo, cd, env, task
def create_database():
"""
Create the MySQL Mayan EDMS database
"""
run('echo "create database %(database_name)s;" | mysql -u root --password=%(database_manager_admin_password)s' % env)
#TODO: create DB and mayan user
#TODO: custom settings_local
def drop_database():
"""
Drop MySQL's Mayan EDMS's database
"""
run('echo "drop database %(database_name)s;" | mysql -u root --password=%(database_manager_admin_password)s' % env)