Perform a distributed installation RHEL#

Deprecated: Use installation playbooks instead

Instructions to manually install and upgrade EclecticIQ Intelligence Center, and using rundoc to install or upgrade EclecticIQ Intelligence Center, are deprecated.

Use EclecticIQ Intelligence Center installation playbooks instead.

Tip

Make sure you’ve set up the repositories before attempting these instructions.

This procedure guides you through a distributed installation across multiple target hosts:

  • Database servers hosting the databases:

    • Elasticsearch and Logstash

    • PostgreSQL

    • Redis

  • Intelligence Center (IC) servers hosting:

    • The IC backend components.

    • The IC frontend components.

Install first the databases on their dedicated servers, and then the IC on its other dedicated servers.

⚠️ Permissive defaults

Instructions here set permissive default network bindings.

You should change these to a more restrictive configuration.

Elasticsearch and Logstash#

Elasticsearch and Logstash should be installed on the same host.

Logstash is an optional service.

This procedure consists of the following steps:

  • Install Java.

  • Install Postfix.

  • Install and configure Elasticsearch.

  • Enable and start the Elasticsearch service.

  • Install and configure Logstash.

  • Enable and start the Logstash service.

Install Java#

Install Java 11 (OpenJDK).

yum -y install java-11-openjdk-headless tzdata-java
update-alternatives --set java $(readlink -f /usr/lib/jvm/jre-11/bin/java)

Install Postfix#

Some functionality of Intelligence Center relies on sending emails. For that an MTA has to be installed.

yum -y install postfix

Install and start Elasticsearch#

  1. Install the Elasticsearch package:

    # Install Elasticsearch
    yum -y install eclecticiq-elasticsearch
    
  2. Configure the Elasticsearch service to listen on for incoming connections on 0.0.0.0:

    # Elasticsearch bind address
    echo -e "[Service]\nEnvironment=BINDING_ADDRESS=0.0.0.0" > /etc/systemd/system/elasticsearch.service.d/20-eclecticiq_binding_address.conf
    
  3. Elasticsearch cluster with multiple master-eligible nodes: If you are forming a cluster with multiple master-eligible nodes, you must add cluster.initial_master_nodes to /etc/eclecticiq-elasticsearch/elasticsearch.yml on those nodes before starting the cluster for the first time.

    For more information, see Elasticsearch [8.15]: Bootstrapping a cluster.

  4. Start and enable the service:

    # Start and enable the Elasticsearch service
    systemctl start elasticsearch
    systemctl enable elasticsearch
    

Export the Logstash binding address#

On the Elasticsearch host, set the syslog_server environment variable to the network address of the Logstash service:

syslog_server=

If you’ve installed Elasticsearch and Logstash on the same host, this can be set to 127.0.0.1.

Install and start Logstash#

  1. Install Logstash:

    # Install Logstash
    yum -y install eclecticiq-logstash
    
  2. Start and enable the service:

    # Start and enable the Logstash service
    systemctl start logstash
    systemctl enable logstash
    

PostgreSQL#

This procedure consists of the following steps:

  • Set and export the PostgreSQL credentials.

  • Install PostgreSQL.

  • Enable and start the PostgreSQL service.

Set environment variables#

Set the following environment variables:

db_user=
db_name=
db_pass=

Env. variable

Description

db_user

PostgreSQL user name.

db_pass

PostgreSQL user password.

db_name

Name of PostgreSQL database used by the IC.

Install and start PostgreSQL#

  1. Install PostgreSQL:

    # Install PostgreSQL
    yum -y install eclecticiq-postgres
    
  2. Start and enable the service:

    # Start/Enable PostgreSQL service
    systemctl start postgresql-14
    systemctl enable postgresql-14
    

Redis#

This procedure consists of the following steps:

  • Set and export the Redis credentials.

  • Install and configure Redis.

  • Enable and start the Redis service.

Set environment variables#

Set the following environment variables:

redis_pass=

