source: src/django_gheat/fabfile.py@ 9750

Last change on this file since 9750 was 9749, checked in by rick, 13 years ago

Some awefull quirks to avoid uploading files without authentication.

File size: 1.1 KB
Line 
1#
2# Fabric files for deployment and management of django_gheat application
3#
4# Rick van der Zwet - <info@rickvanderzwet.nl>
5#
6from __future__ import with_statement
7from fabric.api import local, settings, abort, run, cd, env, sudo
8from fabric.contrib.console import confirm
9
10env.shell = "/bin/sh -c"
11
12def hello():
13 print("Hello World!")
14
15def test():
16 local("./manage.py runserver 0.0.0.0:8000")
17
18def reset():
19 local("./manage.py sqlreset gheat | ./manage.py dbshell")
20 local("./manage.py syncdb")
21
22def import_nodes():
23 local("../genesis/tools/genesis-to-yaml.pl")
24 local("../genesis/tools/gformat.py cleanup")
25 local("../genesis/tools/gformat.py full-export | ./manage.py import_nodes -")
26
27def deploy():
28 code_dir = '/usr/local/django_gheat'
29 with cd(code_dir):
30 sudo("svn up")
31 sudo("apachectl -k graceful")
32 run("./manage.py sqlreset gheat | ./manage.py dbshell")
33 sudo("./import_scan_data.sh")
34 sudo("svn up ../genesis")
35 sudo("../genesis/tools/genesis-to-yaml.pl")
36 sudo("../genesis/tools/gformat.py cleanup")
37 run("../genesis/tools/gformat.py full-export | ./manage.py import_nodes -")
Note: See TracBrowser for help on using the repository browser.