6.36 Installing Moab Insight

This topic contains instructions on how to install Moab Insight (Insight).

Because Insight accumulates data for one cluster at a time, one Insight Server (daemon) should service one Moab instance. However, you can configure PostgreSQL to aggregate data using database replication mechanisms if you desire cross-cluster data.

Moab Workload Manager and Insight both tend to heavily consume system resources. Therefore, Adaptive Computing requires that the Insight Server and the Moab Workload Manager Server run on different hosts. For these installation instructions, the "Moab Server Host" refers to one host and the "Insight Server Host" refers to another host.

In this topic:

6.36.1 Prerequisites

In this section:

6.36.1.A Open Necessary Ports

If your site is running firewall software on its hosts, you will need to configure the firewall to allow connections to the necessary ports.

In this section:

Open the Insight Server Port (5568)

On the Insight Server Host, do the following:

[root]# iptables-save > /tmp/iptables.mod
[root]# vi /tmp/iptables.mod

# Add the following line immediately *before* the line matching
# "-A INPUT -j REJECT --reject-with icmp-host-prohibited"

-A INPUT -p tcp --dport 5568 -j ACCEPT

[root]# iptables-restore < /tmp/iptables.mod
[root]# service iptables save
[root]# firewall-cmd --add-port=5568/tcp --permanent
[root]# firewall-cmd --reload
[root]# vi /etc/sysconfig/SuSEfirewall2

FW_SERVICES_EXT_TCP="5568"
[root]# service SuSEfirewall2 restart

Open the Insight PostgreSQL Database Port (5432)

Insight requires access to the Insight PostgreSQL database. Depending on your system configuration, your PostgreSQL databases may not be installed on the same host as their corresponding component servers. For example, you may choose to install the Insight PostgreSQL database on the same host where you have installed the Moab PostgreSQL database instead of on the Insight Server Host.

On the Insight Database Host, do the following:

[root]# iptables-save > /tmp/iptables.mod
[root]# vi /tmp/iptables.mod

# Add the following lines immediately *before* the line matching
# "-A INPUT -j REJECT --reject-with icmp-host-prohibited"

-A INPUT -p tcp --dport 5432 -j ACCEPT

[root]# iptables-restore < /tmp/iptables.mod
[root]# service iptables save
[root]# firewall-cmd --add-port=5432/tcp --permanent
[root]# firewall-cmd --reload
[root]# vi /etc/sysconfig/SuSEfirewall2

FW_SERVICES_EXT_TCP="5432"

[root]# service SuSEfirewall2 restart

Open the MongoDB Database Port (27017)

Insight also requires access to the Moab MongoDB database. Depending on your system configuration, your MongoDB databases may not be installed on the same host as their corresponding component servers. For example, you may choose to install the Insight MongoDB on the same host where you have installed other MongoDB databases instead of on the Insight Server Host.

Do the following, as needed:

Open the Moab Server Ports (5574 and 5575)

On the Moab Server Host, do the following:

[root]# iptables-save > /tmp/iptables.mod
[root]# vi /tmp/iptables.mod

# Add the following lines immediately *before* the line matching
# "-A INPUT -j REJECT --reject-with icmp-host-prohibited"

-A INPUT -p tcp --dport 5574:5575 -j ACCEPT

[root]# iptables-restore < /tmp/iptables.mod
[root]# service iptables save
[root]# firewall-cmd --add-port=5574-5575/tcp --permanent
[root]# firewall-cmd --reload
[root]# vi /etc/sysconfig/SuSEfirewall2

FW_SERVICES_EXT_TCP="5574 5575"

[root]# service SuSEfirewall2 restart

6.36.1.B Verify the hostname

On the Insight Server Host, confirm your host (with the correct IP address) is in your /etc/hosts file. To verify that the hostname resolves correctly, make sure that hostname and hostname -f report the correct name for the host.

6.36.2 Dependencies, Packages, or Client Installations

In this section:

6.36.2.A Install Java

Install the Linux x64 RPM version of Oracle® Java® 8 Runtime Environment.

Oracle Java 8 Runtime Environment is the recommended Java environment, but Oracle Java 7 is also supported. All other versions of Java, including OpenJDK/IcedTea, GNU Compiler for Java, and so on cannot run Insight.

On the Insight Server Host, do the following:

  1. Install the Linux x64 RPM version of Oracle Java SE 8 JRE.
    1. Go to the to the Oracle Java download page.
    2. Copy the URL for the Linux x64 RPM version, and run the following command:
      [root]# rpm -Uh <URL>
      [root]# ln -s /usr/sbin/update-alternatives /usr/sbin/alternatives
      [root]# rpm -Uh <URL>

