User Guide

How To migrate NATS Server to a supported configuration

In this chapter we are going to explain how to migrate a NATS Server to be compliant with the supported NetEye 4 configuration.

Prerequisites:

Warning

Before proceeding with the NATS Server migration procedure, if you are in a NetEye cluster environment, remember to put all nodes into standby except the one on which the configuration steps are executed (the Master).

To put a node in standby, run the following command on the current node:

# pcs node standby --wait=300
# echo $?

The output of the last command (which is the exit code of the previous command) must be 0. If the exit code is different from 0, the current node is not yet in standby, so please be sure that the current node is in standby before proceeding.

Procedure

Warning

NetEye Clusters only: the following procedure must be run on the active node.

  1. Navigate to the NATS Server config folder:

    # cd /neteye/shared/nats-server/
    
  2. Backup the running configuration folder:

    # cp -a conf conf.backup
    
  3. Disable the NATS Server service:

    • NetEye Single Instances and Satellites:

    # systemctl stop nats-server
    
    • NetEye Clusters:

    # pcs resource disable nats-server
    
  4. Delete the NATS Server unsupported configuration:

    # rm -rf conf/*
    
  5. Restore the NATS Server configuration with the supported one:

    # yum reinstall nats-server --enablerepo=neteye
    

    Note

    Configurations folders /neteye/shared/nats-server/conf.backup/users.d and /neteye/shared/nats-server/conf.backup/permissions.d under /neteye/shared/nats-server/conf.backup can contain configuration files from other software, or custom configuration files. For example, tornado-nats-json-collector.conf must be manually migrated from /neteye/shared/nats-server/conf.backup/users.d to /neteye/shared/nats-server/conf/users.d

  6. Run the NetEye Secure Install (skip this step in NetEye Satellites):

    # neteye_secure_install
    
  7. Start the NATS Server service:

    • NetEye Single Instances and Satellites:

    # systemctl start nats-server
    
    • NetEye Clusters:

    # pcs resource restart nats-server
    
  8. Only in cluster environments, you need to restore the high availability operation. To do this you have to follow this procedure.