[mb-commits] branch, pino-beta, created. MBH-298, Deploy beta as a production server on pino.
MusicBrainz Git Server <[email protected]> Fri, 04 Jan 2013 09:52:59 +0000
| Newsgroups | gmane.comp.audio.musicbrainz.cvs |
|---|---|
| Message-ID | <E1Tr3xT-0006E8-8O@wiley> |
The branch, pino-beta has been created
at d0542dd3a8b0ef2fcbee44fec7509afd60d2b266 (commit)
- Log -----------------------------------------------------------------
commit d0542dd3a8b0ef2fcbee44fec7509afd60d2b266
Author: warp <[email protected]>
Date: Fri Jan 4 10:51:48 2013 +0100
MBH-298, Deploy beta as a production server on pino.
diff --git a/fabfile.py b/fabfile.py
index 5ac5702..c13ca19 100644
--- a/fabfile.py
+++ b/fabfile.py
@@ -36,7 +36,7 @@ def beta():
local("git merge master")
local("git push origin beta")
- socket_deploy()
+ daemontools_deploy("http://localhost:81")
def test():
"""
@@ -54,21 +54,7 @@ def test():
socket_deploy()
-def production():
- """
- To upgrade the servers, first take them out of the load balancer one by
- one. Then, use Fabric to update them:
-
- fab production
-
- You will be prompted to check you wish to continue, and then prompted for a
- server to update. The Fabric deployment script will take care of taking the
- service down, running a Git pull (and running the rest of
- production-deploy.sh) and then bring the service back up.
-
- It will attempt to check that the server started correctly by looking at the
- tail of the log and also doing a curl against localhost.
- """
+def daemontools_deploy(verify_url = "http://localhost"):
puts("Checking if the server is quiet (expecting no requests in 5 second window)")
with settings( hide("stdout") ):
t1 = run("tail /var/log/nginx/001-musicbrainz.access.log")
@@ -113,7 +99,27 @@ def production():
with settings( hide("stdout") ):
run("pgrep plackup")
run("tail /etc/service/mb_server-fastcgi/log/main/current | grep started")
- run("wget http://localhost -O -")
+ run("wget %s -O -" % (verify_url))
+
+
+def production():
+ """
+ To upgrade the servers, first take them out of the load balancer one by
+ one. Then, use Fabric to update them:
+
+ fab production
+
+ You will be prompted to check you wish to continue, and then prompted for a
+ server to update. The Fabric deployment script will take care of taking the
+ service down, running a Git pull (and running the rest of
+ production-deploy.sh) and then bring the service back up.
+
+ It will attempt to check that the server started correctly by looking at the
+ tail of the log and also doing a curl against localhost.
+ """
+
+ daemontools_deploy ()
+
def reset_test():
"""
-----------------------------------------------------------------------
hooks/post-receive
--
mb_server