ElasticSearch / Unomi cluster setup

Here are the steps followed to install an ElasticSearch and Unomi clusters for our preproduction environment. This cluster will be used for Marketing Factory but also for every Jahia product or module needing ElasticSearch.

General

ElasticSearch and Unomi will be installed on a cluster of three nodes:

unomipp01

unomipp02

unomipp03

Each node has :

Ubuntu 16.04 LTS

40 GB of hard drive

4 CPUs

7 GB of memory

ES cluster

Install

At the moment, only ElasticSearch 5.6.3 can be used with DX. The Debian package can be downloaded here

To install it:

sudo dpkg -i elasticsearch-5.6.3.deb

To configure it, you have to edit the file /etc/elasticsearch/elasticsearch.yml

# Name of the cluster. It has to be uniq per environment
cluster.name: JahiaClusterPP
# Name of the node
node.name: unomipp01
# Host name
network.host: unomipp01.int.jahia.com
# Name of the hosts being part of the cluster
discovery.zen.ping.unicast.hosts: ["unomipp01.int.jahia.com", "unomipp02.int.jahia.com", "unomipp03.int.jahia.com"]
# Compress the TCP transport
transport.tcp.compress: true

Enable the service ElasticSearch in order to start it automatically after an unexpected shutdown of the server

sudo systemctl enable elasticsearch

Start the service elasticsearch

sudo service elasticsearch start

Securing

By default, ElasticSearch does not ask for any kind of authentication. To correct that, you can :

Backup

To create a backup, you can now archive to an outside location the content of the folder /opt/unomi-default

Unomi front-end

All nodes are now working but the public URL for Unomi is not yet available. The related front-end will be installed on another node (for example web.int.jahia.com) which has also a public IP. The software Apache2 needs to be installed.

Add the file /etc/apache2/sites-enabled/unomipp.jahia.com.conf with the following content: