aboutsummaryrefslogtreecommitdiff
path: root/control/deploy-control-node
diff options
context:
space:
mode:
Diffstat (limited to 'control/deploy-control-node')
-rwxr-xr-xcontrol/deploy-control-node40
1 files changed, 40 insertions, 0 deletions
diff --git a/control/deploy-control-node b/control/deploy-control-node
new file mode 100755
index 0000000..c2f2756
--- /dev/null
+++ b/control/deploy-control-node
@@ -0,0 +1,40 @@
+#!/bin/sh
+###############################################################################
+# Copyright (c) 2011 Linaro
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+###############################################################################
+#
+# This scripts deploys updates to master node
+# of linaro-cloud-buildd infrastructure
+#
+
+set -e
+TSTAMP=`date '+%Y%m%dT%H%M'`
+
+function header() {
+ echo "======================================"
+ echo $1
+ echo "======================================"
+}
+
+header "Deploying linaro-android-mirror"
+running_repos=`ps ax|grep bin/repo|grep -v grep`
+if [ -n "$running_repos" ]; then
+ echo "There appear to be mirror operations in progress currently:"
+ echo $running_repos
+ echo
+ echo "Press Ctrl+C and ensure all outstanding operations are completed"
+ echo "Press Enter to continue anyway"
+ read dummy
+fi
+
+sudo kill `cat /home/git-mirror/service.pid`
+sleep 2
+bzr branch lp:linaro-android-mirror linaro-android-mirror.new
+mv linaro-android-mirror linaro-android-mirror.$TSTAMP
+mv linaro-android-mirror.new linaro-android-mirror
+cd linaro-android-mirror
+sudo -H -u git-mirror twistd -y mirror-service.tac --umask=0022 --pid ~git-mirror/service.pid --logfile ~git-mirror/service.log