Distributed Installation - RPM
You can install the different components of Moogsoft AIOps to multiple machines in order to distribute the workload. Dividing the workload for Moogsoft AIOps components between multiple machines can provide performance improvement, but it does not provide redundancy or failover. For those features, see High Availability Overview.
Distributed Installation 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 -y install moogsoft-db-7.2.0.2 \ moogsoft-common-7.2.0.2 \ moogsoft-integrations-7.2.0.2 \ moogsoft-integrations-ui-7.2.0.2 \ moogsoft-mooms-7.2.0.2 \ moogsoft-search-7.2.0.2 \ moogsoft-server-7.2.0.2 \ moogsoft-ui-7.2.0.2 \ moogsoft-utils-7.2.0.2
-
Set the environment variables in the
bashrc
file 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
-
Initialize the installation as described below.
Initialize 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
Change Default Passwords
Change the default passwords for users created during the installation process. See Change passwords for default users for instructions. On a distributed system you must change the passwords on each host.
Example Initializations in 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'; GRANT ALL ON historic_moogdb.* 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 the MooMs broker
-
The host_port of Elasticsearch
-
The host:port of the 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 Moogfarmd service is not started or stopped by the
init
script so you will need to do this 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
Upgrade a Distributed Installation
Note
No matter how many RPMs have been installed on a single host, you must upgrade all packages on that host at the same time.
You cannot run different versions of packages at the same time in a distributed environment, so upgrade all hosts 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-7.2.0-436.x86_64 conflicts with file from package moogsoft-integrations-7.2.0-435.x86_64 file /usr/share/moogsoft/lib/farmd_cntl.jar from install of moogsoft-server-7.2.0-436.x86_64 conflicts with file from package moogsoft-integrations-7.2.0-435.x86_64 file /usr/share/moogsoft/lib/ha_cntl.jar from install of moogsoft-server-7.2.0-436.x86_64 conflicts with file from package moogsoft-integrations-7.2.0-435.x86_64 file /usr/share/moogsoft/lib/moobot.jar from install of moogsoft-server-7.2.0-436.x86_64 conflicts with file from package moogsoft-integrations-7.2.0-435.x86_64 file /usr/share/moogsoft/lib/moog_add_alert_custom_field.jar from install of moogsoft-server-7.2.0-436.x86_64 conflicts with file from package moogsoft-integrations-7.2.0-435.x86_64 file /usr/share/moogsoft/lib/moog_add_sitn_custom_field.jar from install of moogsoft-server-7.2.0-436.x86_64 conflicts with file from package moogsoft-integrations-7.2.0-435.x86_64 file /usr/share/moogsoft/lib/moog_config_reader.jar from install of moogsoft-server-7.2.0-436.x86_64 conflicts with file from package moogsoft-integrations-7.2.0-435.x86_64 file /usr/share/moogsoft/lib/moog_encryptor.jar from install of moogsoft-server-7.2.0-436.x86_64 conflicts with file from package moogsoft-integrations-7.2.0-435.x86_64 file /usr/share/moogsoft/lib/moog_farmd.jar from install of moogsoft-server-7.2.0-436.x86_64 conflicts with file from package moogsoft-integrations-7.2.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