3.4. Installation steps

Edit etc/org.apache.unomi.persistence.elasticsearch.cfg to add the following settings:

  1. transportClientClassName=org.elasticsearch.xpack.client.PreBuiltXPackTransportClient
  2. transportClientJarDirectory=XPACK_JARS_DIRECTORY
  3. transportClientProperties=xpack.security.user=elastic:changeme

You can setup more properties (for example for SSL/TLS support) by seperating the properties with commas,as in the following example:

  1. transportClientProperties=xpack.security.user=elastic:changeme,xpack.ssl.key=/home/user/elasticsearch-5.6.3/config/x-pack/localhost/localhost.key,xpack.ssl.certificate=/home/user/elasticsearch-5.6.3/config/x-pack/localhost/localhost.crt,xpack.ssl.certificate_authorities=/home/user/elasticsearch-5.6.3/config/x-pack/ca/ca.crt,xpack.security.transport.ssl.enabled=true

.

Launch Karaf and launch unomi using the command from the shell :

  1. unomi:start

Alternatively you could edit the configuration directly from the Karaf shell using the following commands:

  1. config:edit org.apache.unomi.persistence.elasticsearch
  2. config:property-set transportClientClassName org.elasticsearch.xpack.client.PreBuiltXPackTransportClient
  3. config:property-set transportClientJarDirectory XPACK_JARS_DIRECTORY
  4. config:property-set transportClientProperties xpack.security.user=elastic:changeme
  5. config:update
  6. unomi:start

You can setup more properties (for example for SSL/TLS support) by seperating the properties with commas,as in the following example:

  1. config:property-set transportClientProperties xpack.security.user=elastic:changeme,xpack.ssl.key=/home/user/elasticsearch-5.6.3/config/x-pack/localhost/localhost.key,xpack.ssl.certificate=/home/user/elasticsearch-5.6.3/config/x-pack/localhost/localhost.crt,xpack.ssl.certificate_authorities=/home/user/elasticsearch-5.6.3/config/x-pack/ca/ca.crt,xpack.security.transport.ssl.enabled=true