. . .

Update ApiOmat on remote server

This page describes how an enterprise installation of ApiOmat is updated.

Preparations

Before you begin, ensure that monitoring systems and other administrators are notified about possible outages. Also, create a dump of the mongo database.

mongodump --db apiomat --out /path/file

Make backups of

/etc/apiomat/
 
/opt/tomcat7/webapps/

Updating

Yambas and Dashboard

Execute the following commands on one server.

apt-get update
 
apt-get install apiomat-yambas
 
apt-get install apiomat-dashboard2

Wait until the previous tomcat log prints "YAMBAS vxy started, took xxxxx ms"".

Checks

  • Check tomcat log for errors (/var/log/tomcat/catalina.out)

  • Open Dashboard, hit deploy

If you update ApiOmat from an earlier version (e.g. 2.2.0) a new config-file (apiomat.yaml) will be added to /etc/apiomat/. Anyway, your "old" yambas.conf will still be in use. If you should run into any trouble with the config-file, please check the yambas.config-parameter for tomcat-startup or in a respective environment variable. For the apiomat.yaml the apiomat.config-parameter is used, but subsequently to yambas.conf.

Windows - Update Guide to Yambas 2.4.8

The update process of ApiOmat's Yambas to 2.4.8 (e.g. from 2.4.3) under Windows requires some manually tasks. One feature of 2.4.8 is the updated version of Java (1.8.0.131) and Tomcat (7.0.78).
If you have an older Java or Tomcat version, it is recommended to update your ApiOmat by doing the following steps:

1. Backup

  • stop the Tomcat service

  • (stop Apache 2.4 service if available)

  • backup MongoDB with the command line <pathToMongoDB>/bin/mongodump -o "<pathToBackupDir>"

  • backup Tomcat installation with e.g. a zip archiver

  • backup Tomcat service configuration especially the custom JVM options (open C:/tomcat7/bin/tomcat7w.exe switch to java tab)

  • backup ApiOmat installation with e.g. a zip archiver

  • backup ApiOmat config files (yambas.conf / apiomat.yaml, hazelcast.xml, security.policy, log4j.xml)

  • (backup Apache 2.4 if available with e.g. a zip archiver)

2. Delete old Tomcat7 Service

  • Run command prompt as admin and enter: SC DELETE Tomcat7

3. Delete old Java Versions and old Tomcat Installation

  • open windows control panel (e.g. WIN+R, type control and hit enter)

  • navigate to uninstall a program and uninstall Java, Java Dev Kit and Apache Tomcat from list

4. Start ApiOmat Installer

  • choose the directory of your old ApiOmat installation and click next

  • select only the following additional tasks and start installation:

    • Install JDK 8 to C:\Java\JDK8

    • Install Apache Tomcat 7

    • (Optional: Install Apache Httpd 2.4)

    • Configure Apache Tomcat

    • (Optional: Configure Apache Httpd)

5. Test ApiOmat Availability

  • after installation is done, start your new Tomcat service

  • open http://<yourApiOmat_IP>:<yourApiOmat_Port>/yambas/rest to check if your new version of ApiOmat is available

  • check if your Tomcat and Java were updated successfully to the new versions: open windows command line and execute: java -cp C:\tomcat7\lib\catalina.jar org.apache.catalina.util.ServerInfo

6. Compare the following Configuration Files with you Backup and merge if necessary

ApiOmat:
(should be the same files as before)

  • yambas.conf / apiomat.yaml

  • hazelcast.xml

  • security.policy

  • log4j.xml

Tomcat:

  • Tomcat service preferences e.g. java-options accessible via C:\tomcat7\bin\Tomcat7w.exe

  • C:\tomcat7\conf\catalina.policy

  • C:\tomcat7\conf\catalina.properties

  • C:\tomcat7\conf\context.xml

  • C:\tomcat7\conf\logging.properties

  • C:\tomcat7\conf\server.xml

  • C:\tomcat7\conf\tomcat-users.xml

  • C:\tomcat7\conf\web.xml

(Apache 2.4:)

  • every configuration file that was manually changed before

If you changed your configurations, restart your Tomcat and repeat step 5 to check if your ApiOmat is still available.

* link only available in Enterprise Documentation