Updating osgi-runner and/or OSGi Bundles

Introduction

In theory, OSGi containers should be able to handle live updates of OSGi bundles at runtime without having to restart anything.

However, real world experience has proven otherwise, it's more efficient to perform updates while the container is stopped.

The following chapter provides a quick step-by-step list for quick updates without to much headache.

Update checklist for ITEG-style OSGi environments

  • Download the newest installers of all components that shall be updated. It is usually a good idea to check all components' Folders on fx.iteg.at for new installers and update all updates available.
    Components usually inlcude:
    • osgi-runner, osgi-runner-X.X.X.X-setup-x64.exe, in the Folder "OSGi Runner Installer".
    • Bundles Pkg, the common OSGi library bundles, bundles-pkg-X.X.X.X-setup.exe, in the Folder "OSGi base bundles".
      Every now and then new JDBC drivers are put in the same folder.
    • For TISGraph only: tisgraph-bundles-X.X.X.X-setup.exe and wiskidataaccess-*.jar in the "TISGraph Installers" folder.
    • For MDA only: mda-server-core-X.X.X.X-setup.exe in the "MDA Core installers" resp. mda-server-mycompany-X.X.X.X-setup.exe in the individual folder for Your organization.
  • To be faster lateron, open the relevant folders where work is to be done, including eventual manual rotation of log files or cleanup of tmp directories.
  • Stop the osgi-runner service (net stop osgi-runner, sc query osgi-runner ...).
  • Make sure the osgi-runner service is stopped.
  • Eventually do manual cleanup work, like log file rotation, cleanup of tmp folders, database backups, whatever one feels appropriate to do.
  • If You tend to click to fast, slow down right now. Eventually perform the uninstallers of the currently installed versions of the components to update before starting the new installers.
  • If osgi-runner is to be updated, execute the new osgi-runner installer (osgi-runner-X.X.X.X-setup-x64.exe). Make sure to accept it's offer to start the uninstaller of the osgi-runner currently installed.
  • If Bundles-Pkg is to be updated, execute the new installer (bundles-pkg-X.X.X.X-setup.exe). Make sure to accept it's offer to start the uninstaller of the Bundles-Pkg currently installed.
  • If application bundles are to be updated, execute all new installers (*-bundles-X.X.X.X-setup.exe). Make sure to accept their offers to start the uninstaller of the according bundles package currently installed.
  • If You have received a list of special steps to be performed, perform them now.
    Examples  are:
    • Editing configuration files in osgi-runner's etc\ folder or prepared copying configuration files there (eventually we have sent prepared config files via E-Mail)
    • Replacing the JDBC driver with a newer one (osgi-runner's drivers\ folder)
  • Start the Karaf service (net start osgi-runnersc query osgi-runner ...).
  • Wait a minute or two.
  • Try to login into the application.