Page History
Table of Contents |
---|
Introduction
SOS provides JS7 - Patches in a situation of severe bugs or Vulnerabilities.
- Bugs, vulnerabilities and patches are communicated with the SOS Change Management System.
- Find below the information how to apply patches to JOC Cockpit.
...
JOC Cockpit expects Java .jar libraries for patches from the following location:
- Unix
/var/sos-berlin.com/js7/joc/jetty_base/webapps/joc/WEB-INF/classes
- Windows
C:\ProgramData\sos-berlin.com\js7\joc\jetty_base\webapps\joc\WEB-INF\classes
The JETTY_BASE
part of the above path is specified during installation and can point to a different location. The remaining part webapps/joc/WEB-INF/classes
is the same for any installation.
Apply Patch
Apply the following steps to a JOC Cockpit instance. If a JOC Cockpit cluster is operated then steps are performed for any JOC Cockpit instance.
...
JOC Cockpit
...
# navigate to the target directory for patches
cd /var/sos-berlin.com/js7/joc/jetty_base/webapps/joc/WEB-INF/classes
# verify the directory by checking if this file is available
ls api-schema-version.json
# download the patch archive
curl https://download.sos-berlin.com/patches/patch-20220309-JOC-1256-2.2.2_2.2.3.jar -O
# unzip the patch archive
jar -xf patch-20220309-JOC-1256-2.2.2_2.2.3.jar
# remove the patch archive
rm patch-20220309-JOC-1256-2.2.2_2.2.3.jar
can be applied
- for the JS7 - REST Web Service API (API Server),
- for the user interface (GUI).
Display children header |
---|
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
# navigate to the target directory for patches
cd %ProgramData%\sos-berlin.com\js7\joc\jetty_base\webapps\joc\WEB-INF\classes
# verify the directory by checking if this file is available
dir api-schema-version.json
# download from URL https://download.sos-berlin.com/patches/patch-20220309-JOC-1256-2.2.2_2.2.3.jar
# copy from download location (could be different from this example)
copy %USERPROFILE%\Downloads\patch-20220309-JOC-1256-2.2.2_2.2.3.jar .
# unzip the patch archive
jar -xf patch-20220309-JOC-1256-2.2.2_2.2.3.jar
# remove the patch archive
del patch-20220309-JOC-1256-2.2.2_2.2.3.jar |
The resulting directory hierarchy should look like this (with the com
sub-directory being created from the extracted patch):
webapps/joc/WEB-INF/classes
com
sos
...
Note: A restart of JOC Cockpit is required to apply patches.
Note: As an alternative for Windows you can download the .jar 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: A restart of JOC Cockpit is required to apply removal of patches.
...
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 Dockerconfig
volume when running the container: for details see JS7 - JOC Cockpit Installation for Docker Containers. Thepatches
sub-directory should be created if it does not already exist before storing the patch file to this location.
Apply Patch
On startup 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 chapter On Premises.
- the file will be extracted to
- 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 theconfig/patches
volume directory) as long as the patch should be applied.
Note: A restart of the JOC Cockpit container is required to apply patches.
Remove Patch
Patch files are removed by dropping the files in the patches
sub-directory.
Note: A restart of the JOC Cockpit container is required to apply removal of patches.