Distributed Installation
You can install the different components of Moogsoft AIOPs to multiple machines in order to distribute the workload. Dividing the workload for AIOps components between multiple machines can provide performance improvement, but it does not provide redundancy or failover. For those features, see High Availability .
Distributed Install Procedure
-
Choose which host each component should be installed on, and run one or more of the following commands on the selected hosts as required by your distributed architecture.
yum install moogsoft-db yum install moogsoft-integrations yum install moogsoft-integrations-ui yum install moogsoft-mooms yum install moogsoft-search yum install moogsoft-server yum install moogsoft-ui yum install moogsoft-utils yum install moogsoft-common
-
Set the environment variables (via
.bashrc
) on each host with the following commands:export MOOGSOFT_HOME=/usr/share/moogsoft export JAVA_HOME=/usr/java/latest export APPSERVER_HOME=/usr/share/apache-tomcat export PATH=$PATH:$MOOGSOFT_HOME/bin:$MOOGSOFT_HOME/bin/utils
-
Download the MySQL connector (
mysql-connector-5.1.45 jar
). For example:
wget https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1.45.tar.gz
-
Extract the MySQL connector, rename it
mysql-connector-java-5.1.45.jar
and coypy it to$MOOGSOFT_HOME/lib/cots/nonDist/
. For example:tar --strip-components 1 -xvf mysql-connector-java-5.1.45.tar.gz \ -C $MOOGSOFT_HOME/lib/cots/nonDist/ mysql-connector-java-5.1.45/mysql-connector-java-5.1.45-bin.jar \ --transform 's/-bin//'
- Initialize the installation as described below.
Initializing a distributed installation
Each installed package has its own
init
script (for example
moog_init_ui.sh
). The individual package
init
scripts make configuring relevant properties more straightforward, such as those in
$MOOGSOFT_HOME/config/system.conf
.
For example,
moog_init_ui.sh
includes the following optional arguments:
-
-d
Configuresystem.conf
with the hostname and port of the MySQL server -
-m
Configuresystem.conf
with the hostname and port of the RabbitMQ (MooMS) server -
-s
Configuresystem.conf
with the hostname and port of the search Elasticsearch server -
-z
Configuresystem.conf
and other UI files with the Zone name and RabbitMQ vhost
Examples of initializations for distributed installations
SERVER1 and SERVER2 are example hostnames. MY_ZONE is an example MooMS Zone name.
Example 1:
moogsoft-db
on SERVER1 and all other RPMs on SERVER2
The db package can be initialized with basic options but most other packages then need to know its location for their initialization.
-
Initialize the database on SERVER1 :
moog_init_db.sh -Iu root
-
On SERVER1 , connect to mysql as the root user and grant all access on the moogdb and moog_reference databases to the ermintrude user on SERVER2 :
GRANT ALL ON moogdb.* TO ermintrude@'SERVER2' IDENTIFIED BY 'm00'; GRANT ALL ON moog_reference.* TO ermintrude@'SERVER2' IDENTIFIED BY 'm00';
-
Initialize the remaining components on SERVER2 :
moog_init_mooms.sh -pz MY_ZONE moog_init_lams.sh -bz MY_ZONE -d SERVER1:3306 moog_init_search.sh -d SERVER1:3306 moog_init_server.sh -bz MY_ZONE -d SERVER1:3306 moog_init_ui.sh -twxnfz MY_ZONE -d SERVER1:3306
Example 2:
moogsoft-ui
on SERVER1 and all other RPMs on SERVER2
On initialization, the ui package needs to know the following:
-
- The host:port of the database
- The host:port of MooMS broker
- The host:port of Elasticsearch
- The host:port of MooMS admin console
-
The MooMS Zone to connect to
-
Initialize the components on SERVER2 :
moog_init_db.sh -Iu root moog_init_mooms.sh -pz MY_ZONE moog_init_server.sh -b moog_init_search.sh moog_init_lams.sh -bz MY_ZONE
-
On SERVER2 , connect to mysql as the root user and grant all access on the moogdb and moog_reference databases to the ermintrude user on SERVER1 :
GRANT ALL ON moogdb.* TO ermintrude@'SERVER1' IDENTIFIED BY 'm00'; GRANT ALL ON moog_reference.* TO ermintrude@'SERVER1' IDENTIFIED BY 'm00';
-
By default, Elasticsearch listens only on localhost so must be made to listen on the outbound interface. On SERVER2 , edit the /etc/elasticsearch/elasticsearch.yml file and set the following property:
http.host: 0.0.0.0
-
On SERVER2 , restart the elasticsearch service:
service elasticsearch restart
-
Finally, run this command on SERVER1 :
moog_init_ui.sh -twxfz MY_ZONE -c SERVER2:15672 -d SERVER2:3306 -m SERVER2:5672 -s SERVER2:9200 -n
Example 3:
moogsoft-server
on SERVER1 and all other RPMs on SERVER2
On initialization, the server package needs to know the following:
-
- The host:port of the database
- The host:port of MooMS broker
- The MooMS Zone to connect to
-
Initialize the components on SERVER2 :
moog_init_db.sh -Iu root moog_init_mooms.sh -pz MY_ZONE moog_init_lams.sh -bz MY_ZONE moog_init_search.sh moog_init_ui.sh -twxnfz MY_ZONE
-
On SERVER2 , connect to mysql as the root user and grant all access on the moogdb and moog_reference databases to the ermintrude user on SERVER1 :
GRANT ALL ON moogdb.* TO ermintrude@'SERVER1' IDENTIFIED BY 'm00'; GRANT ALL ON moog_reference.* TO ermintrude@'SERVER1' IDENTIFIED BY 'm00';
-
Run this command on SERVER1 :
moog_init_server.sh -bez MY_ZONE -d SERVER2:3306 -m SERVER2:5672
Note
The moog_farmd service is not started or stopped by the
init
script so this should be done manually.
Example 4:
moogsoft-lams
on SERVER1 and all other RPMs on SERVER2
On initialization, the lam package needs to know the following:
-
- The host:port of the database
- The host:port of MooMS broker
- The MooMS Zone to connect to
-
Initialize the components on SERVER2 :
moog_init_db.sh -Iu root moog_init_mooms.sh -pz MY_ZONE moog_init_server.sh -bz MY_ZONE moog_init_search.sh moog_init_ui.sh -twxnfz MY_ZONE
-
On SERVER2 , connect to mysql as the root user and grant all access on the moogdb and moog_reference databases to the ermintrude user on SERVER1 :
GRANT ALL ON moogdb.* TO ermintrude@'SERVER1' IDENTIFIED BY 'm00'; GRANT ALL ON moog_reference.* TO ermintrude@'SERVER1' IDENTIFIED BY 'm00';
-
Run this command on SERVER1 :
moog_init_lams.sh -bz MY_ZONE -d SERVER2:3306 -m SERVER2:5672
Upgrading a distributed installation
Note
Regardless of how many RPMs have been installed on a single host, all of the packages must be upgraded at the same time on that host
Similarly, different versions of packages running at the same time are not supported in a distributed environment, so all hosts should be upgraded to the same package version at the same time
The following example demonstrates the type of error which
yum
will produce if only one out of two packages is upgraded. If
moogsoft-server
and
moogsoft-integrations
have been installed on a single host, running an upgrade for only
moogsoft-server
(via
yum update moogsoft-server
) will generate errors from
yum
similar to those below:
Transaction Check Error: file /usr/share/moogsoft/lib/events_analyser.jar from install of moogsoft-server-6.5.0-436.x86_64 conflicts with file from package moogsoft-integrations-6.5.0-435.x86_64 file /usr/share/moogsoft/lib/farmd_cntl.jar from install of moogsoft-server-6.5.0-436.x86_64 conflicts with file from package moogsoft-integrations-6.5.0-435.x86_64 file /usr/share/moogsoft/lib/ha_cntl.jar from install of moogsoft-server-6.5.0-436.x86_64 conflicts with file from package moogsoft-integrations-6.5.0-435.x86_64 file /usr/share/moogsoft/lib/moobot.jar from install of moogsoft-server-6.5.0-436.x86_64 conflicts with file from package moogsoft-integrations-6.5.0-435.x86_64 file /usr/share/moogsoft/lib/moog_add_alert_custom_field.jar from install of moogsoft-server-6.5.0-436.x86_64 conflicts with file from package moogsoft-integrations-6.5.0-435.x86_64 file /usr/share/moogsoft/lib/moog_add_sitn_custom_field.jar from install of moogsoft-server-6.5.0-436.x86_64 conflicts with file from package moogsoft-integrations-6.5.0-435.x86_64 file /usr/share/moogsoft/lib/moog_config_reader.jar from install of moogsoft-server-6.5.0-436.x86_64 conflicts with file from package moogsoft-integrations-6.5.0-435.x86_64 file /usr/share/moogsoft/lib/moog_encryptor.jar from install of moogsoft-server-6.5.0-436.x86_64 conflicts with file from package moogsoft-integrations-6.5.0-435.x86_64 file /usr/share/moogsoft/lib/moog_farmd.jar from install of moogsoft-server-6.5.0-436.x86_64 conflicts with file from package moogsoft-integrations-6.5.0-435.x86_64 ...
The supported upgrade path (for the above example) runs the following command:
yum update moogsoft-server moogsoft-integrations
You must run the relevant
init
scripts so the updated components know where the rest of the packages are located.
Problems?: Troubleshooting