Distributed Tarball Installation

You can install the different of Moogsoft AIOps packages on multiple machines in order to distribute the workload. Dividing the workload for Moogsoft AIOps components between multiple machines can a provide performance improvement, but it does not provide redundancy or failover. For those features, see High Availability Overview.

This topic guides you through the most common distributed installation scenario, which is to run the MySQL database on one host and all other processes on a separate host.

Before You Begin

Before you run the Moogsoft AIOps installation, perform the following verification and preparation steps:

  • Identify the Centos 7 hosts where you plan run your distributed installation. The example uses server1 for the database host and server2 for the host for all other processes.

  • Identify the Linux user you want to use for installation. Use the same user credentials later if for any reason you need to start or stop Moogsoft AIOps processes.

  • Optionally set the ulimit maximum for open files and max user processes for the installation user. For example, on a busy system you could increase both to 65535. Setting ulimit values requires root permissions.

  • Choose a working directory to run your installation. The examples in this document use the current user's home folder, ~ , as the working directory. The installation directory requires a minimum of 7GB. If you are also storing the MySQL database in the installation directory, you'll require more space to allow the growth of log files and storage of artefacts in the database and ElasticSearch.

  • Verify ports 8443 and 8080 are open. If you are installing as root, Verify ports 443 and 80 are open.

  • Ensure both servers can communicate using the MySQL port: 3306 by default.

  • Verify your system is running OpenSSL v1.02 or later.

Install Moogsoft AIOps and MySQL

Install Moogsoft AIOps and MySQL on both hosts, for example server1 and server2. The database server uses some components from Moogsoft AIOps and Moogsoft AIOps uses the database client.

Perform the following installation steps on both hosts unless otherwise noted:

  1. Download the Moogsoft AIOps non-root installer. You can download this via a web browser from https://speedy.moogsoft.com/installer/ and use the yum user credentials provided by Moogsoft support. Alternatively you can update the following command with your user credentials to download the installer:

    curl -L -O "https://<username>:<password>@speedy.moogsoft.com/installer/moogsoft-aiops-7.2.0.2.tgz"
  2. Unzip and untar the distribution archive in your working directory:

    tar -xf moogsoft-aiops-7.2.0.2.tgz
  3. Install MySQL mysql-community-server-5.7.22. For example to install to your working directory:

    • Download the mysql-community-server-5.7.22 distribution package to your working directory:

      curl -L -O https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.22-el7-x86_64.tar.gz
    • Unzip and untar the MySQL distribution package:

      tar -xf mysql-5.7.22-el7-x86_64.tar.gz
    • Add the MySQL binary path to your $PATH environment variable. For instance, using the admin user's home folder:

      echo "export PATH=$PATH:~/mysql-5.7.22-el7-x86_64/bin" >> ~/.bashrc && \
      source ~/.bashrc
  4. Install Kernel Asynchronous I/O (AIO) Support for Linux. For example:

    mkdir -p ~/install/libraries/ && cd ~/install/libraries/ && \
    curl -L -O http://mirror.centos.org/centos/7/os/x86_64/Packages/libaio-0.3.109-13.el7.x86_64.rpm && \
    rpm2cpio ./libaio-0.3.109-13.el7.x86_64.rpm | cpio -idmv && \
    rm -f ./libaio-0.3.109-13.el7.x86_64.rpm && \
    rm -f ~/install/libraries/lib64/libaio.so.1 && \
    ln -s ~/install/libraries/lib64/libaio.so.1.0.1 ~/install/libraries/lib64/libaio.so.1 && \
    echo "export LD_LIBRARY_PATH=`pwd`/lib64:\$LD_LIBRARY_PATH" >> ~/.bashrc && \
    source ~/.bashrc && \ 
    cd -
  5. Install libgfortran v4.4.6 or later on the host that runs the Moogsoft AIOps components; not the database host. For example on server2:

    mkdir -p ~/install/libraries/ && cd ~/install/libraries/ && \
    curl -L -O http://mirror.centos.org/centos/7/os/x86_64/Packages/libquadmath-4.8.5-36.el7.x86_64.rpm && \
    rpm2cpio ./libquadmath-4.8.5-36.el7.x86_64.rpm | cpio -idmv && \
    rm ./libquadmath-4.8.5-36.el7.x86_64.rpm && \
    curl -L -O http://mirror.centos.org/centos/7/os/x86_64/Packages/libgfortran-4.8.5-36.el7.x86_64.rpm && \
    rpm2cpio ./libgfortran-4.8.5-36.el7.x86_64.rpm | cpio -idmv && \
    rm ./libgfortran-4.8.5-36.el7.x86_64.rpm && \
    echo "export LD_LIBRARY_PATH=`pwd`/usr/lib64:\$LD_LIBRARY_PATH" >> ~/.bashrc && \
    source ~/.bashrc && \
    cd -
  6. Execute the installation script in your working directory to install Moogsoft AIOps.

    bash moogsoft-aiops-install-7.2.0.2.sh

    The script guides you through the installation process and lets you choose the installation directory, by default <working-directory>/moogsoft.

  7. Set the $MOOGSOFT_HOME environment variable to point to your installation directory. For example:

    echo "export MOOGSOFT_HOME=/home/admin/moogsoft" >> ~/.bashrc
    echo "export PATH=$PATH:$MOOGSOFT_HOME/bin/utils" >> ~/.bashrc && \
    source ~/.bashrc
