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 | #
|
---|
6 | from __future__ import with_statement
|
---|
7 | from fabric.api import local, settings, abort, run, cd, env, sudo
|
---|
8 | from fabric.contrib.console import confirm
|
---|
9 |
|
---|
10 | env.shell = "/bin/sh -c"
|
---|
11 |
|
---|
12 | def hello():
|
---|
13 | print("Hello World!")
|
---|
14 |
|
---|
15 | def test():
|
---|
16 | local("./manage.py runserver 0.0.0.0:8000")
|
---|
17 |
|
---|
18 | def reset():
|
---|
19 | local("./manage.py sqlreset gheat | ./manage.py dbshell")
|
---|
20 | local("./manage.py syncdb")
|
---|
21 |
|
---|
22 | def 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 |
|
---|
27 | def 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.