Chapter 14. Upgrading

In order to upgrade the WAF packages, there are several steps you must follow. Please familiarize yourself with this entire chapter prior to upgrading. In addition, please be sure to consult the latest release notes to review any release-specific upgrade items. We highly recommend upgrading a development server prior to upgrading a staging or production server; this will allow you to review in detail all the steps required to upgrade your production server and resolve any possible issues.

As a requirement for doing an upgrade, you must have a developer prepare upgrade script. These will be envoked on the server side during the ccm upgrade. For more information, refer to Red Hat Web Application Framework Developer Guide.

There are two levels of upgrade you may be doing. Procedure 14.1, Upgrading Packages Using ccm upgrade details the process you should always follow when upgrading the major package components such as ccm-core or ccm-cms. If you are upgrading a component such as a content type or otherwise patching the code, you can shorten the process to downloading the RPM and performing the appropriate ccm upgrade.

Upgrading Packages Using ccm upgrade

  1. Perform a back up of your server code and database to preserve your current data.

    TipTip
     

    If you have modified any of the existing WAF code, you will need to reapply your patches to the newly upgraded code. Source control systems such as CVS have features that facilitate merging with third-party sources. In CVS this is known as a vendor branch. For more information, see http://www.loria.fr/~molli/cvs/doc/cvs_13.html.

  2. Download the new version(s) of the WAF packages you are upgrading. For example, if you are using Red Hat Network type:

    up2date tomcat ccm-tools-servlet-tomcat4 ccm-core ... --download

    The Red Hat Update Agent places the RPMs in /var/spool/up2date. Once the download is complete, read the release notes to gain a better understanding of new features and potential upgrade issues. API changes and improvements are listed in the release notes. The release notes for all releases are published on http://rhea.redhat.com.

  3. Prepare a static server maintenance message. Shut down your server.

  4. Determine the exact version of your current WAF installation:

    rpm -q ccm-core
    ccm-core-6.0.1-1

    The version number 6.0.1 is the --from-version in the command string.

  5. Complete the upgrade of your packages, checking the new version; the up2date command will use the packages already downloaded.:

    up2date -u tomcat ccm-tools-servlet-tomcat4 ccm-core ...
    ...
    rpm -q ccm-core
    ccm-core-6.1.0-1

    The version number 6.1.0 is the --to-version in the command string.

  6. Upgrade the core runtime:

    ccm upgrade ccm-core --from-version 6.0.1 --to-version 6.1.0
  7. Load any upgraded applications. Your specific list of packages may be different than those listed here.

    ccm load --config --init ccm-cms ccm-cms-types-agenda ccm-cms-types-article
  8. Upgrade CMS:

    ccm upgrade --from-version 6.0.1 --to-version 6.1.0 ccm-cms
  9. Load any packages that depend on the upgraded schema. In this example, we load the File Attachment CMS asset:

    ccm load ccm-cms-assets-fileattachment
  10. Run hostinit and make sure to use the --clean flag. For example:

    ccm hostinit  --parameter http-port=9090 --parameter shutdown-port=9091 --clean
  11. Restart your server and test your system to ensure that the upgrade was successful.

  12. Check the updated, tested code (with all merged patches, as appropriate) into your source control system.

  13. Repeat the above process on your staging server, except check out your source code from your main repository instead of using the RPMs. Verify the above process, and then repeat for your production server.

CautionCaution
 

Although every attempt is made to ensure the integrity of your data, it is highly recommended that you make a backup copy of your database before you upgrade, and that you test the upgrade process on a backup copy before running it in production.