Versions Compared

Key

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

...

The patch examples will not impact a JOC Cockpit installation and are used for instructional purposes only, for details see JS-1984.

Note: The JOC Cockpit has to be stopped before applying patches.

Applying Patch on Unix

Manual Patching

...

Code Block
languagebash
titleExample how to apply a patch from a .tar.gz archive to JOC Cockpit for Windows
linenumberstrue
collapsetrue
@rem invoke shell and switch to the user account that owns the JOC Cockpit's data directory

@rem navigate to the data directory for patches
cd %ProgramData%\sos-berlin.com\js7\joc\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.tar.gz
@rem copy from download location (could be different from this example)
copy %USERPROFILE%\Downloads\js7_joc.2.2.3-PATCH.API-1.JS-1984.tar.gz .

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

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

@rem remove the .jar files and .tar.gz patch archive
del js7_joc.2.2.3-PATCH.API-1.JS-1984.jar
del js7_joc.2.2.3-PATCH.API-1.JS-1984.tar.gz

...

Code Block
languagepowershell
titleExample how to apply a patch from a .jar file to JOC Cockpit for Windows
linenumberstrue
# invoke PowerShell and switch to the user account that owns the JOC Cockpit's data directory

# download from URL
Invoke-WebRequest `
    -Uri 'https://download.sos-berlin.com/patches/2.2.3-patch/js7_joc.2.2.3-PATCH.API-1.JS-1984.jar' `
    -Outfile js7_joc.2.2.3-PATCH.API-1.JS-1984.jar

# apply the patch
./Install-JS7CJocJS7Joc.ps1 `
    -PatchJar js7_joc.2.2.3-PATCH.API-1.JS-1984.jar `
    -Patch JS-1984 `
    -PatchKey API-1 `
    -HomeDir $env:ProgramFiles\sos-berlin.com\js7\joc `
    -Data $env:ProgramData\sos-berlin.com\js7\joc
Code Block
languagepowershell
titleExample how to apply a patch from a .tar.gz archive to JOC Cockpit for Windows
linenumberstrue
collapsetrue
# invoke PowerShell and switch to the user account that owns the JOC Cockpit's data directory

# download from URL
Invoke-WebRequest `
    -Uri 'https://download.sos-berlin.com/patches/2.2.3-patch/js7_joc.2.2.3-PATCH.API-1.JS-1984.tar.gz' `
    -Outfile js7_joc.2.2.3-PATCH.API-1.JS-1984.tar.gz
 
# apply the patch
./Install-JS7CJocJS7Joc.ps1 `
    -Tarball js7_joc.2.2.3-PATCH.API-1.JS-1984.tar.gz `
    -Patch JS-1984 `
    -PatchKey API-1 `
    -HomeDir $env:ProgramFiles\sos-berlin.com\js7\joc `
    -Data $env:ProgramData\sos-berlin.com\js7\joc

...

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 users can download the .jar patch file to the target directory and use Note: 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.

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

Removing Patches

Patches are automatically removed when a JOC Cockpit release is updated or upgraded by JS7 - JOC Cockpit Installation On Premises or using the installation scripts as indicated with JS7 - Automated Installation and Update..

...