Page History
...
- Bugs, vulnerabilities and availability of patches are communicated with the SOS SOS Change Management System.
- This The article provides information about how to apply patches to the JOC Cockpit.
Display feature availability StartingFromRelease 2.35.0 - The article explains how to manually apply patches. For automated patching see 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.
- Patches are offered from .tar.gz tarball archive files.
- The same patch files are applied to Unix and Windows.
- Patch file names follow the scheme:
- Unix, Windows:
js7_joc.<release>-PATCH.GUI-<sequence>.<issue-key>.tar.gz
- The following placeholders are used:
release
: The JS7 release number, for example 2.5.3, see Releases.sequence
: Patches for a given release are assigned ascending numbers starting from 1. Patches with a higher number include any patches with lower numbers.issue-key
: The issue key in the SOS Change Management System, for example: JOC-1550.
- Example:
- Unix, Windows:
js7_joc.2.5.3-PATCH.GUI-1.JOC-1550.tar.gz
- Unix, Windows:
- Unix, Windows:
- Patch .tar.gz archive files do not include a directory hierarchy.
Download Patches
Find the following example for a patch:
Product | Type | Media | Patch Download URL | Hash | Sig | TSR |
---|---|---|---|---|---|---|
JOC Cockpit | tarball archive | .tar.gz | https://download.sos-berlin.com/patches/2.5.3-patch/js7_joc.2.5.3-PATCH.GUI-1.JOC-1550.tar.gz | sha256 | sig | tsr |
Caution: Do not apply the patch from the above example to 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 patch files, see JS7 - Verifying releases.
Anchor | ||||
---|---|---|---|---|
|
...
Patches for 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.
...
Applying Patches
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 from https://download.sos-berlin.com/patches/2.5.3-patch/patch-20230612-JOC-1550.2.5.3-gui.zip. Caution: Do not apply the patch from the example for to any JOC Cockpit release different from 2.5.3, for details see JOC-1550.
Note: The JOC Cockpit has to be stopped before applying patches.
The examples "Automated Patching" make use of scripts
- Unix: js7_install_joc.sh
- Windows: Install-JS7CJoc.ps1
For download these scripts see https://kb.sos-berlin.com/display/JS7/JS7+-+Download
Applying Patch on Unix
Manual Patching
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
# invoke shell and switch to the user account that owns the JOC Cockpit's data directory # navigate to the targetdata 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 -cvzfcvpzf /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-1550js7_joc.2.5.3-gui-PATCH.GUI-1.JOC-1550.tar.gz -O # extract the .tar.gz patch archive tar -xvzf patch-20230612-xvpozf js7_joc.2.5.3-PATCH.GUI-1.JOC-1550.tar.gz # remove the .tar.gz patch archive rm js7_joc.2.5.3-guiPATCH.GUI-1.JOC-1550.tar.gz |
Automated Patching
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
# invoke shell and switch to the user account that owns the JOC Cockpit's data directory # removedownload thefrom patch archiveURL rm patch-20230612-JOC-1550curl 'https://download.sos-berlin.com/patches/2.5.3-patch/js7_joc.2.5.3-PATCH.GUI-1.JOC-1550.tar.gz' -O # apply patch ./js7_install_joc.sh \ --tarball=js7_joc.2.5.3-gui-PATCH.GUI-1.JOC-1550.tar.gz \ --patch=JOC-1550 \ --patch-key=GUI-1 \ --home=/opt/sos-berlin.com/js7/joc \ --data=/var/sos-berlin.com/js7/joc \ --backup-dir=/tmp |
Applying Patch on Windows
Manual Patching
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
@rem invoke shell and switch to the user account that owns the JOC Cockpit's data directory @rem navigate to the targetdata 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 /Qq *.* rmdir /Qq /Ss .\assets rmdir /Qq /Ss .\styles @rem download from URL https://download.sos-berlin.com/patches/2.5.3-patch/patch-20230612-JOC-1550js7_joc.2.5.3-gui.zip-PATCH.GUI-1.JOC-1550.tar.gz @rem copy from download location (could be different from this example) copy %USERPROFILE%\Downloads\patch-20230612-JOC-1550js7_joc.2.5.3-gui.zipPATCH.GUI-1.JOC-1550.tar.gz . @rem extract the .tar.gz patch archive tar.exe -xf patch-20230612-JOC-1550xzf js7_joc.2.5.3-PATCH.GUI-1.JOC-1550.tar.gz @rem remove the .tar.gz patch archive del js7_joc.2.5.3-gui.zip @rem remove the patch archive del patch-20230612-JOC-1550.-PATCH.GUI-1.JOC-1550.tar.gz |
Automated Patching
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
# invoke PowerShell and switch to the user account that owns the JOC Cockpit's data directory # download from patch URL Invoke-WebRequest ` -Uri 'https://download.sos-berlin.com/patches/2.5.3-patch/js7_joc.2.5.3-PATCH.GUI-1.JOC-1550.tar.gz' ` -Outfile js7_joc.2.5.3-PATCH.GUI-1.JOC-1550.tar.gz # apply patch ./Install-JS7Joc.ps1 ` -Tarball js7_joc.2.5.3-gui.zip |
...
PATCH.GUI-1.JOC-1550.tar.gz `
-Patch JOC-1550 `
-PatchKey GUI-1 `
-HomeDir $env:ProgamFiles\sos-berlin.com\js7\joc `
-Data $env:ProgramData\sos-berlin.com\js7\joc `
-BackupDir $env:TEMP |
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 Users are discouraged from using tools such as 7-Zip to extract the patch archive in case of manual patching. Instead, use the tools available from the OS as indicated by the examples. Do not create a sub-folder from the archive name but extract directly to the directory hierarchy as indicated above.
...
Removing Patches
Patches are automatically removed when a JOC Cockpit release is installedupdated or upgraded by JS7 - JOC Cockpit Installation On Premises or using the installation scripts as indicated with JS7 - Automated Installation and Update.
Patches can be manually removed
- by dropping the
...
- files and directories indicated with the chapter Patches for 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 patchesstopped before patches are removed.
Anchor | ||||
---|---|---|---|---|
|
...
Caveat:
- As a larger number of files are included in a GUI patch this will create overlays in your container storage.
- Users can apply patches when creating JOC Cockpit images. Use the same sequence of OS commands as indicated with chapter Patches for 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.
JOC Cockpit expects Java .jar libraries .tar.gz archive files 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 aconfig
volume when running the container: for details see JS7 - JOC Cockpit Installation for Containers. Thepatches
sub-directory should be created if it does not exist before storing the patch file to this location.
...
Applying Patches
On start-up the JOC Cockpit container checks the above directory for existence of *.tar.jar filesgz 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 Patches for JOC Cockpit On Premises section above.
Patches are applied on start-up of a container. Therefore patch Patch files remain in place in the 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 appliedfor the lifetime of the JOC Cockpit release in use. Patches have to be removed if a newer release of JOC Cockpit is used.
Note: The JOC Cockpit container has to be restarted before to apply patches are applied.
...
Removing Patches
Patch files are removed by dropping the files in the patches
sub-directory.
Patch files Patches are not automatically removed when updating or upgrading the JOC Cockpit image. If a newer JOC Cockpit release is used then this includes any fixes provided by previous patches. Users have to remove patch files when applying new releases.
Note: The JOC Cockpit container has to be restarted before patches are removedto make removal of patches effective.