Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • 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

...

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/patch-20220331-JS-1984-2.2.3.jar. This patch does not impact a JOC Cockpit installation and is used for instructional purposes only - for details see JS-1984.

...

Code Block
languagebash
titleExample how to apply a patch to JOC Cockpit for Unix
linenumberstrue
# 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/2.2.3-patch/js7_joc_linux.2.2.3-PATCH.API-1.JS-1984.tar.jargz -O

# extract the patch archive that includes .jar files
tar -xvzf js7_joc.2.2.3-PATCH.API-1.JS-1984.tar.gz

# extract the jar file (use "jar" or "unzip" command)
jar -xf js7_joc_linux.2.2.3-PATCH.API-1.JS-1984.jar

# remove the jar file and patch archive
rm js7_joc_linux.2.2.3-PATCH.API-1.JS-1984.jar
rm js7_joc.2.2.3-PATCH.API-1.JS-1984.tar.jargz



Code Block
languagebash
titleExample how to apply a patch to JOC Cockpit for Windows
linenumberstrue
@rem navigate to the target directory for patches
cd %ProgramData%\sos-berlin.com\js7\joc\jetty_base\webapps\joc\WEB-INF\classes

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

@rem download from URL https://download.sos-berlin.com/patches/2.2.3-patch/js7_joc_windows.2.2.3-PATCH.API-1.JS-1984.jar
@rem copy from download location (could be different from this example)
copy %USERPROFILE%\Downloads\js7_joc_windows.2.2.3-PATCH.API-1.JS-1984.jartar.gz .

@rem extract the patch archive that includes .jar files
tar.exe -xf js7_joc.2.2.3-PATCH.API-1.JS-1984.tar.gz

@rem extract the .jar file (use "jar" or "unzip" command)
jar -xf js7_joc_windows.2.2.3-PATCH.API-1.JS-1984.jar

@rem remove the .jar file and patch archive
del js7_joc_windows.2.2.3-PATCH.API-1.JS-1984.jar
del js7_joc.2.2.3-PATCH.API-1.JS-1984.tar.jargz


This example uses the jar command that is available from a Java JDK. Should a Java JDK not be in place then the unzip command can be used.

...

  • /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.

...

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.

...