Commit 6f3bb02c by Őry Máté

fabfile: add pip support

parent 23999700
...@@ -22,6 +22,12 @@ def update_all(): ...@@ -22,6 +22,12 @@ def update_all():
execute(update_portal) execute(update_portal)
def pip(env, req):
"Install pip requirements"
with _workon(env):
run("pip install -r %s" % req)
@roles('portal') @roles('portal')
def migrate(): def migrate():
"Run db migrations" "Run db migrations"
...@@ -88,6 +94,7 @@ def update_portal(test=False): ...@@ -88,6 +94,7 @@ def update_portal(test=False):
"Update and restart portal+manager" "Update and restart portal+manager"
with _stopped("portal", "mancelery"): with _stopped("portal", "mancelery"):
pull() pull()
pip("circle", "~/circle/requirements.txt")
migrate() migrate()
compile_things() compile_things()
if test: if test:
...@@ -106,7 +113,9 @@ def update_node(): ...@@ -106,7 +113,9 @@ def update_node():
"Update and restart nodes" "Update and restart nodes"
with _stopped("node", "agent"): with _stopped("node", "agent"):
pull("~/vmdriver") pull("~/vmdriver")
pip("vmdriver", "~/vmdriver/requirements/production.txt")
pull("~/agentdriver") pull("~/agentdriver")
pip("agentdriver", "~/agentdriver/requirements.txt")
@parallel @parallel
...@@ -115,6 +124,7 @@ def update_storage(): ...@@ -115,6 +124,7 @@ def update_storage():
"Update and restart storagedriver" "Update and restart storagedriver"
with _stopped("storage"): with _stopped("storage"):
pull("~/storagedriver") pull("~/storagedriver")
pip("storage", "~/storagedriver/requirements/production.txt")
@parallel @parallel
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment