Skip to content

Latest commit

 

History

History
74 lines (47 loc) · 1.36 KB

File metadata and controls

74 lines (47 loc) · 1.36 KB

Elasticsearch

Elasticsearch is a distributed, RESTful search and analytics engine capable of addressing a growing number of use cases.

Getting Started

Elasticsearch + Kibana

Container version

  • elasticsearch:7.12.0

Prerequisites

Running

Modify environment file

cat build/.env
ELASTICSEARCH_PASSWORD=password

Build docker images and start

初始化, 建立相關資料夾以及憑, 憑證會生成在 "certs/elastic-stack-ca.p12" 底下

make init

確認憑證 "certs/elastic-stack-ca.p12" 存在後, 即可啟動服務

# Containers down and up and logs
make dul

瀏覽器開啟 http://localhost 即可以看到 Kibana 畫面, 使用者帳號 "elastic 密碼為剛剛設置的密碼 "password"

Stop containers

停止服務

make down

移除資料

make clean

管理用戶

建立帳號 justin 的 superuser

# create user
docker exec -it elasticsearch /usr/share/elasticsearch/bin/elasticsearch-users useradd justin -p 123456 -r superuser

移除帳號 justin

# delete user
docker exec -it elasticsearch /usr/share/elasticsearch/bin/elasticsearch-users userdel justin