6.36.2.B Install MongoDB

The Insight MongoDB may be installed on the Insight Server Host or on different host. If you will install on a different host, and your configuration uses firewalls, open the necessary port. See 6.36.1.A Open Necessary Ports

To install and enable MongoDB, do the following:

  1. On the host you have chosen to install the Insight MongoDB database, do the following:
    1. Install mongo-10gen-servermongodb.
      [root]# yum install mongo-10gen-server --exclude mongodb-org,mongodb-org-server

      Running yum upgrade will replace MongoDB 2.4.x with a more recent, and incompatible version. Consider using yum version lock to maintain MongoDB 2.4.x.

      [root]# zypper install mongodb
    2. Start MongoDB.

      There may be a short delay (approximately 3 minutes) for Mongo to start the first time.

      [root]# chkconfig mongod on
      [root]# service mongod start
      [root]# cat > /usr/lib/systemd/system/mongodb.service <<End-of-file
      [Unit]
      Description=High-performance, schema-free document-oriented database
      After=syslog.target network.target
      
      [Service]
      Type=forking
      User=mongod
      Group=mongod
      Environment=CONFIG=/etc/mongod.conf
      Environment=OPTIONS=
      EnvironmentFile=-/etc/sysconfig/mongod
      ExecStart=/usr/bin/mongod -f \$CONFIG \$OPTIONS
      PrivateTmp=true
      LimitNOFILE=65536
      TimeoutStartSec=180
      StandardOutput=syslog
      StandardError=syslog
      
      [Install]
      WantedBy=multi-user.target
      End-of-file
      [root]# rm -f /etc/init.d/mongod
      [root]# systemctl enable mongodb.service
      [root]# systemctl start mongodb.service
      [root]# systemctl enable mongodb.service
      [root]# systemctl start mongodb.service
  2. Add the required MongoDB users to Insight MongoDB and Moab MongoDB; regardless of whether they share a host.

    These instructions show password examples (secret1, secret2, and secret3). Choose your own passwords for these users.

    • Insight MongoDB
      [root]# mongo
      > use admin;
      > db.addUser("admin_user", "secret1");
      > db.auth ("admin_user", "secret1");
      > use insight;
      > db.addUser ("insight_user", "secret4");
      > db.addUser("mws_user", "secret3", true);
      
      > exit
    • Moab MongoDB
      [root]# mongo
      > use admin;
      > db.auth("admin_user", "secret1");
      > use moab;
      > db.addUser ("insight_user", "secret4", true);
      
      > exit

    Because the admin_user has read and write rights to the admin database, it also has read and write rights to all other databases. See Control Access to MongoDB Instances with Authentication for more information.

  3. Edit the MongoDB configuration.

    Verify user authentication is enabled in MongoDB and that the mongo server is listening for external connections. By default some versions of MongoDB listen only for connections from localhost. Commenting out bind_ip causes the mongo server to listen on all interfaces.

    If Insight MongoDB resides on a different host from Moab MongoDB, you will need to perform this procedure twice (once for each host).

    [root]# vi /etc/mongod.conf
    #bind_ip = <local_host>
    ...
    auth = true
    [root]# service mongod restart
    [root]# vi /etc/mongod.conf
    #bind_ip = <local_host>
    ...
    auth = true
    [root]# systemctl restart mongodb.service
    [root]# vi /etc/mongodb.conf
    #bind_ip = <local_host>
    ...
    auth = true
    [root]# systemctl restart mongodb.service

6.36.2.C Install PostgreSQL

The Insight PostgreSQL database may be installed on the Insight Server Host or on different host. If you will install on a different host, and your configuration uses firewalls, open the necessary port. See 6.36.1.A Open Necessary Ports.

