Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The scripts we use assume a directory layout like this

Wiki Markup
/libweb/sites/\[domain name\]/htdocs/

Wiki Markup
/libweb/sites/\[domain name\]/make/

Wiki Markup
and assume there is a [drush alias|http://eporama.com/ramblings/drush-aliases] set up for the site called @\[domain name\] .


How to change the modules and themes

  • do a subversion checkout of https://svn.library.cornell.edu/cul-drupal
  • Wiki Markup
    find your make file under cul-drupal/\[drupal_6 or drupal_7\]/make/\[your site name\]/\[your site name\].make
  • add lines or modify the version of the module listed according to the drush make file format (use other sites for examples)
  • check in the changed version

How to rebuild your site

  • Wiki Markup
    go to victoria02 and cd /libweb/sites/\[your site name\]/make
  • Wiki Markup
    svn up \[your site name\]
  • Wiki Markup
    sudo dr-make.sh @\[your site name\]

How to update your code on the site

  • make changes on your copy and check them in to svn
  • Wiki Markup
    go to victoria02 and cd /libweb/sites/\[your site name\]/htdocs/sites/all/\[modules or themes\]/\[your code's name\]
  • svn up

How to work with your custom themes/modules

  • check out svn copies on your machine
  • edit/whatever the copies
  • check in changes

How to move from production to test

  • Log on to the production Drupal site and configure the 'Site under maintenance' block
    • Under 'Page specific visibility settings' select 'Show on every page except the listed pages.'
  • Make a backup of the production site to the Manual Backups Directory (using Backup and Migrate module)
    • Drupal 6: http://$productiondomain/admin/content/backup_migrate/export
    • Drupal 7: http://$productiondomain/admin/config/system/backup_migrate
  • Log on to the test Drupal site
  • Put the test site into maintenance mode
    • Drupal 6: http://$testdomain/admin/settings/site-maintenance
    • Drupal 7: http://$testdomain/admin/config/development/maintenance
  • Wiki Markup
    go to victoria02 and cd /libweb/sites/\[your site name\]/make
  • Wiki Markup
    sudo update_test_from_production.sh \[your production site domain\] \[your test site domain\]
    • the script will ask you if you completed each of the steps above and give you all the real paths to the pages you need to use
    • the script moves the site with rsync
  • Log on to the test Drupal site
  • Restore the latest backup
    • Drupal 6: http://$testdomain/admin/content/backup_migrate/destination/list/files/manual
    • Drupal 7: http://$testdomain/admin/config/system/backup_migrate/destination/list/files/manual
    • click 'restore' next to the latest version of the file (hint: sort by file name!)
  • take the test site out of maintenance mode

How to move from test to production

  • Log on to the test Drupal site
  • Make a backup of the test site to the Manual Backups Directory (using Backup and Migrate module)
  • Log on to the production Drupal site
  • Put the production site into maintenance mode
  • Wiki Markup
    go to victoria01 and cd /libweb/sites/\[your site name\]/make 
  • Wiki Markup
    sudo update_production_from_test.sh \[your test domain\] \[your production domain\]
    • the script will ask you if you've done each step and give you all the proper paths
  • restore the latest backup
  • configure the 'site under maintenance' block
    • Under 'Page specific visibility settings' select 'Show on only the listed pages'