Production Deployment - pulibrary/pul_library_drupal GitHub Wiki

Staging

  1. Login as drupal user > ssh drupal_librarystage
  2. In another terminal Login as systems users > ssh systems@library-dev
  3. As Drupal user > cd /var/www/apps/library-stage
  4. As Drupal user > drush @stage cc all
  5. As systems stop apache server > sudo /etc/init.d/httpd stop
  6. As Drupal user > redis-cli flushall
  7. As Drupal user > drush sql-sync --no-cache @libraryprod @stage
  8. As Drupal user > drush rsync @libraryprod:%files/ @stage:%files
  9. As Drupal user in /var/www/apps/library-stage run > git fetch
  10. As Drupal user in /var/www/apps/library-stage run > git pull origin master
  11. As Drupal user run > drush updatedb
  12. As Drupal user run > drush @stage cc all and flush all caches
  13. As Drupal user > redis-cli flushall
  14. As system user restart apache > sudo /etc/init.d/httpd restart
  15. Make sure site turns over.
  16. As Drupal user run any module installations, feature-reverts needed by the update
  17. If things still are amiss manually flush cache in Drupal UI.

Production

  1. Login as drupal user > ssh libraryprod
  2. In another terminal Login as systems users > ssh systems@library-prod
  3. As Drupal user > cd /var/www/apps/library
  4. As Drupal user run > drush @prod cc all and flush all caches
  5. As Drupal user > redis-cli flushall
  6. As systems stop apache server > sudo /etc/init.d/httpd stop
  7. As Drupal user in /var/www/apps/library-stage run > git fetch
  8. As Drupal user in /var/www/apps/library-stage run > git pull origin master
  9. As Drupal user run > drush updatedb
  10. As system user restart apache > sudo /etc/init.d/httpd restart
  11. Make sure site turns over.
  12. As Drupal user run any module installations, feature-reverts needed by the update
  13. If things still are amiss manually flush cache in Drupal UI.

A note on Varnish

If Varnish is not restart the cache will persist as it was and changes introduced by the update will gradually be applied as uncached pages are requested or cached pages expire. If an update is major enough restart varnish and flush the entire cache with the following command.

> sudo /etc/init.d/varnish restart