This page will be used to discuss and review any deploy script changes. \\ ===== Branch - Crossbow ===== runcap.sh @@ -37,8 +37,8 @@ readtag() { echo - read -p "Enter TAG value or leave blank to use trunk as repository: " TAG - export TAG + read -p "Enter BRANCH value or leave blank to use trunk as repository: " BRANCH + export BRANCH echo } config/deploy.rb @@ -17,7 +17,7 @@ # via the :deploy_to variable: set :deploy_to, "/deploy/crossbow" -before "deploy:update_code", "verify_tag", "deploy:web:disable", "solr:stop" +before "deploy:update_code", "verify_branch", "deploy:web:disable", "solr:stop" after "deploy:web:disable", "httpstate:down", "god:stop" after "deploy:update_code", "customs:dblink", "deploy:migrate" before "deploy:migrate", "masterdb:backup" @@ -25,15 +25,15 @@ before 'deploy:package_assets', 'sass:update' after "deploy:web:enable", "httpstate:up" -task :verify_tag do +task :verify_branch do set :scm_username, Capistrano::CLI.ui.ask('Enter SVN UserName: ') set :scm_password, Capistrano::CLI.password_prompt('Enter SVN Password: ') -tag = (ENV["TAG"] || "") +branch = (ENV["BRANCH"] || "") coreurl = 'https://repos.exphosted.com/svnrepos/crossbow' -if tag == "" +if branch == "" set :repository, "#{coreurl}/trunk" else - set :repository, "#{coreurl}/tags/#{tag}" + set :repository, "#{coreurl}/branches/#{branch}" ===== Branch - BBB ===== deploybbbclient.sh @@ -8,7 +8,7 @@ if [ x$readytorun = 'xy' -o x$readytorun = 'xY' ] then echo Starting... -if [ -z "$TAG" ] +if [ -z "$BRANCH" ] then notag else @@ -34,8 +34,8 @@ readtag() { echo - read -p "Enter BBB TAG value or leave blank to use trunk as repository: " TAG - export TAG + read -p "Enter BBB BRANCH value or leave blank to use trunk as repository: " BRANCH + export BRANCH echo } @@ -68,12 +68,12 @@ test -d "$TRUNKDIR" || install -d "$TRUNKDIR" cd "$TRUNKDIR" test -d bigbluebutton-client && rm -rf bigbluebutton-client -"$SVN" export --username murali https://repos.exphosted.com/svnrepos/collaboration/bbb/tags/"$TAG" -if [ -d "$TAG" ] +"$SVN" export --username murali https://repos.exphosted.com/svnrepos/collaboration/bbb/branches/"$BRANCH" +if [ -d "$BRANCH" ] then mkdir bigbluebutton-client cp -rp "$BBBDIR"/bigbluebutton-client/* bigbluebutton-client/ -/usr/bin/rsync -av "$TAG"/* bigbluebutton-client/ +/usr/bin/rsync -av "$BRANCH"/* bigbluebutton-client/ cd bigbluebutton-client/ sed -i -e "s/192.160.2.240/$MEETURL/g" src/conf/config.xml sed -i -e "s/192.168.2.132:3000/qa01.learnexa.com/g" src/conf/config.xml @@ -86,16 +86,16 @@ ln -nfs ${BBBDIR}/${CURRBBBCLIENT} bigbluebutton-client cd ${BBBDIR}/bigbluebutton-client ln -nfs ${BBBDIR}/bigbluebutton-client/bin client -echo BBB Code deployed from tag "$TAG" on `date` > DEPLOYMENT.txt +echo BBB Code deployed from branch "$BRANCH" on `date` > DEPLOYMENT.txt echo -e "\nDone with deployment...\n" echo -e "\nRestarting all BBB processes...\n" sudo ${BBBCONF} --restart sudo /usr/sbin/service glusterd restart echo Cleaning ${TRUNKDIR} ... cd ${TRUNKDIR} -rm -rf "$TAG" bigbluebutton-client +rm -rf "$BRANCH" bigbluebutton-client else -echo "$TAG" directory not created... +echo "$BRANCH" directory not created... echo "No code was deployed... No changes made to the BBB Client code..." fi } deploy_recorder_server.sh @@ -8,7 +8,7 @@ if [ x$readytorun = 'xy' -o x$readytorun = 'xY' ] then echo Starting... -if [ -z "$TAG" ] +if [ -z "$BRANCH" ] then notag else @@ -34,8 +34,8 @@ readtag() { echo - read -p "Enter Recorder Server TAG value or leave blank to use trunk as repository: " TAG - export TAG + read -p "Enter Recorder Server BRANCH value or leave blank to use trunk as repository: " BRANCH + export BRANCH echo } @@ -80,7 +80,7 @@ cd "$TRUNKDIR" test -s "$TRUNKDIR"/recorder/dist/recorder.war && cp "$TRUNKDIR"/recorder/dist/recorder.war "$TRUNKDIR"/red5_war_backups/recorder.war_`date '+%Y%m%d%H%M'` test -d recorder && rm -rf recorder -"$SVN" export --username murali https://repos.exphosted.com/svnrepos/collaboration/recorder/server/tags/"$TAG" recorder +"$SVN" export --username murali https://repos.exphosted.com/svnrepos/collaboration/recorder/server/branches/"$BRANCH" recorder [ "$(ls -A ${TRUNKDIR}/recorder)" ] && cd ${TRUNKDIR}/recorder || { echo Dir ${TRUNKDIR}/recorder empty or does not exist, exiting script...; exit 1; } echo -e "\nStarting ant build...\n" ant || { echo Issues with ant, exiting, no changes made to the existing installation; exit 1; } ===== Show server info ===== ====Goals:==== * Clearly visible server info and environment info * Get a final consent for accountability. #read -p "Ready to run task $captask in environment $capenv..? [yY]: " readytorun GETS REPLACED WITH echo -e "\033[104m Server: \033[1m `hostname` \033[21m" echo -e " Environment: \033[1m $capenv \033[21m \033[0m" echo -e "\033[7m Please verify the values above. \033[5m [Enter to Continue]\033[0m" read read -p "Ready to run task $captask [yY]? " readytorun Looks something like this: {{:screen_shot_2014-04-15_at_4.10.02_pm.png|}} ==== Ship checklist ==== 1) Review by Udaya and Murali. 2) Ships to DEV (for atleast 1 release). 3) Ships to QA and PROD.