Skip to content

Production Deployment

axapu edited this page Oct 10, 2014 · 10 revisions

Staging

  1. Login as drupal user > ssh 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 sql-sync --no-cache @libraryprod @stage
  5. As systems stop apache server > sudo /etc/init.d/httpd stop
  6. As Drupal user in /var/www/apps/library-stage run > git fetch
  7. As Drupal user in /var/www/apps/library-stage run > git pull origin master
  8. As Drupal user run > drush updatedb
  9. As Drupal user run > drush @stage cc and flush all caches
  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.

Production

      1. Login as drupal user > ssh libraryprode
      1. In another terminal Login as systems users > ssh systems@library-prod
      1. As Drupal user > cd /var/www/apps/library
      1. As systems stop apache server > sudo /etc/init.d/httpd stop
      1. As Drupal user in /var/www/apps/library-stage run > git fetch
      1. As Drupal user in /var/www/apps/library-stage run > git pull origin master
      1. As Drupal user run > drush updatedb
      1. As Drupal user run > drush @stage cc and flush all caches
      1. As system user restart apache > sudo /etc/init.d/httpd restart
      1. Make sure site turns over.
      1. As Drupal user run any module installations, feature-reverts needed by the update
      1. 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