Antares Trader Blog

The universe at your fingertips

The Big Redeploy

Thursday

Sep 03, 2009

7:39 pm

Tomorrow's project is redeploying these blogs. I always get nervous when I do a big deployment. I'm not a sysadmin, and I do not have a lot of practice at it. Switching from WordPress over to this blog went pretty smoothly thanks to a good deal of forethought and planning. I'm hoping that the same thing will hold true this time.

What make this redeployment tricky is the need to rebuild the database. It's funny how one can be very cavalier about backup and data loss when all your data can be recreated in a few minutes from fixtures or factories. Now that I have 18 months of posts up, and as I watch these post still getting visitors, I suddenly feel like I really need to keep the site available, and not change my URL space.

I have a plan to accomplish all this and my intent is tweet about my progress. Below is the checklist I will be using. My tweets will refer to it.

  • Merge multiblob branch into master
  • ensure gem cache is up to date
  • Backup old blog
  • Deploy from scratch on local machine
    • specs pass
    • features pass
    • restore from backups
    • hand check logging in and posting
  • Log onto server
  • Edit NginX Config files for new port (do not restart)
  • pull git archive into new folder
  • Redeploy gems (Thor merb:gem:redeploy)
  • create new MySQL Database
  • setup config files
  • drop old deploy to single instance to free up memory
  • run tests/ features with production environment
  • Start Merb single
  • SSH tunel to new merb instance
  • Login from local box and restore backups for both blogs
  • Spot check for URL consistency, GUID and feeds.
  • Write success post and publish
  • restart NginX -- this brings up the new blog
  • spot check both blogs serving from new datastore
  • kill old merb process
  • add restart new blog with multiple instances in daemon mode.
  • If everything stays healthy, remove old cruft Wednesday

edit delete