Skip to main content

Patch Moogsoft Onprem RPM for v9.0.0.x

This topic describes how to patch an RPM-based distribution of Moogsoft Onprem to v9.0.0.2 from v9.0.0 or 9.0.0.x

Warning

  • The RabbitMQ upgrade as part of this process requires feature flags to be enabled.

  • The following command must be run on all RabbitMQ server nodes before the following steps are performed:

    rabbitmqctl enable_feature_flag all
  1. Ensure the patch RPMs are available to each server being patched:

    • For internet-connected hosts, ensure there is a repo file under the /etc/yum.repos.d/ directory pointing to the 'speedy esr' yum repo.

      An example file is below:

      [moogsoft-aiops-90]
      name=moogsoft-aiops-90
      baseurl=https://<username>:<password>@speedy.moogsoft.com/v9/repo/
      enabled=1
      gpgcheck=0
      sslverify=false
    • For offline-hosts:

      1. Download the two offline yum repository files (requires 'speedy' yum credentials):

        https://speedy.moogsoft.com/v9/offline/2023-06-29-1688041999-MoogsoftBASE8_offline_repo.tar.gz
        https://speedy.moogsoft.com/v9/offline/2023-06-29-1688041999-MoogsoftESR_9.0.0.2_offline_repo.tar.gz
      2. Move the two offline installer bundle files to each server being upgraded as needed

      3. Create two directories to house the repositories. For example:

        sudo mkdir -p /media/localRPM/BASE/
        sudo mkdir -p /media/localRPM/ESR/
      4. Extract the two Tarball files into separate directories. For example:

        tar xzf *-MoogsoftBASE8_offline_repo.tar.gz -C /media/localRPM/BASE/
        tar xzf *-MoogsoftESR_9.0.0.2_offline_repo.tar.gz -C /media/localRPM/ESR/
      5. Back up the existing /etc/yum.repos.d directory. For example:

        mv /etc/yum.repos.d /etc/yum.repos.d-backup
      6. Create an empty /etc/yum.repos.d directory. For example:

        mkdir /etc/yum.repos.d
      7. Create a local.repo file in the /etc/yum.repos.d/ folder ready to contain the local repository details for example:

        [BASE]
        name=MoogCentOS-$releasever - MoogRPM
        baseurl=file:///media/localRPM/BASE/RHEL
        gpgcheck=0
        enabled=1
        
        [ESR]
        name=MoogCentOS-$releasever - MoogRPM
        baseurl=file:///media/localRPM/ESR/RHEL
        gpgcheck=0
        enabled=1
      8. Clean the Yum cache:

        yum clean all 
  2. Optional GPG key validation of the RPMs to validate the installation files.

    • For servers without internet access (if server has internet access go to the next step):

      1. Download the key from this site:

        https://keys.openpgp.org/vks/v1/by-fingerprint/0A8FD9AB6F1693A1967B3B8CB919E617EC6946C2 
      2. Copy the key to the server onto which the RPMs or tarball will be installed (it will be an .asc file)

      3. Import the key:

        gpg --import 0A8FD9AB6F1693A1967B3B8CB919E617EC6946C2 
    • For servers with internet access, run the following command:

      curl https://keys.openpgp.org/vks/v1/by-fingerprint/0A8FD9AB6F1693A1967B3B8CB919E617EC6946C2 | gpg --import
      1. Download the patch RPMs and matching '.sig' files from the 'speedy' yum repository using a browser, providing speedy credentials when asked by the browser:

        https://speedy.moogsoft.com/v9/repo/x86_64/
    • Copy the patch RPMs and matching '.sig' files into the same folder (the example below assumes /tmp will be used)

      Copy the following code into a bash terminal and run it to perform the validation:

      while read RPM
      do
          echo "Current RPM: $RPM"
          gpg --verify ${RPM}.sig ${RPM} 2>&1
      done < <(find /tmp -name '*.rpm');
    • Confirm that the command reports:

      Good signature from "Moogsoft <security@moogsoft.com>"
  3. FOR ALL VERSIONS

    On each host where moogsoft packages are installed, install the patch RPMs:

    • For internet-connected hosts run the following command:

      yum -y upgrade $(rpm -qa --qf '%{NAME}\n' | grep moogsoft | sed 's/$/-9.0.0.2/')
    • For offline hosts, run the following command in the directory containing the patch RPMs:

      yum -y upgrade $(rpm -qa --qf '%{NAME}\n' | grep moogsoft | sed 's/$/-9.0.0.2*.rpm/')
  4. FOR ALL VERSIONS

    Upgrade Erlang (required for the new version of RabbitMQ):

    • Online RPM erlang upgrade command:

      yum upgrade https://github.com/rabbitmq/erlang-rpm/releases/download/v25.3.2.2/erlang-25.3.2.2-1.el8.x86_64.rpm
    • Offline RPM erlang upgrade command:

      yum upgrade erlang-25.3.2.2
  5. FOR ALL VERSIONS

    Now the RabbitMQ binaries have been upgraded, the RabbitMQ nodes need to be restarted.

    service rabbitmq-server restart

    Perform some health checks (for example as documented here: https://www.rabbitmq.com/monitoring.html#health-checks) to ensure the cluster is operating as expected

    Note

    If RabbitMQ fails to start, check that Erlang has been upgraded as per the previous step

  6. FOR ALL VERSIONS

    Refresh all stored procedures (provide the 'ermintrude' DB user password when prompted):

    $MOOGSOFT_HOME/bin/utils/moog_db_auto_upgrader -t 9.0.0 -u ermintrude
  7. FOR ALL VERSIONS

    Upgrade apache-tomcat on the server where moogsoft-ui is installed: IMPORTANT: If the Xmx value for apache-tomcat has been changed from the default in the /etc/init.d/apache-tomcat service script, ensure the customised value is replaced after the upgrade, then restart the apache-tomcat service.

    1. Remove the existing Apache Tomcat

      rm -rf /etc/init.d/apache-tomcat
      rm -rf ${APPSERVER_HOME}
      rm -rf /usr/share/apache-tomcat
    2. Deploy the new version of Apache Tomcat:

      $MOOGSOFT_HOME/bin/utils/moog_init_ui.sh -twf
    3. If you made any changes to the original Apache Tomcat service script, apply the same changes to the new version

  8. Validate the patch:

    $MOOGSOFT_HOME/bin/utils/moog_install_validator.sh
    $MOOGSOFT_HOME/bin/utils/tomcat_install_validator.sh
    $MOOGSOFT_HOME/bin/utils/moog_db_validator.sh

    If there are any errors from the validators, contact Moogsoft Support

  9. Re-install the latest 'Addons' pack Install Moogsoft Add-ons

  10. FOR ALL VERSIONS

    Restart opensearch:

    service opensearch restart
  11. Restart moogfarmd and any LAMs e.g:

    service moogfarmd restart;
    service restlamd start;
  12. Restart any event feeds if they were stopped.

  13. Clear the browser cache and log in to the UI.