MidVision

Upgrading RapidDeploy and its plugins from an earlier version

1. Upgrading the RapidDeploy Framework Server using the provided script

On Linux, Unix and Mac operating systems

You can follow the process below to quickly upgrade RapidDeploy from any version of RapidDeploy 4.0+ to the latest downloaded version. You will require the new RapidDeploy assembly (zip file) which can be downloaded from the download pages.
  1. In this example, ${MV_HOME}, the directory under which all the RapidDeploy folders can be found, is /var/midvision. Your RapidDeploy installation may have a different ${MV_HOME}. On the MidVision Cloud images on the AWS and Azure Marketplaces, the ${MV_HOME} is /var/rd/midvision.
  2. Prior to upgrading, run the following script in your existing RapidDeploy installation with the ‘backup’ argument, which stops RapidDeploy and copies the required files to the /tmp directory on your server into a new folder with the current date stamp:
    ${MV_HOME}/bin/upgrade.sh backup
  3. Now move your existing RapidDeploy installation to a safe location by moving the ${MV_HOME} directory to another (backup) location. For example, if your current installation is in /var/midvision folder, you can run:
    cd /var
    mv midvision midvision-backup-1
  4. Unzip the new RapidDeploy assembly in the original location, the /var folder. The midvision folder will be recreated.
    cd /var
    unzip rapiddeploy-web-app-lnx.zip
  5. Rerun the ‘upgrade’ script with the ‘restore’ argument in the new installation. The script will pull the saved folders back from the /tmp directory:
    ${MV_HOME}/bin/upgrade.sh restore
  6. You will be prompted to amend the new rapiddeploy.properties file with any differences detected between the two versions.
    vi ${MV_HOME}/bin/rapiddeploy.properties
  7. Restart the RapidDeploy server. This process will also populate the RapidDeploy lib folders:
    ${MV_HOME}/bin/start-web-app.sh

On Windows operating systems

You can follow the process below to quickly upgrade RapidDeploy from any version of RapidDeploy 4.0+ to the latest downloaded version. You will require the new RapidDeploy assembly (zip file) which can be downloaded from the download pages.
  1. In this example, %MV_HOME%, the directory under which all the RapidDeploy folders can be found, is C:\midvision. Your RapidDeploy installation may have a different %MV_HOME%. On the MidVision Cloud images on the AWS and Azure Marketplaces, the %MV_HOME% is C:\rd\midvision.
  2. Prior to upgrading, run the following script in your existing RapidDeploy installation with the ‘backup’ argument on a Windows CMD, which stops RapidDeploy and copies the required files to the temporary directory (%TMP%) on your server into a new folder with the current date stamp:
    %MV_HOME%\bin\upgrade.bat backup
  3. Now rename your existing RapidDeploy installation, the %MV_HOME% directory, with another name to back it up, for example C:\midvision-backup-1.
  4. Unzip the new RapidDeploy assembly in the original location, the C:\ root folder. The midvision folder will be recreated.
  5. Rerun the ‘upgrade’ script with the ‘restore’ argument on a Windows CMD in the new installation. The script will pull the saved folders back from the temporary directory (%TMP%):
    ${MV_HOME}\bin\upgrade.bat restore
  6. You will be prompted to amend the new rapiddeploy.properties file with any differences detected between the two versions. Edit this file and make sure all the necessary configurations are in place.
  7. Restart the RapidDeploy server. This process will also populate the RapidDeploy lib folders:
    ${MV_HOME}\bin\start-web-app.bat

2. Upgrading the RapidDeploy Framework Server manually

To upgrade RapidDeploy from an earlier version of 4.x, perform the following steps:
  1. Stop RapidDeploy as follows, which will write the in-memory database (if used) to file:
    ${MV_HOME}/bin/stop-web-app.sh
    or
    %MV_HOME%\bin\stop-web-app.bat
  2. Check that the following file is present (only required if using the internal HSQL database):
    ${MV_HOME}/users/[RD-USER]/mv-data.rds
    or
    %MV_HOME%\users\[RD-USER]\mv-data.rds
    Where RD-USER is the OS user you used to install/start RapidDeploy.
  3. Back up the following directories:
    ${MV_HOME}/logs
    ${MV_HOME}/projects
    ${MV_HOME}/buildstore
    ${MV_HOME}/promotionstore
    ${MV_HOME}/snapshots
    ${MV_HOME}/resources
    ${MV_HOME}/libraries
    ${MV_HOME}/users
    ${MV_HOME}/proj-lib
    or
    %MV_HOME%\logs
    %MV_HOME%\projects
    %MV_HOME%\buildstore
    %MV_HOME%\promotionstore
    %MV_HOME%\snapshots
    %MV_HOME%\resources
    %MV_HOME%\libraries
    %MV_HOME%\users
    %MV_HOME%\proj-lib
  4. Install the new version of RapidDeploy.
  5. Restore the directories you backed up to the same locations.
  6. If you have made changes to the $MV_HOME/bin/rapiddeploy.properties file, re-apply these changes to the new file (you can use the ‘diff‘ or the ‘fc‘ commands if necessary).
  7. Start the new instance of RapidDeploy as follows:
    ${MV_HOME}/bin/start-web-app.sh
    or
    %MV_HOME%\bin\start-web-app.bat

3. Upgrading the RapidDeploy Framework Server in Docker

Upgrading a RapidDeploy that is running in a Docker container is very simple. To upgrade (in this example we’re upgrading from RapidDeploy 5.0.20 to 5.0.21. Replace 5.0.21 with the actual version you are upgrading to):
  1. Pull the new version from Docker Hub using: docker pull midvision/rd:5.0.21
  2. Stop the currently running RapidDeploy container: docker stop midvision_rapiddeploy
  3. Rename the old container: docker rename midvision_rapiddeploy midvision_rapiddeploy_5020
  4. Run the new container using the new image: docker run -t -d -p 9090:9090 -v ~/dockershare/external/rd/libraries:/rd/libraries -v ~/dockershare/external/rd/resources:/rd/resources -v ~/dockershare/external/rd/snapshots:/rd/snapshots -v ~/dockershare/external/rd/logs:/rd/logs -v ~/dockershare/external/rd/projects:/rd/projects -v ~/dockershare/external/rd/db:/rd/users/root -v ~/dockershare/external/rd/buildstore:/rd/buildstore -v ~/dockershare/external/rd/promotionstore:/rd/promotionstore -v ~/dockershare/external/rd/users:/rd/users --name "midvision_rapiddeploy" midvision/rd:5.0.21

4. Upgrading RapidDeploy Installed Plugins

Install New Plugins

After upgrading using one of the methods above, you will need to re-install any plugins that are not shipped with the framework server according to the article here: https://www.midvision.com/rapiddeploy-how-to-guides/install-additional-plugins

Update Plugin Data

Sometimes after upgrading the RapidDeploy Framework Server, you will need to upgrade your plugin data for compatibility with new plugin fields. You can check if the release requires a plugin upgrade in the changes report. If this is the case, use the following procedure:

  1. Upgrade the RapidDeploy Framework Server as detailed above.
  2. Log in to RapidDeploy.
  3. Navigate to ‘System Icon’ -> ‘Plugin Manager’.
  4. Click the ‘Update Plugin Data’ button in the top right-hand corner.
  5. All your Resource, Server and Project (artifact and SCM) plugins will be updated.

You can also upgrade individual plugin types for Resource, Server and Project plugins on their respective list pages. You do this by clicking on the ‘Spanner’ icon in the top right-hand corner of the table.