diff options
author | Paul Sokolovsky <paul.sokolovsky@linaro.org> | 2011-04-21 15:41:47 +0300 |
---|---|---|
committer | Paul Sokolovsky <paul.sokolovsky@linaro.org> | 2011-04-21 15:41:47 +0300 |
commit | 47c1382b598b0ddcc101f5fba4d6aec021fb4d7b (patch) | |
tree | 932091126a02cd5d61519fafcbc121e3fbd16bc4 /control/deploy-control-node | |
parent | 62f5005e8f5521529ac989a61b0297a6b520b767 (diff) | |
parent | 268e9654408817e6439841a498c3e6e8d4465df2 (diff) |
First cut at deployment script, so far deploys linaro-android-mirror.
Diffstat (limited to 'control/deploy-control-node')
-rwxr-xr-x | control/deploy-control-node | 40 |
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 |