Env. variable

Description

redis_pass

Password for redis user.

Install and start Redis#

  1. Install Redis:

    # Install Redis
    yum -y install eclecticiq-redis
    
  2. Configure the service to listen for incoming connections on 0.0.0.0:

    # Redis bind address
    echo "bind 0.0.0.0" >> /etc/eclecticiq-redis/local.conf
    
  3. Start and enable the service:

    # Start/Enable Redis service
    systemctl start redis
    systemctl enable redis
    

EclecticIQ Intelligence Center#

Install the IC after you’ve installed and started the above services.

The -backend and -frontend packages can be installed on separate hosts.

This procedure consists of the following steps:

  • Set a basic configuration by defining the hostnames and the credentials to use during the IC installation.

  • Install the IC backend components on their dedicated server.

  • Enable and start the IC backend services on the local host.

  • Install the IC frontend components on their dedicated server.

  • Enable and start the IC web service on the local host.

Set service locations in environment variables#

Set the following environment variables to each services’ location on the network:

db_host=
redis_host=
es_host=
syslog_server=

Env. variable

Description

db_host

Network address of PostgreSQL service.

redis_host

Network address of Redis service.

es_host

Network address of Elasticsearch service.

syslog_server

Network address of Logstash service.

Set credentials in environment variables#

Set as environment variables the credentials needed to connect to services:

db_user=
db_name=
db_pass=
redis_pass=

Env. variable

Description

db_user

PostgreSQL user name.

db_pass

PostgreSQL user password.

db_name

Name of PostgreSQL database used by the IC.

redis_pass

Password for redis user.

Set parameters in /etc/default/eclecticiq-platform#

Alternatively, set these parameters in the /etc/default/eclecticiq-platform file:

cat << EOF >> /etc/default/eclecticiq-platform
db_host=${db_host}
db_user=${db_user}
db_name=${db_name}
db_pass=${db_pass}
redis_host=${redis_host}
es_host=${es_host}
redis_pass=${redis_pass}
syslog_server=${syslog_server}
EOF

Install the IC backend#

Set a secret key in /etc/default/eclecticiq-platform:

EIQ_SECRET_KEY=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
echo "EIQ_SECRET_KEY=$EIQ_SECRET_KEY" >> /etc/default/eclecticiq-platform

Install the IC backend:

# Install the backend
yum -y install eclecticiq-platform-backend-all

Install the extensions#

On the IC backend host, install the extensions:

📔 You must set up the /opt/eclecticiq-platform-backend/pip.conf and ~/.netrc files in “Set up the repositories” for this command to work.

# Uninstall old extensions from venv
/opt/eclecticiq-platform-backend/bin/pip freeze | grep '^eclecticiq-extension-' | grep -v '^eclecticiq-extension-api=' | cut -d= -f1 | xargs -r /opt/eclecticiq-platform-backend/bin/pip uninstall -y

# Install specified extensions in venv
/opt/eclecticiq-platform-backend/bin/pip install $extensions_packages

Start the services#

Start and enable services:

# start/enable backend 3rd party services
systemctl restart nginx
systemctl enable nginx
systemctl start kibana
systemctl enable kibana
systemctl start statsite
systemctl enable statsite
systemctl restart rsyslog
systemctl enable rsyslog
systemctl start postfix
systemctl enable postfix

Restrict access to configuration files:

chown root:eclecticiq /etc/default/eclecticiq-platform*
chmod 640 /etc/default/eclecticiq-platform*

Install the IC frontend#

Install the IC frontend and documentation:

# Install the frontend and documentation packages
yum -y install eclecticiq-platform-frontend eclecticiq-platform-docs

Start Nginx#

Restart the Nginx service:

# Start/Enable web service
systemctl restart nginx
systemctl enable nginx

Database migrations#

Once done with the instructions here, you must perform database migrations to finish installing the IC.

Important

To complete the installation procedure, make sure you run the database migrations before continuing with the other configuration steps.