From 7ffca503f2ffb946dfdd1829d89ccb88976952cb Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Wed, 22 Jun 2011 20:43:10 +0300 Subject: Add frontend deployment. Also, refactor deployment code to functions. --- control/deploy-control-node | 43 +++++++++++++++++++++++++++++-------------- 1 file changed, 29 insertions(+), 14 deletions(-) (limited to 'control/deploy-control-node') diff --git a/control/deploy-control-node b/control/deploy-control-node index 4bfc4aa..b8afda2 100755 --- a/control/deploy-control-node +++ b/control/deploy-control-node @@ -35,17 +35,32 @@ function bzr_deploy() { # be sure to execute in deployment dir cd -header "Deploying linaro-android-mirror" -running_repos=`ps ax|grep bin/repo|grep -v grep || true` -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 - -linaro-android-mirror/linaro-android-mirror stop -bzr_deploy lp:linaro-android-mirror linaro-android-mirror -linaro-android-mirror/linaro-android-mirror start +function deploy_mirror() { + header "Deploying linaro-android-mirror" + running_repos=`ps ax|grep bin/repo|grep -v grep || true` + 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 + + linaro-android-mirror/linaro-android-mirror stop + bzr_deploy lp:linaro-android-mirror linaro-android-mirror + linaro-android-mirror/linaro-android-mirror start +} + +function deploy_frontend() { + header "Deploying linaro-android-frontend" + sudo service apache2 stop + cd ~build-system-frontend + sudo bzr_deploy lp:linaro-android-frontend frontend + sudo ln -s settings_prod.py frontend/ + sudo chown -R build-system-frontend frontend/ + sudo service apache2 start +} + +deploy_mirror +deploy_frontend -- cgit v1.2.3