Elasticsearch
Hardware requirements
CPU
At least 2 cores.
Memory
At least 32GB of RAM as Elasticsearch will allocate half of the available memory for its own usage. Elasticsearch recommends no more that 64GB of RAM per node in the Elasticsearch cluster.
Disk
The recommended size is at least 1.5GB of disk per millions of jobs.
In case OKA is configured to monitor your cloud consumption using CloudSHaper, we recommend to provision 2GB of disk per millions of entries.
Installation
Since 2021 Elasticsearch has moved to a single licensing model and versions supported by OKA can be found through the following link:
For more info look at:
Example:
Elasticsearch version 7.17.13:
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.17.13-amd64.deb
dpkg -i elasticsearch-7.17.13-amd64.deb
Elasticsearch version 7.17.13:
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.17.13-x86_64.rpm
rpm -i elasticsearch-7.17.13-x86_64.rpm
HowTo
Configuration:
It is recommended to have a look at this documentation prior to starting your service:
Make sure to configure the JVM heap size correctly. To do so, edit the JVM configuration (
/etc/elasticsearch/jvm.options
) and set the total heap space either to:Half of the node’s total memory. For example, if the total memory is 32GB, set
-Xms16g
and-Xmx16g
.Or comment those 2 lines to let Elasticsearch manage the heap space (see set-jvm-heap-size).
Start elasticsearch service:
sudo /bin/systemctl enable elasticsearch.service sudo systemctl start elasticsearch.service
Test it using curl:
sudo apt-get update; sudo apt-get install -y curl curl -X GET "host:port/_cat/health?v&pretty"
Optional - Add a proxy:
If on a container or a virtual machine you might want to create a proxy in order to access your db from somewhere else. See the nginx page.
Create a dedicated conf file for elasticsearch:
sudo vim /etc/nginx/conf.d/elastic.conf server { listen 8080; location / { proxy_pass http://host:port; } }
You might also want to edit the maximum size allowed for the request handled by nginx:
Restart your services:
sudo systemctl restart elasticsearch.service sudo service nginx restart