Set Up NFS Shared Storage

When you upload files to the Moogsoft AIOps UI, it writes them to the disk on the UI Server. For example, Situation Room thread entry attachments and User Profile Pictures.

In an HA configuration running multiple UI roles, the files reside on the disk for the UI server where the user is connected. To ensure attachments are available to users on any UI servers as part of an HA/Load Balancer setup, configure the location of these attachments on a shared disk (NFS) available to all UI servers.

The following example below demonstrates a sample configuration.

  • The configuration below assume that /mnt/nfs/shared is the shared location exposed by the NFS Server called NFS_Server

  • Ensure that the moogsoft:moogsoft user/group has the same uid/gid across all 3 servers and has ownership of the shared directory. If not then the following commands can be run on all 3 servers to ensure that they are the same. The gid can be be verified on all 3 servers via: cat /etc/group | grep moogsoft command

groupmod -g <gid> moogsoft
usermod -u <gid> moogsoft

NFS Server

Run the following commands, replacing <ServerA> and <ServerE> with the hostnames of the servers

service apache-tomcat stop

chown -R moogsoft:moogsoft /usr/share/apache-tomcat

chown -R moogsoft:moogsoft /var/run/apache-tomcat

mkdir /shared

chown moogsoft:moogsoft /shared/

chmod 755 /shared/

yum install -y nfs-utils nfs-utils-lib

chkconfig nfs on

service rpcbind start

service nfs start

service apache-tomcat start

Edit /etc/exports and set: /shared <ServerA>(rw,sync,no_subtree_check,insecure) <ServerE>(rw,sync,no_subtree_check,insecure)

Then run: exportfs -a

Server 1

Run the following commands to configure Server 1:

service apache-tomcat stop

chown -R moogsoft:moogsoft /usr/share/apache-tomcat

chown -R moogsoft:moogsoft /var/run/apache-tomcat

yum install -y nfs-utils nfs-utils-lib

mkdir -p /mnt/nfs/shared

mount NFS_Server:/shared /mnt/nfs/shared

Edit $MOOGSOFT_HOME/config/servlets.conf and set cache_root: "/mnt/nfs/shared",

service apache-tomcat start

Server 2

Run the following commands to configure Server 2:

service apache-tomcat stop

chown -R moogsoft:moogsoft /usr/share/apache-tomcat

chown -R moogsoft:moogsoft /var/run/apache-tomcat

yum install -y nfs-utils nfs-utils-lib

mkdir -p /mnt/nfs/shared

mount NFS_Server:/shared /mnt/nfs/shared

Edit $MOOGSOFT_HOME/config/servlets.conf and set cache_root: "/mnt/nfs/shared",

service apache-tomcat start