Setup Elasticsearch 7.x Cluster on Raspberry Pi / ASUS Tinker Board

Eray Arslan
Sep 23, 2019 · 3 min read
My Cluster

Hardware

NODES
1x Raspberry Pi 2B - Data Node
1x Raspberry Pi 3B - Data Node
1x Raspberry Pi 4B - Data Node
1x Asus Tinker Board - Master Node
SWITCH
1x 8-Port TP-LINK 10/100Mbps
POWER HUB
1x Dark Connect Master
SDCARD
4x Samsung EVO Plus 32GB
POWER CABLE
3x Codegen Micro USB - For RPi 2B, RPi 3B and Asus Tinker Board
1x Codegen Type-C - For RPi 4B
ETHERNET CABLE
4x Jadaol Cat 6 Flat Ethernet Cable 1 ft
CASE
1x iUniker Raspberry Pi Cluster Case

Operating System

Raspberry Pi      -> Raspbian Buster Lite
ASUS Tinker Board -> Armbian Bionic Server

First Boot

# Example
rpi2b-node
rpi3b-node
rpi4b-node
tinker-node

Network

# Example
auto eth0
iface eth0 inet static
address 192.168.1.100 # current device ip
netmask 255.255.255.0
gateway 192.168.1.1 # modem gateway

Update Packages and Reboot

sudo apt-get update
sudo apt-get upgrade
sudo reboot

Summary

# Example
HOSTNAME
IP RAM TYPE
tinker-node - 192.168.1.100 - 2GB - Master
rpi4b-node - 192.168.1.101 - 4GB - Data
rpi3b-node - 192.168.1.102 - 1GB - Data
rpi2b-node - 192.168.1.103 - 1GB - Data

Prepare Java

sudo apt-get install openjdk-11-jdk          # Raspberry Pi
sudo apt-get install openjdk-11-jre-headless # ASUS Tinker Board
JAVA_HOME=/usr/lib/jvm/java-11-openjdk-armhf

Setup Elasticsearch

wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.3.2-no-jdk-amd64.deb
sudo dpkg -i --force-all --ignore-depends=libc6 elasticsearch-7.3.2-no-jdk-amd64.deb
# Data Nodes Example
xpack.ml.enabled: false
node.master: false
node.data: true
discovery.seed_hosts: ["192.168.1.100", "192.168.1.101", "192.168.1.102", "192.168.1.103"] # all node ips
http.host: 192.168.1.101 # current node ip
transport.host: 192.168.1.101 # current node ip
bootstrap.system_call_filter: false
cluster.initial_master_nodes: ["tinker-node"] # master node node.name
# Master Node Example
xpack.ml.enabled: false
node.master: true
node.data: false
discovery.seed_hosts: ["192.168.1.100", "192.168.1.101", "192.168.1.102", "192.168.1.103"] # all node ips
transport.host: 192.168.1.100 # current node ip
http.host: 192.168.1.100 # current node ip
bootstrap.system_call_filter: false
-Xms1g to -Xms512M
-Xmx1g to -Xmx512M
sudo systemctl enable elasticsearch
sudo systemctl start elasticsearch
curl 192.168.1.100:9200/_cat/nodes

Post-Install

# Example
docker run -d -p 5601:5601 \
-e "ELASTICSEARCH_HOSTS=http://192.168.1.100:9200" \
docker.elastic.co/kibana/kibana:7.3.1

Troubleshooting

# /var/log/elasticsearch permission issue solutionsudo chown -R elasticsearch:elasticsearch /var/log/elasticsearch
systemctl restart elasticsearch.service

hepsiburadatech

hepsiburada technology

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store