Upgrade of the SmartWeb Application

Upgrade of the SmartWeb Application

Upgrading the SmartWeb application consists of replacing the installation package (smartweb.jar, or smartweb.war) with a newer version. The configuration file application.yaml is preserved and is not part of the installation package, so it is not overwritten during the upgrade.

[!NOTE] This procedure applies to the current way of deploying the SmartWeb platform built on Spring Boot (a standalone JAR or a WAR in a standalone Tomcat). Upgrading older versions deployed on the Wildfly application server is described in the chapter Installation and configuration for older D2000 versions.

Upgrading a standalone JAR deployment

  1. Stop the running SmartWeb application (the smartweb.jar process, or the corresponding operating-system service).

  2. Back up the original smartweb.jar file and the config/ directory (so it is possible to roll back to the previous version).

  3. Replace the smartweb.jar file with the new version from D2000_EXE/web/smartweb.jar. Leave the config/ directory unchanged.

  4. Start the application again with java -jar smartweb.jar (or start the operating-system service).

Upgrading a WAR deployment in a standalone Tomcat

  1. Stop the Tomcat application server.

  2. Back up the original .war file and the <tomcat>/conf/applications/<war-name>/ directory containing the configuration.

  3. Replace the .war file in Tomcat's webapps directory with the new version from D2000_EXE/web/smartweb.war. The new .war file must be renamed to the same name the original one had (so that both the URL path and the configuration location are preserved).

  4. Optionally remove the original unpacked application directory from webapps so that Tomcat redeploys the application from scratch.

  5. Start the Tomcat application server.

[!IMPORTANT] By renaming the application archive (smartweb.war) we define the URL path to the running application. At the same time, this makes it possible to run multiple, completely independent versions of the SmartWeb application on a single Tomcat server, each available on a different URL path. These applications can connect to different D2000 instances, even of different versions.

Note, for the application to work correctly, the name of the .war file must be renamed using alphanumeric characters only and without diacritics.

Configuration migration

On startup, SmartWeb automatically processes the existing configuration file:

  • A legacy configuration in the smartweb.json format is automatically migrated to the application.yaml format on the first start of the new version.

  • If new properties appear in the configuration structure after the upgrade, SmartWeb adds them with default values on startup.

After the upgrade we recommend reviewing the release notes and any new configuration options in the application.yaml file.