Add per host settings, Add host group support via server_config.json or server_config.yaml files (requires pyyaml)
http://fueledbylemons.com/blog/2011/04/09/server-configs-and-fabric/
This commit is contained in:
@@ -1,13 +1,14 @@
|
||||
import sys
|
||||
|
||||
from fabric.api import task, env
|
||||
from fabric.colors import white
|
||||
|
||||
import databases as database
|
||||
import webservers as webserver
|
||||
import platforms as platform
|
||||
import webservers as webserver
|
||||
import django
|
||||
from conf import setup_environment, print_supported_configs
|
||||
|
||||
setup_environment()
|
||||
from conf import print_supported_configs
|
||||
from server_config import servers
|
||||
|
||||
print(white('\n\n ######## ', bold=True))
|
||||
print(white(' ######## ', bold=True))
|
||||
@@ -27,8 +28,11 @@ print(white('\nMayan EDMS Fabric installation file\n\n', bold=True))
|
||||
print_supported_configs()
|
||||
|
||||
|
||||
@task(default=True)
|
||||
@task
|
||||
def install():
|
||||
"""
|
||||
Perform a complete install of Mayan EDMS on a host
|
||||
"""
|
||||
platform.install_dependencies()
|
||||
platform.install_mayan()
|
||||
platform.install_database_manager()
|
||||
@@ -45,6 +49,9 @@ def install():
|
||||
|
||||
@task
|
||||
def uninstall():
|
||||
"""
|
||||
Perform a complete removal of Mayan EDMS from a host
|
||||
"""
|
||||
platform.delete_mayan()
|
||||
webserver.remove_site()
|
||||
webserver.restart()
|
||||
@@ -52,5 +59,3 @@ def uninstall():
|
||||
if env.drop_database:
|
||||
database.drop_database()
|
||||
database.drop_username()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user