Skip to main content

Posts

How to deply Elasticsearch and Kibana (elastic stack 7.14) in docker

How to deploy Elasticsearch and kibana in docker? I will use docker-compose to fast deploy Elastic stack version 7.14. 1'st step: Install docker on your machine :) 2'nd Step: Generate certificate using any tool with what you know how to use. I used CA cert and elastic host cert for both elasticsearch and kibana. Elastic provides tool to generate certificates called  elasticsearch-certutil and you can run it from location /usr/share/elasticsearch/bin (After installing elasticsearch). 3'rd step: After first run generate users and passwords. You can add new user with superuser role or use tool provided by elastic team ( /usr/share/elasticsearch/bin/elasticsearch-setup-passwords ). I used tool from elastic team because it can generate passwords for all built-in accounts. 4'th step: Create all paths: /docker/es01/data /docker/es01/config/ And files: ca.crt, pn.crt, pn.key 5'th step: Change IP address, passwords and keys in config: HOST_IP, Password_for_kibana_system, 32...

Installing Elastic STACK

Fast elastic install script:    #!/bin/bash # Add users sudo addgroup operator_user sudo useradd operator_user-s /bin/bash -m -g operator_user -G sudo -p operator_password # add  APT keys and sources wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add - echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-7.x.list    # apt update && install all components sudo apt-get update && sudo apt-get install -y apt-transport-https nano unzip ntpdate htop bwm-ng nfs-common   elasticsearch    && sudo apt upgrade -y   #restart service daemon sudo /bin/systemctl daemon-reload sudo /bin/systemctl enable elasticsearch.service   # configure elastic host sudo mv /etc/elasticsearch/elasticsearch.yml /etc/elasticsearch/elasticsearch.yml.old echo " cluster.name: homenet node.name: $HOSTNAME node.attr.allocation: ...