RHEL: Upgrade Pivotal GemFire from RPM

If your guest operating system is Red Hat Enterprise Linux (RHEL) and you have installed a previous version of standalone GemFire using RPM, Pivotal recommends that you use RPM distribution to upgrade Pivotal GemFire. You complete the upgrade procedure on every virtual and physical machine that will run GemFire.

Note: Thoroughly test your development systems with the new version before moving into production.

When you upgrade Pivotal GemFire on RHEL from RPM, the software is installed by default into /opt/pivotal/Pivotal_GemFire_XXX where XXX corresponds to the version of GemFire (for example, Pivotal_GemFire_702) that you have installed. The Pivotal GemFire installation is owned by the gemfire user in the pivotal group.

Note: To upgrade your existing GemFire installation, Pivotal recommends that you use the rpm -Uvh command. This includes those upgrading from a VMware vFabric RPM installation.

When you upgrade Pivotal GemFire using the RPM, the upgrade process installs the new version into its own installation directory (/opt/pivotal/Pivotal_GemFire_XXX where XXX corresponds to the newly installed version). Any older GemFire RPM installations (including those installed with VMware vFabric RPMs) will be removed. Data files from those installations will not be removed and should be moved manually to the new Pivotal installation.

Prerequisites

Before you upgrade, complete the following prerequisites:

Procedure for Upgrading Pivotal GemFire 6.x.x to 7.0.x

Use the following procedure to upgrade Pivotal GemFire 6.x.x to 7.0.x using RPM:
  1. Review the items listed in Prerequisites and make any appropriate preparations.
  2. Stop all members of the system running with the prior 6.x.x version.
    1. Shut down all members running a cache by using the gemfire shut-down-all command:
      sudo -u gemfire -E gemfire –J-DgemfirePropertyFile=mygemfire.properties shut-down-all
      In the sample command, substitute mygemfire.properties with the location of the previous Pivotal GemFire's gemfire.properties file for the distributed system you are shutting down.
    2. Shut down any locators. To shut down a locator in 6.x.x deployments, issue the following command:

      gemfire stop-locator -port=port -address=ipAddr -dir=locatorDir

      Replace port, ipAddr and locatorDir with the appropriate values.

    3. Make backups of your disk store files.
    See Shutting Down Your System in the GemFire 6.6 documentation set for more details.
  3. Execute the following rpm command. If necessary, use sudo to run the command either as root or as the gemfire user. For example:
    RHEL 5:
    prompt# sudo -u gemfire -E rpm -Uvh pivotal-gemfire-7.0.2-1.el5.noarch.rpm
    RHEL 6:
    prompt# sudo -u gemfire -E rpm -Uvh pivotal-gemfire-7.0.2-1.el6.noarch.rpm

    The rpm command begins the install process, resolves dependencies, and displays the packages it plans to install.

  4. Repeat this upgrade procedure for every virtual or physical machine on which you will run Pivotal GemFire.
  5. Recompile your Java applications against the gemfire.jar in the 7.0.X version of the product.
  6. Upgrade your disk store files.
    • If you will be upgrading to GemFire 7.0.x from a GemFire version earlier than 6.5.x, upgrade your disk store files by using the DiskConverterPre65to65 tool. See DiskConverterPre65to65 for instructions on running the tool.
    • If you are upgrading from GemFire 6.5.x or 6.6.x (or have just upgraded your disks to 6.5 compatibility with the DiskConverterPre65to65 tool), run the gfsh command upgrade offline-disk-store tool to upgrade the disk stores to Pivotal Gemfire 7.0.x. See upgrade offline-disk-store for more information.
  7. Redeploy your environment's configuration files to the new version's installation. For example, you may need to do one of the following tasks depending on your GemFire deployment configuration:
    • If you are using common configuration files, update your configuration files as required with the path to the new installation. See Deploying Pivotal GemFire Configuration Files for more information on how to deploy configuration files.
    • If you are using local configuration files, update each set of configuration files that are local to the distributed system you are upgrading. If you are using local files, you also have the option to do a rolling upgrade and upgrade each distributed system one at a time. See Deploying Pivotal GemFire Configuration Files for more information on how to deploy configuration files.
  8. Point all member sessions to the new installation of GemFire. For example, you may need to do one of the following tasks depending on your application's configuration:
    • Modify your applications to point to the new GemFire product tree location.
    • Copy the gemfire.jar file out of the new GemFire product tree location and replace the existing gemfire.jar file in your application.
  9. Restart all system members according to your usual procedures. See Starting Up Your System for more information.

Procedure for Upgrading Pivotal GemFire 7.0.1 to 7.0.2

The following procedure describes how to upgrade your entire distributed system from Pivotal GemFire 7.0.1 to 7.0.2 at once. You also have the option of performing a rolling upgrade. See Performing a Rolling Upgrade.
  1. Review the items listed in Prerequisites and make any appropriate preparations.
  2. Stop all members of the system running with the prior version. For example:
    1. Open a gfsh prompt.
    2. Make sure you are connected (via its JMX Manager) to the distributed system you wish to shutdown.
    3. At the gfsh prompt, type:
      gfsh>shutdown
    4. Type Y at the prompt to shut down your entire distributed system.
    5. Shut down each locator in the distributed system by using the stop locator command. For example:
      gfsh>stop locator --name=locator_name
    6. Make backups of your disk store files.
    See Shutting Down the System for more details.
  3. Execute the following rpm command. If necessary, use sudo to run the command either as root or as the gemfire user. For example:
    RHEL 5:
    prompt# sudo -u gemfire -E rpm -Uvh pivotal-gemfire-7.0.2-1.el5.noarch.rpm
    RHEL 6:
    prompt# sudo -u gemfire -E rpm -Uvh pivotal-gemfire-7.0.2-1.el6.noarch.rpm

    The rpm command begins the install process, resolves dependencies, and displays the packages it plans to install.

  4. Repeat this upgrade procedure for every virtual or physical machine on which you will run Pivotal GemFire.
  5. Point all member sessions to the new installation of GemFire. For example, you may need to do one of the following tasks depending on your application's configuration:
    • Modify your applications to point to the new GemFire product tree location.
    • Copy the gemfire.jar file out of the new GemFire product tree location and replace the existing gemfire.jar file in your application.
  6. Restart all system members according to your usual procedures. See Starting Up Your System for more information.

What to Do Next

After you upgrade Pivotal GemFire from RPM, you can perform the following tasks: