Skip to main content
Kinetic Community

Bundle code syncronization in a load balanced environment

Overview

This article covers basic steps to keep bundle code in a load balanced environment synchronized.  Due to the fact that this can very dramatically between companies we will only be providing the most basic techniques with a caveat where appropriate.

Steps to synchronize bundles

  1. Shutdown the first server to be update.
  2. Locate the Bundle that is to be updated.  Typically the path from the Tomcat server is <server>/webapps/kinetic/app/bundles/<bundle to be updated>
  3. From here the whole bundle can be updated or just specific files that require changing.
  4. Rename or Save, to an external directory, the old bundle or files.
  5. Move or Copy/Paste the new bundle or files into the directory where the old bundle/files were.
  6. Restart the server.  If this is in production it is advised that the server be removed from the load balancer until testing is complete.
  7. Test to make sure application is still worked as expected.  Make sure to verify that a fully qualified path to the correct server is being used.
  8. If tests are good return the server to the load balanced environment.  If testing fails rollback changes or troubleshoot issue.
  9. Repeat steps 1 - 8 for all remaining servers in the environment.

Other possible options

Instead of replacing bundles/files in step 5 using a git command to pull the most recent changes can be done.  This requires that git be initialized for the bundle and that the bundle be pointed at an upstream repo (in github, bitbucket, or gitlab as possible options).

Instead of updating one server at a time it is passable to shut all of the servers down for upgrade and testing and point the load balancer at a splash page informing users that the site is down for maintenance.

Using a custom script is would be possible to run the upgrade on all of the servers simultaneously.  It is advised that the load balancer be pointed to a splash page in this case.