diff options
author | Paul Sokolovsky <paul.sokolovsky@linaro.org> | 2011-04-20 18:57:10 +0300 |
---|---|---|
committer | Paul Sokolovsky <paul.sokolovsky@linaro.org> | 2011-04-20 18:57:10 +0300 |
commit | 13cc3ddc0e0cd9e22f5164c57230904c48ce75bf (patch) | |
tree | a1d446dcf46dc3894c589dc23ebc25eddb0760c7 | |
parent | 62f5005e8f5521529ac989a61b0297a6b520b767 (diff) |
First cut at deployment script, so far deploys linaro-android-mirror.
-rwxr-xr-x | control/deploy-control-node | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/control/deploy-control-node b/control/deploy-control-node new file mode 100755 index 0000000..1472cf7 --- /dev/null +++ b/control/deploy-control-node @@ -0,0 +1,30 @@ +#!/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" +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 --pid ~git-mirror/service.pid --logfile ~git-mirror/service.log |