aboutsummaryrefslogtreecommitdiff
path: root/control
diff options
context:
space:
mode:
authorPaul Sokolovsky <paul.sokolovsky@linaro.org>2011-06-22 20:43:10 +0300
committerPaul Sokolovsky <paul.sokolovsky@linaro.org>2011-06-22 20:43:10 +0300
commit7ffca503f2ffb946dfdd1829d89ccb88976952cb (patch)
tree7564fb643184ecb74e503e39a561a1f7aa70b8ee /control
parent1be0a03a676811033395012ef4c2434d091b15ea (diff)
Add frontend deployment.
Also, refactor deployment code to functions.
Diffstat (limited to 'control')
-rwxr-xr-xcontrol/deploy-control-node43
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