Skip to content

Update / Patch Easit GO

Easit distinguishes an update (or patch) from an upgrade in that an update occurs within a release and an upgrade occurs between releases. Going from release 20xx.xx Patch 1 to release 20xx.xx Patch 2 is an update while going from release 20xx.xx to release 20yy.yy is an upgrade.

Find service

There are several ways to finding the correct service for your Easit GO instance, for consistency in this guide we will use PowerShell.

Since we are working with services you need to use a elevated session of PowerShell.

1
2
3
4
5
6
7
PS C:\Users\admin> Get-Service -Name *easit*

Status   Name               DisplayName
------   ----               -----------
Started  EasitGOProd       Apache Tomcat 9.0 EasitGOProd

PS C:\Users\admin>

Note the Name of the service that you wish to update or save it to a variable.

1
PS C:\Users\admin> $serviceName = 'EasitGOProd'

Stop service

1
PS C:\Users\admin> Get-Service -Name $serviceName | Stop-Service

Preparations

Create a directory for backups, we suggest that you use the _Backup directory in Easits root directory (usually D:\Easit\_Backup), named something like todays date.

1
PS C:\Users\admin> $backupDirectory = New-Item -Path 'D:\Easit\_Backup' -Name (Get-Date -Format 'yyyy-MM-dd') -ItemType Directory

To know where Easit GO "lives" we need to find its home directory. We do this by taking a closer look at the options property from the service settings. In the options we want to know the value of Dcatalina.home.

1
2
3
4
5
6
7
PS C:\Users\admin> $registryPath = "HKLM:\SOFTWARE\Wow6432Node\Apache Software Foundation\Procrun 2.0\$serviceName\Parameters\Java"
PS C:\Users\admin> (Get-ItemProperty -Path "$registryPath").Options
-Dcatalina.home=D:\Easit\EasitGOProd\Tomcat
-Dcatalina.base=D:\Easit\EasitGOProd\Tomcat
-Dignore.endorsed.dirs=D:\Easit\EasitGOProd\Tomcat\endorsed
....
PS C:\Users\admin>

Note the value or save it to a variable.

1
2
PS C:\Users\admin> $tomcatHome = 'D:\Easit\EasitGOProd\Tomcat'
PS C:\Users\admin> $tomcatWebapps = Join-Path -Path "$tomcatHome" -ChildPath "webapps"

Some instances of a Tomcat service may contain multiple war files, therefor we need to see what files are in the webapps directory.

1
2
3
4
5
6
7
8
9
PS C:\Users\admin> Get-ChildItem -Path "$tomcatWebapps" -Recurse -Include '*.war'

    Directory: D:\Easit\EasitGOProd\Tomcat\webapps

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
-a---          2022-12-20    08:16      258750527 ROOT.war

PS C:\Users\admin>

Note the name of the war file for Easit GO (usually ROOT or test) or save it to a variable.

1
PS C:\Users\admin> $warBaseName = 'ROOT'

Backup

We move the war file for Easit GO to the backup directory.

1
PS C:\Users\admin> Get-ChildItem -Path "$tomcatWebapps" -Recurse -Include "$warBaseName.war" | Move-Item -Destination $backupDirectory

Backup of database

Take a backup of the database for Easit GO that can be used to roll back if anything happens during or after you update Easit GO.

Update

We copy the new war file to tomcatWebapps and then we can start Easit GO again.

1
2
PS C:\Users\admin> Get-ChildItem -Path "Path\To\newWarFile.war" | Copy-Item -Destination (Join-Path -Path "$tomcatWebapps" -ChildPath "$warBaseName.war")
PS C:\Users\admin> Get-Service -Name $serviceName | Start-Service

That´s it. You have now successfully updated Easit GO.