Uploaded image for project: 'OpenNMS'
  1. OpenNMS
  2. NMS-12184

Streamline opennms startup procedure

    XMLWordPrintable

    Details

    • Type: Epic
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 24.1.2
    • Fix Version/s: None
    • Component/s: None
    • Security Level: Default (Default Security Scheme)
    • Labels:
    • Epic Name:
      Streamline opennms startup procedure

      Description

      The logic to start OpenNMS is meanwhile scattered in several places. We had to deal with challenges to be able to run with SysV init scripts and introduced systemd. The migration from Oracle/OpenJDK Java 8 to OpenJDK Java 11 which needs a different startup procedure. Additionally, we started to run OpenNMS with Docker which had his own challenges which require to run in the foreground, as PID 1 and a need to be configured with environment variables. The start procedure needed also to support Debian/Ubuntu and Red Hat/CentOS Linux distributions.

      Most startup scripts try to detect or verify if a Java environment is set up in a compatible way. To start OpenNMS we have the following files involved:

      • SysV init script which is also used by systemd: /etc/init.d/opennms
      • Start script in ${OPENNMS_HOME}/bin/opennms
      • Setup script: ${OPENNMS_HOME}/bin/runjava
      • Docker entry point script

      The following files are taken into account when a Java environment is set:

      • Debian/Ubuntu: /etc/default/opennms which sets JAVA_HOME
      • Debian/Ubuntu/Red Hat/CentOS: ${OPENNMS_HOME}/etc/java.conf filled by runjava -s
      • Debian/Ubuntu/Red Hat/CentOS: a JAVA_HOME environment variable

      The startup procedure should be refactored to remove duplicated functionality and make it as easy, transparent and unique as possible how OpenNMS starts up in various environments such as Debian/Ubuntu/Red Hat/CentOS and Docker.

      Acceptance:

      • Drop OpenJDK 8 JDK support and just run with OpenJDK 11 JDK (I mean running as in operating, not compiling)
      • Remove SysV init scripts and provide just a systemd service unit
      • Define a unique distribution independent way to set JAVA_HOME using runjava
      • Remove Java environment checks from ${OPENNMS_HOME}/bin/opennms and just provide an environment to build the java command
      • Don't fork ${OPENNMS_HOME}/bin/opennms so we can reuse it in our Docker entry point to handle the signals in the JVM as PID 1
      • Provide a way to set additional Java options with an environment variable

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              indigo Ronny Trommer
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:

                  Git Integration