30 Eylül 2022 Cuma

Docker ve Elasticsearch

Örnek
Şöyle yaparız. Böylece https://localhost:9200 adresinden erişebiliriz
docker pull docker.elastic.co/elasticsearch/elasticsearch:8.3.2

docker network create elastic

docker run --name es01 
           --net elastic 
           -p 9200:9200 -p 9300:9300 
            -it docker.elastic.co/elasticsearch/elasticsearch:8.3.2

docker cp es01:/usr/share/elasticsearch/config/certs/http_ca.crt .
Şöyle yaparız
curl --cacert http_ca.crt -u elastic https://localhost:9200
discovery.type Alanı

Örnek
Şöyle yaparız
# Custom network
docker network create sat-elk-net

docker run -d --name sat-elasticsearch \
  --net sat-elk-net \
  -p 9200:9200 \
  -p 9300:9300 \
  -e "discovery.type=single-node" \
  elasticsearch:7.17.4

# ElasticHQ Management Tool
docker run -d --name sat-elastichq \
  --net sat-elk-net \
  -p 5000:5000 \
  elastichq/elasticsearch-hq
Şöyle yaparız
# Disable XPack in Elasticsearch
docker exec -it <container_id> bash
cd /usr/share/elasticsearch/config
echo "xpack.security.enabled: false" >> elasticsearch.yml
xpack.security.enabled Alanı
Açıklaması şöyle
Elasticsearch 8 comes with SSL/TLS enabled by default, I disabled security with the environment variable “xpack.security.enabled=false”. If security remains enabled, configuring the Elasticsearch client will require setting up a proper SSL connection.
Örnek
Şöyle yaparız
docker run -p 9200:9200 \
  -e "discovery.type=single-node" \
  -e "xpack.security.enabled=false" \
  docker.elastic.co/elasticsearch/elasticsearch:8.8.1




Hiç yorum yok:

Yorum Gönder