On the host you have chosen to install the Insight PostgreSQL database, do the following:

  1. Install PostgreSQL.
    [root]# yum install postgresql93-server
    [root]# service postgresql-9.3 initdb
    [root]# yum install postgresql93-server
    [root]# /usr/pgsql-9.3/bin/postgresql93-setup initdb
    [root]# zypper install postgresql-server
    [root]# systemctl start postgresql
  2. Edit the PostgreSQL configuration file to listen for connections on all interfaces. See the documentation provided in the postgresql.conf file if you want to be more restrictive.
    [root]# vi /var/lib/pgsql/9.3/data/postgresql.conf
    
    # Uncomment the listen addresses line in the configuration:
    listen_addresses = '*'
    [root]# vi /var/lib/pgsql/data/postgresql.conf
    
    # Uncomment the listen addresses line in the configuration:
    listen_addresses = '*'
  3. Edit the PostgreSQL host-based authentication (HBA) configuration file to enable TCP connections using encrypted passwords (change ident to md5) and add a line for each host that needs to connect to the database. See the "ADDRESS" documentation provided in pg_hba.conf for details.
    [root]# vi /var/lib/pgsql/9.3/data/pg_hba.conf
    [root]# vi /var/lib/pgsql/data/pg_hba.conf

    If you are using MWS, add the IP address of the host on which MWS Server is installed. This is shown in the following example as <MWS_host_address>.

    Using "0.0.0.0/0" in place of "<MWS_host_address>" will allow connections from all hosts.

    If the "host" lines are not present, add them as they appear in the example.

    # TYPE  DATABASE        USER            ADDRESS                         METHOD
    
    # "local" is for Unix domain socket connections only
    local   all             all                                             peer
    				
    # IPv4 local connections:
    host    all             all             <MWS_host_address>/32           md5 # If using MWS
    host    all             all             <Insight_host_address>/32       md5
    host    all             all             127.0.0.1/32                    md5
    
    # IPv6 local connections:
    host    all             all             ::1/128                         md5
  4. Start or restart the PostgreSQL database.
    [root]# chkconfig postgresql-9.3 on
    [root]# service postgresql-9.3 start
    [root]# systemctl enable postgresql-9.3.service
    [root]# systemctl restart postgresql-9.3.service
    [root]# systemctl enable postgresql.service
    [root]# systemctl restart postgresql.service

6.36.3 Install Insight

You must complete the tasks to install the dependencies, packages, or clients before installing Insight Server. See 6.36.2 Dependencies, Packages, or Client Installations.

If your configuration uses firewalls, you must also open the necessary ports before installing Insight Server. See 6.36.1.A Open Necessary Ports.

These instructions contain steps to edit the /opt/insight/etc/config.groovy file.

Commented out values in the config.groovy file are not necessarily the default values.

