Added remote support and the ability to pull code
authorbobcall <bob@bobcall.me>
Sat, 29 Jun 2013 11:08:31 +0000 (07:08 -0400)
committerbobcall <bob@bobcall.me>
Sat, 29 Jun 2013 11:08:31 +0000 (07:08 -0400)
fabfile.py

index 95e6bd1ce752aaa3e82ff7950785df697d2ee2d2..937fef7b347b54bbc98589d339637cf0bb7ce8e9 100644 (file)
@@ -27,6 +27,17 @@ Connection information for the local machine
     env.branch = 'beta'
     env.run = virtenv_exec
 
+@task
+def prod():
+    env.user = 'djkarma'
+    env.hosts = ['beta.karmanotes.org']
+    env.proj_root = '/var/www/karmaworld'
+    env.proj_dir = '/var/www/karmaworld'
+    env.reqs = 'reqs/prod.txt'
+    env.confs = 'confs/beta/'
+    env.branch = 'beta'
+    env.run = virtenv_exec
+
 ######## Run Commands in Virutal Environment
 def virtenv_exec(command):
         with virtualenv('%s/%s' % (env.proj_dir, env.branch)):
@@ -62,3 +73,6 @@ def start_supervisord():
        config_file = '%s/%ssupervisord.conf' % (env.proj_dir,env.confs)
        env.run('supervisord -c %s' % config_file)
 
+@task
+def update_code():
+       env.run('cd %s; git pull' % env.proj_dir)