Updating Drupal 7 Sites

Overview

This procedure describes the process we use to update Drupal 7 sites on Pantheon. It will explain the steps we take and why we take those steps. We look at updating the site as a three phase process. Those phases are "Preparing the Site for Updating", and "Updating Dev". Do not worry about "Pushing to Live"; Sam will do this part.

Site Assignments

The following sites are assigned to the following developers for updating. 

Jimmy

  • Accessible Communities (cannot access live)
  • atg-ethics (good)
  • atg-saki (good)
  • BOA-WA (good)
  • CAA WA (good)
  • Contact Wa (good)
  • Corrections Ombuds (good-with uli)
  • DAHP - DAHP (good)
  • dnr-dnr (good)
  • DOH Medical Commission (good- with uli)
  • dshs-dshs (good - with uli)
  • dshs-workfirst (good - with uli & change pwd)
  • ERDC (good- with uli)
  • erfc-erfc2 (good - uli & pwd change)
  • Frontiers Wa (good)
  • goia-goia (good)
  • gov-governor (good - uli & pwd)
  • HRMS Support (good)
  • iCoop (good)
  • Intercity - BCC (good)

Makayla

  • ocio-wa (good - uli) 
  • OCS - OCS (good - uli & pwd)
  • OFM - OFM (good)
  • ofm-elc (good)
  • ofm-sgc (uli)
  • OMWBE - OMWBE (good - uli & pwd)
  • ospi-k12 (good)
  • ResultsWA (good)
  • sac-wa (good)
  • salaries (good - with uli)
  • sbe-sbe (good)
  • servewadev2 (good - uli)
  • StartTalkingNow (good)
  • theathenforum (good)
  • UTC-EFSEC (good)
  • wa-des (good)
  • washington-state-domestic-violence-and-referral (good)
  • WSGC-WSGC (good)
  • WSHRC - HUM (good)
  • WSUX (good - uli & pwd)
  • WSWC-WSWC (good with uli)

WaTech Updates

  • hr-portal (cannot access)
  • OMWBE Intranet (cannot access)

Preparing the Site For Updating

In this phase of updating our purpose is to prepare the site for updating and possible recovery if something goes wrong. You will back up the DEV site. You will also review the dev site to ensure that it is currently operating as it should. You want to know the state of the site before you make any changes to it so you can confirm how the site responds once you make the changes. 

Back-up Website

In this step you will create a back-up of DEV. You do this in the event that after you update the site and discover that there is a major issue you can reset the site to the point where you backed it up. 

Step 1. Log into pantheon and navigate to the site you want to update.

Step 2. Back-up DEV. Click on the Environment tab near the top left of the page. Then on the left side navigation click on "Backups". Then click the button "Create New Backup". 

INSERT SCREENSHOT

Review Functionality and Appearance

Once you have backed up DEV go confirm that it appears and functions the way it should. This will help you determine after you have applied your updates whether your updates altered the site in any unintended ways. 

Step 1. Visually look around DEV site by clicking on the "site admin" button on the top left bar. Log in and make sure it looks the way it should and you do not see any errors. If you do not have a username and password for a site, you can use the following command to create a one-time user login:

terminus drush <sitename>.<environment> -- uli

Step 2. Review DEV admin>reports>recent log messages to see if there are any errors currently being shown. You will likely see some red bars. Please just make a note of these errors. After updating, you want to check that there are not more/outstanding errors.

screen shot recent log messages

Step 3. Review DEV admin>reports>available updates to confirm what updates need to be made. If the module is green it is good. If it is yellow it needs to be updated. If it is red it urgently needs to be updated because it is a security update.

screen shot of available updates

- review modules that need to be updated and their functionality. 

Step 4. Review DEV admin>reports>status report and take note of errors. You will check this page again after updating to see if there are any new errors.

Updating Dev

This is the phase where you will actually update the dev site. In Pantheon, switch the site over to SFTP (not Git) which allows the code to be updated from the outside sources. From there you will go and select the modules you want to update. Drupal will then update those modules and you will then go check to see if there were any unintended impacts.  

Step 1. In Pantheon, switch the site to SFTP. Click on the DEV tab. Click on the "Code" in the left nav. Then click on "SFTP" and this will switch the site from Git to SFTP. If it is already in SFTP leave it there.

screenshot pantheon sftp

Step 2. On the DEV site, go to admin>modules>updates and review against the "no-update" list below to ensure you do not update modules that could either not work and break the site.

screenshot of modules needing to be updated

Module Version Comment
SAML Service 3.0 3.1 breaks the log on though there is a "patch" at drupal.orghttps://www.drupal.org/project/saml_sp/issues/3180722
Date 7.x-2.11-rc1 Do not install updates if the site has the "Date All Day" submodule installed. Wait until 7.x-212 is released.
OpenPublic 1.7 You are free to try and update, but it will not. Once the update fails move on. 

 

Step 3. In the DEV site go to admin>modules>updates. Click the checkbox next to the update you want to download. Then click the "download these updates" button. Click continue (note: you have already backed up the site).

INSERT SCREENSHOT

Step 4. (skip if you clicked "run database updates" in step 3) In the Dev site, go to admin>house icon> run updates and update the databases. You should see the modules that have been successfully installed and the next steps. Click on the "Run database updates" under the next steps instructions. Click continue and view the updates and pending updates. Run the pending updates, which should match the updates you have chosen to download.

INSERT SCREEN SHOT?

screen shot clear cache and database updates

Step 5. On the DEV site, go to admin>house icon> flush cache and clear the cache.

Step 6. On the DEV site, review admin>reports>available updates to confirm all the updates went up and that there are none pending.

Step 7. On the DEV site, review admin>reports>recent log messages to see if there are new errors that previously were not there.

Step 8. On the DEV site, review admin>reports>status report to confirm there are no new error messages and that the updates have gone through.

Step 9. On the DEV site, click around the website starting with the front page. Do a visual inspection to check that everything looks the way it should. 

Step 10. SFTP Commit. Go back to the Pantheon dashboard and type into the field "module updates" or "core and module updates". Then click the button "Commit". Once done click "Git" and return the site to git mode. 

screen shot sftp commit

Step 11. Notify Sam you have updated DEV and Sam will push to LIVE.

Step 12. If this is a core update, update the D7 paid spreadsheet with your website action. Enter "<date> DEV <your initials>.