diff options
Diffstat (limited to 'control/deploy-control-node')
-rwxr-xr-x | control/deploy-control-node | 43 |
1 files changed, 29 insertions, 14 deletions
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 |