-
livable streets QA release notes
last modified May 15 by slinkp
Steps for a new Livable Streets QA release
- Set up some environemnt variables to make these commands simpler
export CURRENTRELEASE=ijsselstein export NEWRELEASE=joure export DEVPREFIX=dev export SITE=${DEVPREFIX}.livablestreets.com export REQPROF="livablestreets/releases/${NEXTRELEASE}" export TODAY=`date +%Y%m%d` export USERNAME=[[your username]] - cut branches for NEWRELEASE
# The -N below prevents us from checking out ALL of the past releases, drastically speeding this up svn co -N https://svn.openplans.org/svn/deployments/livable-streets cd livable-streets ./cut-new-releases_locally_single_commit.py ${NEWRELEASE} svn ci -m "cutting release branches for ${NEWRELEASE}" - create a new requirements profile for NEWRELEASE
svn co https://svn.openplans.org/svn/build/requirements/livablestreets/releases cd releases ./make-next-release.sh ${CURRENTRELEASE} ${NEWRELEASE} # THERE IS A MISSING sed STEP RIGHT HERE!!! svn ci -m 'create requirements set for ${NEWRELEASE}' - log in to flow, become the openplans user
ssh flow sudo su - openplans
- take down current stack
/usr/local/topp/${SITE}/builds/${CURRENTBUILD}/bin/supervisorctl shutdown - import live database data
[flow] svn export https://svn.openplans.org/svn/scripts/database-import.sh # Stored in /usr/local/topp/scripts [flow] ./database-import.sh livablestreets $DEVPREFIX
- run the wordpress role migration script on the imported sql database
cd /usr/local/topp/wordpress_role_migration source bin/activate ./change-role-migration.py ${DEVPREFIX}_livablestreets_wordpress #[contributor] [author] deactivate - move aside the existing ZODB
mv /usr/local/topp/${SITE}/var/zeo /usr/local/topp/${SITE}/var/zeo.old mkdir /usr/local/topp/${SITE}/var/zeo - kick off a new build with the appropriate requirements profile ("livablestreets/trunk" for dev, "livablestreets/releases/NEXTRELEASE" for stage)
-
/usr/local/topp/${SITE}/newbuild.sh ${REQPROF} - (carefully examine all of the config file diffs to make sure things get set up correctly)
- Generally, you want to reject the changes in etc/opencore/gs_profile/properties.xml , accept all of the changes that are just a change of the deploy directory (obvious by the date change) and accept the change for etc/opencore/gs_profile/propertiestool.xml even though they are different, because the correct values will be inserted.
- ***Be sure you overwrite etc/opencore/gs_profile/propertiestool.xml since it's values are appended, and will bork things if you leave it***
- create symlinks
ln -s /usr/local/topp/${SITE}/builds/${TODAY} /usr/local/topp/${SITE}/builds/${NEWRELEASE} rm /usr/local/topp/${SITE}/current ln -s builds/${TODAY} /usr/local/topp/${SITE}/current - move a copy of the live ZODB in its place
/usr/local/topp/scripts/copy-live-nycstreets-zodb.sh /usr/local/topp/${SITE} /usr/local/topp/${SITE}/current - run the woonerf migrations
cd /usr/local/topp/${SITE}/current/opencore zeo/bin/zeoctl start zope/bin/zopectl run src/opencore/migrations/migrate-woonerf.py zeo/bin/zeoctl stop - get everything in the stack up and running
/usr/local/topp/${SITE}/builds/${TODAY}/bin/supervisord /usr/local/topp/${SITE}/builds/${TODAY}/bin/supervisorctlwarning, it may take a long time (> 10 minutes) for zeo to fully start the first time after restoring a copy of the live ZODB; it has to recreate the Data.fs.index file. Meanwhile, opencore will fail to start until zeo is fully up. You'll know it's done when zeo prints a line like this to /usr/local/topp/$SITE/var/logs/zeo.log:2008-05-09T14:58:20 INFO ZEO.zrpc (27647) listening on ('', 10102) - commit any config changes back to the svn repository
cd /usr/local/topp/${SITE}/current/etc svn status #(possible 'svn add' or 'svn rm' operations to make sure config is in sync) svn ci -m "committing config changes for ${NEWRELEASE}" --username ${USERNAME} - check opencore translation files in Zope root > Control Panel > Translation Service (if paths are wrong delete them and restart zope)
- check uri's in zmi opencore_properties sheet
- check /usr/local/topp/SITE/var/deliverance/hosts