Introduction
SOS provides JS7 - Patch Management in a situation of severe bugs or Vulnerabilities.
- Bugs, vulnerabilities and patches are communicated with the SOS Change Management System.
- This article provides information about how to apply patches to the JOC Cockpit.
FEATURE AVAILABILITY STARTING FROM RELEASE 2.5.0 - For automated patching see JS7 - Automated Installation and Update.
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.
- Patch file names follow the schema:
js7-<release>-PATCH-GUI-<sequence>-<issue-key>.tar.gz
- Example:
js7-2.5.3-PATCH-GUI-1-JOC-1550.tar.gz
Apply Patch to JOC Cockpit On Premises
The JOC Cockpit GUI expects patches to be extracted to its data directory in following location:
- Unix
/var/sos-berlin.com/js7/joc/jetty_base/webapps/joc
/var/sos-berlin.com/js7/joc/jetty_base/webapps/joc/assets
/var/sos-berlin.com/js7/joc/jetty_base/webapps/joc/styles
- Windows
C:\ProgramData\sos-berlin.com\js7\joc\jetty_base\webapps\joc
C:\ProgramData\sos-berlin.com\js7\joc\jetty_base\webapps\joc\assets
C:\ProgramData\sos-berlin.com\js7\joc\jetty_base\webapps\joc\styles
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.
Download Patch
The following example makes use of a patch available for
- Unix: https://download.sos-berlin.com/patches/2.5.3-patch/js7-2.5.3-PATCH-GUI-1-JOC-1550.tar.gz
- Windows: https://download.sos-berlin.com/patches/2.5.3-patch/js7-2.5.3-PATCH-GUI-1-JOC-1550.zip
Do not apply the patch from the example for any JOC Cockpit release different from 2.5.3, for details see JOC-1550.
Effective download links for JOC Cockpit patches are indicated with the respective Change Management issue.
Before applying patches users might want to verify the integrity and authenticity of downloaded files, see JS7 - Verifying releases.
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.
Do not apply the patch from the example for any JOC Cockpit release different from 2.5.3, for details see JOC-1550.
# 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 # 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/js7-2.5.3-PATCH-GUI-1-JOC-1550.tar.gz -O # extract the patch archive tar -xvzf js7-2.5.3-PATCH-GUI-1-JOC-1550.tar.gz # remove the patch archive rm js7-2.5.3-PATCH-GUI-1-JOC-1550.tar.gz
@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 take a backup set month=%date:~3,2% set day=%date:~0,2% set year=%date:~6,4% set hour=%time:~0,2% set minute=%time:~3,2% set second=%time:~6,2% 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/js7-2.5.3-PATCH-GUI-1-JOC-1550.zip @rem copy from download location (could be different from this example) copy %USERPROFILE%\Downloads\js7-2.5.3-PATCH-GUI-1-JOC-1550.zip . @rem extract the patch archive tar.exe -xf js7-2.5.3-PATCH-GUI-1-JOC-1550.zip @rem remove the patch archive del js7-2.5.3-PATCH-GUI-1-JOC-1550.zip
Note: The JOC Cockpit has to be restarted to apply patches.
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 files and directories indicated with the chapter Apply Patch to JOC Cockpit On Premises.
- by restoring the original files and directories from a backup.
Note: The JOC Cockpit has to be restarted to apply removal of patches.
Apply Patch to JOC Cockpit Images
It is not recommended to patch the GUI in JOC Cockpit containers. As a larger number of files are included in a GUI patch this will create unwanted overlays in your container architecture.
You can apply patches to JOC Cockpit images. Use the same sequence of OS commands as indicated with chapter Apply Patch to JOC Cockpit On Premises in your Dockerfile when creating the image. For details how to build the image see JS7 - JOC Cockpit Build of Container Image.