Initialize the Database Server

Initialize the database server first so it will be available for dependent processes when they start up.

To set up the database, execute the database initialization scriptmoog_init_db.sh on the database host. For example on server1:

$MOOGSOFT_HOME/bin/utils/moog_init_db.sh -Iu root

Add MySQL 'grants' to allow SERVER2 to communicate with the SERVER1 MySQL instance (please substitute <SERVER2_IP_ADDRESS> with the IP address of SERVER2):

mysql -u root -S $MOOGSOFT_HOME/cots/mysql/var/lib/mysql/mysql.sock <<< "GRANT ALL PRIVILEGES ON *.* TO 'root'@'<SERVER2_IP_ADDRESS>' IDENTIFIED BY '' with grant option;"
mysql -u root -S $MOOGSOFT_HOME/cots/mysql/var/lib/mysql/mysql.sock <<< "GRANT ALL ON moogdb.* TO 'ermintrude'@'<SERVER2_IP_ADDRESS>' IDENTIFIED BY 'm00'; \
                                                                                                 GRANT ALL ON moog_reference.* TO ermintrude@'<SERVER2_IP_ADDRESS>' IDENTIFIED BY 'm00'; \
                                                                                                 GRANT ALL ON historic_moogdb.* TO 'ermintrude'@'<SERVER2_IP_ADDRESS>' IDENTIFIED BY 'm00';"
mysql -u root -S $MOOGSOFT_HOME/cots/mysql/var/lib/mysql/mysql.sock <<< "GRANT ALL ON moogdb.* TO 'root'@'<SERVER2_IP_ADDRESS>' IDENTIFIED BY ''; \
                                                                                                GRANT ALL ON moog_reference.* TO root@'<SERVER2_IP_ADDRESS>' IDENTIFIED BY '';\
                                                                                                GRANT ALL ON historic_moogdb.* TO root@'<SERVER2_IP_ADDRESS>' IDENTIFIED BY '';"
Initialize Moogsoft AIOps

After the database is available, you can initialize the remaining Moogsoft AIOps processes. For example on host2:

  1. Configure the toolrunner to execute locally. Edit $MOOGSOFT_HOME/config/servlets.conf.

  2. Uncomment the execute_locally property, and value set the value to 'true' as follows. Take special note of the initial comma and the absence of the trailing comma.

    , execute_locally: true
  3. Execute the Moogsoft AIOps initialization script, moog_init.sh, to set up the remaining Moogsoft AIOps processes.

    $MOOGSOFT_HOME/bin/utils/moog_init.sh -qI MoogsoftAIOps -u root --accept-eula -d <server1_ip>:3306

    Where <server1_ip> is the IP address of the database server.

  4. Run the following command to start Moogfarmd:

    $MOOGSOFT_HOME/bin/utils/process_cntl moog_farmd start

    After Moogfarmd starts, log in to Moogsoft AIOps at the following URL: https://<server1_ip>:8443

  5. 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.