You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 16 Next »

Summary

As of October 15th, the installer for an NMIS9 compatible application does not allow to upgrade when an NMIS8 product is installed. However, there are some ways to get around this, here is one.

Upgrading process

In short

After installing NMIS9, move aside the omk directory and install the new NMIS9 compatible application. Once the installation has finished rename the new omk/conf folder and copy over the old omk/conf folder. Convert the .nmis files in omk/conf/ directory into .json using the opcommon-cli tool. Edit the new omk/conf/opCommon.json file replacing any "nmis_dir" and "nmis8" entries for "nmis9_dir" and "nmis9". Lastly ensure the "load_applications" entry in this file shows only the new NMIS9 application previously installed and restart the omk daemon.

In detail

  1. Install NMIS9, should install without any issues
  2. Rename the omk directory
    mv /usr/local/omk /usr/local/omk-old
  3. Run the installer for the new NMIS9 application
  4. Rename the new omk/conf directory
    mv /usr/local/omk/conf /usr/local/omk/conf-original
  5. Copy the omk-old/conf directory into the new omk/
    cp -r /usr/local/omk-old/conf /usr/local/omk
  6. Convert the .nmis files in omk/conf/ directory into .json using the opcommon-cli tool
    /usr/local/omk/bin/opcommon-cli.exe act=convert_json_dir dir="/usr/local/omk/conf/"
  7. Change any "nmis_dir" and "nmis8" entries to "nmis9_dir" and "nmis9" in the omk/conf/opCommon.json file. You can do this manually or by using the following Perl regex
    perl -p -i -e 's/nmis_dir/nmis9_dir/g' /usr/local/omk/conf/opCommon.json
    perl -p -i -e 's/nmis8/nmis9/g' /usr/local/omk/conf/opCommon.json
    perl -p -i -e 's/nmis_logs/nmis9_logs/g' /usr/local/omk/conf/opCommon.json
  8. Change the "load_applications" entry in the opCommon.json file to only show the NMIS9 application recently installed. You can do this manually or by running the required patch_config commands to delete each application from the "load_applications" entry, except for the one that was recently installed.
    # E.g.: Previously installed applications: opConfig, opCharts, opEvents, opHA, opReports and Open-AudIT
    #		Recently installed application: opConfig
    
    /usr/local/omk/bin/patch_config.pl -b /usr/local/omk/conf/opCommon.json /omkd/load_applications-=opCharts # -b = Creates backup (opCommon.json.prepatch)
    /usr/local/omk/bin/patch_config.pl /usr/local/omk/conf/opCommon.json /omkd/load_applications-=opEvents
    /usr/local/omk/bin/patch_config.pl /usr/local/omk/conf/opCommon.json /omkd/load_applications-=opHA
    /usr/local/omk/bin/patch_config.pl /usr/local/omk/conf/opCommon.json /omkd/load_applications-=opReports
    /usr/local/omk/bin/patch_config.pl /usr/local/omk/conf/opCommon.json /omkd/load_applications-=Open-AudIT
    
    # If the recently installed application (eg.: opConfig) is deleted by mistake, you can add it back by running the follow patch_config command
    /usr/local/omk/bin/patch_config.pl /usr/local/omk/conf/opCommon.json /omkd/load_applications+=opConfig
  9. Restart omkd
    systemctl restart omkd.service

About opReports

NMIS8 opReports and NMIS9 opReports work the same way:

  • Report Schedules are stored in /usr/local/conf/schedule
  • Reports caching is stored in /usr/local/omk/var/opreports
  • Reports are stored in /data/omk/var/reports (unless otherwise specified by the user)

If you followed the instructions above, your Report Schedules are back in place, as you've copied over the entire omk-old/conf directory in step five. We recommend also coping the /usr/local/omk/var/opreports directory into the new application.

cp -rf /usr/local/omk-old/var/opreports/* /usr/local/omk/var/opreports

Lastly, the /data/omk/var reports directory should still be were it was at the beginning of the upgrade, as it was never changed.

  • No labels