Installing Elasticsearch on Openshift

Hi,

Is it possible to install elasticsearch on openshift?

I am a newbie in both platforms and couldn't find any working tutorials. Any help would be much appreciated.

Many thanks,
Andrew

Hi,

One example can be found here: https://github.com/openshift/origin-aggregated-logging/tree/master/elasticsearch

Related Ansible code is here: https://github.com/openshift/openshift-ansible/tree/master/roles/openshift_logging_elasticsearch

Notice there are couple of third-party plugins used in the code, you might not need all of them in you use case. Generally, there are probably other approaches how to go about installing and operating ES in Openshift, it all depends on your use case and specific needs.

Regards,
Lukáš

Hi Lucas, thanks for the prompt reply but perhaps I wasnt specific enough.

We have a Wordpress site and want to implement Elastic Search for it.

We need to just:

  • Install and configure Elastic Search on Openshift
  • Secure the server so that only our website communicates with it

We will then use the plugin Fantastic ElasticSearch to connect our website to the Openshift server.

Is there an easy to follow tutorial for this kind of project?

Many thanks again!

Hi Andrew,

On a high-level I would say "just" take an ES (Docker) container add security plugin and you can go... but unfortunately I think you will need to plan ahead a bit more. There are couple of things you need to consider and answer first.

  • Do you plan to run multiple ES nodes or just a single one? If you need more nodes then you need to think about how to implement ES node discovery in Openshift/Kubernetes. There are couple options, some of them are:

  • As for securing your ES cluster I would recommend you to start by looking at SearchGuard plugin. Although some of its features are paid only there is a chance that you can get what you need for free. It depends on your needs. Check the features comparison.

  • What version of ES do you want to use? You need to keep in mind that all ES plugins must be released for specific ES version. This means that once you decide which ES plugins you want to use you need to check if those plugins support specific ES version.

  • The reason why I mentioned ES version is you pointed out the wordpress-fantastic-elasticsearch. I am not familiar with this code but from quick scan it seem they are using ES Python client "ruflin/elastica": "~3.1.1" which means it expects Elasticsearch v2.2.1 (?). In other words in this case the library that you want to use for Wordpress-ES integration may dictate you specific version of ES, which in turn will have impact on specific ES plugin releases you have to use.

  • Last but not least. You should not forget about ES monitoring and alerting. There are many options. I would personally recommend you looking at Prometheus which is very easy to use in clouds (for both the monitoring and alerting). To allow Prometheus server to scrape all ES node metrics you can use elasticsearch-prometheus-exporter plugin. It is also worth mentioning that Grafana has very good support for Prometheus.

HTH,
Lukáš

Hi Lukas,

This is very useful information but unfortunately over my skillset. Hopefully we will find a freelancer to help out!

Many thanks,
Andrew

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.