[ARVADOS-DEV] updated: 0dd517477cee1a5a4c247b765e150976f4809e58

git at public.curoverse.com git at public.curoverse.com
Wed Jun 3 17:10:45 EDT 2015


Summary of changes:
 jenkins/run-deploy.sh | 117 +++++++++++++-------------------------------------
 1 file changed, 29 insertions(+), 88 deletions(-)

       via  0dd517477cee1a5a4c247b765e150976f4809e58 (commit)
      from  626ea7dba17faa4106fcd317aa7e277e9ec5227f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 0dd517477cee1a5a4c247b765e150976f4809e58
Author: Ward Vandewege <ward at curoverse.com>
Date:   Wed Jun 3 17:10:20 2015 -0400

    Simplified run-deploy.sh now that we have moved away from Capistrano.
    
    refs #6096

diff --git a/jenkins/run-deploy.sh b/jenkins/run-deploy.sh
index 51de227..168a16d 100755
--- a/jenkins/run-deploy.sh
+++ b/jenkins/run-deploy.sh
@@ -5,36 +5,23 @@ read -rd "\000" helpmessage <<EOF
 $(basename $0): Deploy Arvados to a cluster
 
 Syntax:
-        WORKSPACE=/path/to/arvados $(basename $0) <identifier> <deploy_repo_name>
+        $(basename $0) <identifier>
 
 Options:
 
-identifier             Arvados cluster name
-deploy_repo_name       Name for the repository with the (capistrano) deploy scripts
-
-WORKSPACE=path         Path to the Arvados source tree to deploy from
+  identifier             Arvados cluster name
 
 EOF
 
 
 IDENTIFIER=$1
-DEPLOY_REPO=$2
 
-if [[ "$IDENTIFIER" == '' || "$DEPLOY_REPO" == '' ]]; then
+if [[ "$IDENTIFIER" == '' ]]; then
   echo >&2 "$helpmessage"
   echo >&2
   exit 1
 fi
 
-# Sanity check
-if ! [[ -n "$WORKSPACE" ]]; then
-  echo >&2 "$helpmessage"
-  echo >&2
-  echo >&2 "Error: WORKSPACE environment variable not set"
-  echo >&2
-  exit 1
-fi
-
 EXITCODE=0
 
 COLUMNS=80
