YTMND 2.1 Migration TODO

Before Migration

  1. Backup and wipe the new master database server's disk.
  2. Download and install the latest version of Percona server.
  3. Write one-time-use backup scripts for db servers and web servers (configs too!).
  4. Set up chat server on

At Migration

  1. Turn off via the down mechanism.
  2. Run the preview generator on static servers.
  3. Turn off all the cron jobs on production web servers.
  4. Start backup script on production web servers.
  5. Do a full dump of all databases on the production database master.
  6. Start DB backup shell script on old master db server. [dump each DB and transfer them to the backup server]
  7. Transfer the full dump to the new master database server.
  8. Run mysql_upgrade on the new master.
  9. Completely clear the MySQL access list on the new master.
  10. Create the following users: [root, replicator, ytmnd_www, ytmnd_sites, ytmnd_search, ytmnd_votes, test]
  11. Update PHP on the production webservers to the new compile.
  12. Turn off the web webservers.
  13. Move the old web directories to a temporary location (on content and web servers).
  14. Do a fresh SVN checkout of the trunk (on content and web servers).
  15. Generate configurations from m4 scripts in config/services/ and put them in their final locations.
  16. Update the global configuration file [in config/common]
  17. Update the javascript configuration file [in web/static/assets/js/common]
  18. Do a lint check on the configuration file.
  19. Edit recaptcha.php to make sure it has the right keys.
  20. Verify services are working, and if so, start the webservers.
  21. Visit to verify that it's working as intended.
  22. Start the migration script using the manifest [cdr; cd tools/migration/2.1; sh]
  23. It will pause at a certain point for the database schema upgrade. [Ctrl-Z and then cd ../../; php db_update.php]
  24. Follow the instructions written in the db_update file, this will take a long time.
  25. Once the db_update is done, run fg and finish the migration script.
  26. At this point you have a cold-start situation. [cdr; cd cron; sh] This will warm up the cache.
  27. Add the cron jobs from the docs/crontab file.
  28. finish writing this.

After Migration

  1. Run the view tally for 07-15
  2. write this too.