You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Introduction

SOS provides JS7 - Patch Management in a situation of severe bugs or Vulnerabilities.

The following information applies to patches of the JOC Cockpit GUI. For patches of the JS7 - REST Web Service API (API Server) see JS7 - Patches for JOC Cockpit API Server.

Apply Patch to JOC Cockpit On Premises

The JOC Cockpit GUI expects patches to be extracted to its data directory in following location:

The first part of the path including the jetty_base is specified during installation and can point to a different location. The remaining webapps/joc part of the path will remain the same for all installations.

Apply Patch

Apply the following steps to a JOC Cockpit instance. If a JOC Cockpit cluster is operated then the steps are to be performed for all JOC Cockpit instances.

The following example makes use of a patch available for

Do not apply the patch from the example for any JOC Cockpit release different from 2.5.3, for details see JOC-1550.


Example how to apply a patch to JOC Cockpit for Unix
# navigate to the target directory for patches
cd /var/sos-berlin.com/js7/joc/jetty_base/webapps/joc

# verify the directory by checking if this file is available
ls version.json

# optionally take a backup
# tar --exclude=./WEB-INF -cvzf /tmp/backup-joc-cockpit-$(date +"%Y%m%d-%H%M%S").tar.gz .

# remove existing files and directories
find . -maxdepth 1 -type f -delete && rm -d -r ./assets ./styles

# download the patch archive
curl https://download.sos-berlin.com/patches/2.5.3-patch/patch-20230612-JOC-1550.2.5.3-gui.tar.gz -O

# extract the patch archive
tar -xvzf patch-20230612-JOC-1550.2.5.3-gui.tar.gz

# remove the patch archive
rm patch-20230612-JOC-1550.2.5.3-gui.tar.gz
Example how to apply a patch to JOC Cockpit for Windows
@rem navigate to the target directory for patches
cd %ProgramData%\sos-berlin.com\js7\joc\jetty_base\webapps\joc

@rem verify the directory by checking if this file is available
dir version.json

@rem optionally take a backup
@rem set month=%date:~3,2%
@rem set day=%date:~0,2%
@rem set year=%date:~6,4%
@rem set hour=%time:~0,2%
@rem set minute=%time:~3,2%
@rem set second=%time:~6,2%
@rem echo %year%-%month%-%day%
@rem tar.exe --exclude .\WEB-INF -cf %TEMP%\backup-joc-cockpit-%year%%month%%day%-%hour%%minute%%second%.zip .

@rem remove existing files and directories
del /Q *.*
rmdir /Q /S .\assets
rmdir /Q /S .\styles

@rem download from URL https://download.sos-berlin.com/patches/2.5.3-patch/patch-20230612-JOC-1550.2.5.3-gui.zip
@rem copy from download location (could be different from this example)
copy %USERPROFILE%\Downloads\patch-20230612-JOC-1550.2.5.3-gui.zip .

@rem extract the patch archive
tar.exe -xf patch-20230612-JOC-1550.2.5.3-gui.zip
 
@rem remove the patch archive
del patch-20230612-JOC-1550.2.5.3-gui.zip


This example uses the tar.exe command that is available starting from Windows 10.

Note: The JOC Cockpit has to be restarted to apply patches.

Hint: For automated rollout of patches see JS7 - Automated Installation and Update.

Note: As an alternative for Windows you can download the patch file to the target directory and use tools such as 7-Zip to extract the archive. Do not create a sub-folder from the archive name but extract directly to the directory hierarchy as indicated above.

Remove Patch

Patches are automatically removed when a JOC Cockpit release is installed.

Patches can be manually removed by dropping the com sub-directory that holds the extracted patch.

Note: The JOC Cockpit has to be restarted to apply removal of patches.

Apply Patch to JOC Cockpit Containers

JOC Cockpit expects Java .jar libraries for patches from the following location:

  • /var/sos-berlin.com/js7/joc/jetty_base/resources/joc/patches
  • The directory /var/sos-berlin.com/js7/joc/jetty_base/resources/joc typically is mounted to a config volume when running the container: for details see JS7 - JOC Cockpit Installation for Containers. The patches sub-directory should be created if it does not exist before storing the patch file to this location.

Apply Patch

On start-up the JOC Cockpit container checks the above directory for existence of *.jar files. If a file is found then:

  • the file will be extracted to /var/sos-berlin.com/js7/joc/jetty_base/webapps/joc/WEB-INF/classes
  • for details see the On Premises section above.

Patches are applied on start-up of a container. Therefore patch files remain in place in the /var/sos-berlin.com/js7/joc/jetty_base/resources/joc/patches sub-directory (typically mounted to the config/patches volume directory) as long as the patch is to be applied.

Note: The JOC Cockpit container has to be restarted before patches are applied.

Remove Patch

Patch files are removed by dropping the files in the patches sub-directory.

Patch files are automatically removed when updating or upgrading JOC Cockpit.

Note: The JOC Cockpit container has to be restarted before patches are removed.


  • No labels