@@ -43,18 +30,8 @@ title () {
   printf "\n%*s\n\n" $(((${#title}+$COLUMNS)/2)) "********** $1 **********"
 }
 
-# We only install capistrano in dev mode
-export RAILS_ENV=development
-
-source /etc/profile.d/rvm.sh
 echo $WORKSPACE
 
-# Weirdly, jenkins/rvm ties itself in a knot.
-rvm use default
-
-# Just say what version of ruby we're running
-ruby --version
-
 function run_puppet() {
   node=$1
   return_var=$2
@@ -78,67 +55,27 @@ function run_puppet() {
   eval "$return_var=$ECODE"
 }
 
-function ensure_symlink() {
-  if [[ ! -L $WORKSPACE/$1 ]]; then
-    ln -s $WORKSPACE/$DEPLOY_REPO/$1 $WORKSPACE/$1
-  fi
-}
-
-# Check out/update the $DEPLOY_REPO repository
-if [[ ! -d $DEPLOY_REPO ]]; then
-  mkdir $DEPLOY_REPO
-  git clone git at git.curoverse.com:$DEPLOY_REPO.git
-else
-  cd $DEPLOY_REPO
-  git pull
-fi
-
-# Make sure the necessary symlinks are in place
-cd "$WORKSPACE"
-ensure_symlink "apps/workbench/Capfile.workbench.$IDENTIFIER"
-ensure_symlink "apps/workbench/config/deploy.common.rb"
-ensure_symlink "apps/workbench/config/deploy.curoverse.rb"
-ensure_symlink "apps/workbench/config/deploy.workbench.$IDENTIFIER.rb"
-
-ensure_symlink "services/api/Capfile.$IDENTIFIER"
-ensure_symlink "services/api/config/deploy.common.rb"
-ensure_symlink "services/api/config/deploy.curoverse.rb"
-ensure_symlink "services/api/config/deploy.$IDENTIFIER.rb"
-
 # Deploy API server
 title "Deploying API server"
-cd "$WORKSPACE"
-cd services/api
 
-bundle install --deployment
+SUM_ECODE=0
 
-# make sure we do not print the output of config:check
-sed -i'' -e "s/RAILS_ENV=production #{rake} config:check/RAILS_ENV=production QUIET=true #{rake} config:check/" $WORKSPACE/$DEPLOY_REPO/services/api/config/deploy.common.rb
+# Install updated debian packages
+title "Deploying updated arvados debian packages"
 
-bundle exec cap deploy -f Capfile.$IDENTIFIER
+ssh -p2222 root@$IDENTIFIER.arvadosapi.com -C "apt-get update && apt-get -qqy install arvados-src python-arvados-fuse python-arvados-python-client arvados-api-server-bare"
 
 ECODE=$?
+SUM_ECODE=$(($SUM_ECODE + $ECODE))
 
-# restore unaltered deploy.common.rb
-cd $WORKSPACE/$DEPLOY_REPO
-git checkout services/api/config/deploy.common.rb
-
-if [[ "$ECODE" != "0" ]]; then
-  title "!!!!!! DEPLOYING API SERVER FAILED !!!!!!"
-  EXITCODE=$(($EXITCODE + $ECODE))
-  exit $EXITCODE
-fi
-
-title "Deploying API server complete"
+ssh -p2222 root@$IDENTIFIER.arvadosapi.com -C "/usr/local/bin/arvados-api-server-upgrade.sh"
 
-# Install updated debian packages
-title "Deploying updated arvados debian packages"
-
-ssh -p2222 root@$IDENTIFIER.arvadosapi.com -C "apt-get update && apt-get -qqy install arvados-src python-arvados-fuse python-arvados-python-client"
+ECODE=$?
+SUM_ECODE=$(($SUM_ECODE + $ECODE))
 
-if [[ "$ECODE" != "0" ]]; then
+if [[ "$SUM_ECODE" != "0" ]]; then
   title "!!!!!! DEPLOYING DEBIAN PACKAGES FAILED !!!!!!"
-  EXITCODE=$(($EXITCODE + $ECODE))
+  EXITCODE=$(($EXITCODE + $SUM_ECODE))
   exit $EXITCODE
 fi
 
@@ -149,6 +86,8 @@ title "Deploying updated arvados gems"
 
 ssh -p2222 root@$IDENTIFIER.arvadosapi.com -C "/usr/local/rvm/bin/rvm default do gem install arvados arvados-cli && /usr/local/rvm/bin/rvm default do gem clean arvados arvados-cli"
 
+ECODE=$?
+
 if [[ "$ECODE" != "0" ]]; then
   title "!!!!!! DEPLOYING ARVADOS GEMS FAILED !!!!!!"
   EXITCODE=$(($EXITCODE + $ECODE))
@@ -156,30 +95,32 @@ if [[ "$ECODE" != "0" ]]; then
 fi
 
 title "Deploying updated arvados gems complete"
+title "Deploying API server complete"
 
 # Deploy Workbench
 title "Deploying workbench"
-cd "$WORKSPACE"
-cd apps/workbench
-bundle install --deployment
 
-# make sure we do not print the output of config:check
-sed -i'' -e "s/RAILS_ENV=production #{rake} config:check/RAILS_ENV=production QUIET=true #{rake} config:check/" $WORKSPACE/$DEPLOY_REPO/apps/workbench/config/deploy.common.rb
+# Install updated debian packages
+title "Deploying updated arvados debian packages"
 
-bundle exec cap deploy -f Capfile.workbench.$IDENTIFIER
+ssh -p2222 root at workbench.$IDENTIFIER.arvadosapi.com -C "apt-get update && apt-get -qqy install python-arvados-fuse python-arvados-python-client arvados-workbench-bare"
 
 ECODE=$?
+SUM_ECODE=$(($SUM_ECODE + $ECODE))
 
-# restore unaltered deploy.common.rb
-cd $WORKSPACE/$DEPLOY_REPO
-git checkout apps/workbench/config/deploy.common.rb
+ssh -p2222 root at workbench.$IDENTIFIER.arvadosapi.com -C "/usr/local/bin/arvados-workbench-upgrade.sh"
 
-if [[ "$ECODE" != "0" ]]; then
-  title "!!!!!! DEPLOYING WORKBENCH FAILED !!!!!!"
-  EXITCODE=$(($EXITCODE + $ECODE))
+ECODE=$?
+SUM_ECODE=$(($SUM_ECODE + $ECODE))
+
+if [[ "$SUM_ECODE" != "0" ]]; then
+  title "!!!!!! DEPLOYING DEBIAN PACKAGES FAILED !!!!!!"
+  EXITCODE=$(($EXITCODE + $SUM_ECODE))
   exit $EXITCODE
 fi
 
+title "Deploying updated arvados debian packages complete"
+
 title "Deploying workbench complete"
 
 # Update compute node(s)

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list