It is recommended that anytime you edit the config.groovy file that you first stop Insight, edit the file and then restart Insight.

  1. If you have not already done so, complete the steps to prepare the Insight Server Host. See 6.31 Preparing the Host – Typical Method or 6.30 Preparing the Host – Offline Method.
  2. Install the Insight RPM.
    [root]# yum install moab-insight
    [root]# zypper install moab-insight

    If the installation returns the following warning line:

    warning: rpmts_HdrFromFdno: Header V4 RSA/SHA1 Signature, key ID 952741e1: NOKEY

    Retrieving key from file:///opt/adaptive-rpm-repository/key/GPG_ADAPTIVE_COMPUTING_INC_EL_6_KEY

    Importing GPG key 0x952741E1:

    Userid: "Adaptive Computing Enterprises, Inc. (EL 6 key) <[email protected]>"

    From : /opt/adaptive-rpm-repository/key/GPG_ADAPTIVE_COMPUTING_INC_EL_6_KEY

    This is normal. You can safely input y and continue.

  3. Create the Insight user and PostgreSQL database.

    PostgreSQL was installed earlier in this topic. See 6.36.2.C Install PostgreSQL.

    This instructions show the default changeme! password. Change this password according to your password security process.

    1. Change to the postgres user.
      su - postgres
    2. Do the following:
      [postgres]$ psql
      CREATE USER moab_insight WITH PASSWORD 'changeme!';
      CREATE DATABASE moab_insight WITH OWNER=moab_insight;
      CREATE DATABASE moab_insight_reference WITH OWNER=moab_insight;
      \q
    3. Initialize the moab_insight database. This sets up event triggers so that database schema validation works correctly in Insight.
      [postgres]$ psql moab_insight -f /opt/insight/db/initialize.sql
    4. If you are also using MWS, create and grant permissions for the MWS user to query the database.

      1. Log in to the moab_insight database.
        [postgres]$ psql moab_insight
      2. Create the MWS user and grant the MWS user select permissions on all tables in the public schema.
        CREATE USER mws WITH PASSWORD 'changeme!';
        GRANT SELECT ON ALL TABLES IN SCHEMA public TO mws;
      3. Connect to the moab_insight database as the moab_insight user. You will be prompted for the password your selected for the moab_insight user earlier in the procedure (default is "changeme!").
        \connect moab_insight moab_insight localhost
      4. Grant the MWS user select permissions on all tables in the public schema.
        ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO mws;
        \q
        [postgres]$ exit
  4. If you are using MWS, on the MWS Server Host, do the following:
    1. Add or edit the following parameters in the /opt/mws/etc/mws-config.groovy file to specify connection information for the Insight Server and Database.
      [root]# vi /opt/mws/etc/mws-config.groovy
      
      dataSource_insight.url = "jdbc:postgresql://<insight_postgresql_server_ip_address>:5432/moab_insight"
      dataSource_insight.username = "<postgresql_mws_username>"
      dataSource_insight.password = "<postgresql_mws_user_password>"
      insight.server = "<insight_server_ip_address>"
      insight.command.port = 5568
      insight.command.timeout.seconds = 5

      In this example,

      • <insight_postgresql_server_ip_address> represents the DNS name for the host on which the Insight PostgreSQL database resides.
      • <postgresql_mws_username> and <postgresql_mws_user_password> represent the username and password used to connect to the Insight PostgreSQL database. These were specified for the MWS user earlier in this procedure (default user is "MWS", default password is "changeme!").
      • <insight_server_ip_address> represents the DNS name for the host on which the Insight Server is running.
      • the default PostgreSQL port number (5432) and the default Insight command port number (5568) are used.

      See Configuration in the Moab Web Services Reference Guide for more information on the MWS configuration properties.

    2. Restart Tomcat.
      [root]# service tomcat restart
      [root]# systemctl restart tomcat.service
      [root]# systemctl restart tomcat.service
  5. Configure Insight's connection to the Insight PostgreSQL database. On the Insight Server Host, edit /opt/insight/etc/config.groovy as follows:
    jdbc.referenceUrl = "jdbc:postgresql://<insight_postgresql_server_ip_address>/moab_insight_reference"
    jdbc.url = "jdbc:postgresql://<insight_postgresql_server_ip_address>/moab_insight"
    jdbc.username = "moab_insight"
    jdbc.password = "changeme!"
  6. Configure Insight's connection to the Insight MongoDB database and the Moab MongoDB database. On the Insight Server Host, edit /opt/insight/etc/config.groovy as follows:
    mongo.host="<insight mongo host>"
    mongo.port=<insight mongo port>
    mongo.username="insight_user"
    mongo.password="secret4"
    				
    moab.mongo.host="<moab mongo host>"
    moab.mongo.port=<moab mongo port>
    moab.mongo.username="insight_user"
    moab.mongo.password="secret4"

    "secret4" is the password you specified when installing the mongoDB. See 6.36.2.B Install MongoDB.

  7. On the Insight Server Host, verify that Insight runs on startup.
    [root]# chkconfig insight on
    [root]# systemctl enable insight.service
    [root]# systemctl enable insight.service
  8.  On the Moab Server Host, configure Moab's connection to Insight.
    1. In /opt/moab/etc/moab.cfg, configure the INSIGHTENDPOINT parameter so that Moab can connect to Insight. See Moab Parameters in the Moab Workload Manager Administrator Guide for parameter information.
      INSIGHTENDPOINT <hostname>[:<port>]

      <hostname> is the server where Insight is located. <hostname> is required, <port> is optional.

    2. In /opt/moab/etc/moab-private.cfg, configure the MESSAGEQUEUESECRETKEY parameter so that Moab can connect to Insight. See Secure communication using secret keys.

      MESSAGEQUEUESECRETKEY <secret key>

      The <secret key> is required when updating the Insight configuration file later in this procedure.

    3. Restart Moab in order for the new configuration parameters to take effect.
      service moab restart
      systemctl restart moab.service
      systemctl restart moab.service
    4. Verify that Moab is properly configured to connect to Insight.
      mdiag -S | grep Insight

      You should see something similar to the following:

      [root]# mdiag -S | grep Insight
      ZeroMQ Insight connection is bound on port 5574 (reliability port 5575) on host * using Insight endpoint <the insight hostname displays here>:5568
      encryption is on)
      ZeroMQ Insight reliable message delivery is using store file(s) up to 1024 MB in /opt/moab/spool/insight_store/
  9. On the Insight Server Host, configure the moab.host and messageQueue.secretKey parameters in the Insight configuration file /opt/insight/etc/config.groovy.
    moab.host = "<moab server>"
    messageQueue.secretKey = "<secret key>"

    The <secret key> must match the secret key configured in moab-private.cfg on the Moab server for the MESSAGEQUEUESECRETKEY configuration parameter.

  10. On the Insight Server Host, start Insight.
    [root]# service insight start
    [root]# systemctl start insight.service
    [root]# systemctl start insight.service

    The first time you start Insight it will take a minute or two to create the database schema. Although 'service insight start' will quickly return OK, it is not safe to terminate Insight while this initialization is taking place. Rebooting or terminating Insight during this initialization may cause the database to not be initialized correctly.

    You will know it is safe to reboot or terminate Insight if you see the following line in /opt/insight/log/insight.log.

    2014-12-11T18:36:08.059-0700    main    INFO    com.ace.insight.app.Application 0           Started Application in 89.502 seconds (JVM running for 89.882)

Related Topics 

© 2017 Adaptive Computing