sherifabdlnaby / elastdocker

🐳 Elastic Stack (ELK) v8+ on Docker with Compose. Pre-configured out of the box to enable Logging, Metrics, APM, Alerting, ML, and SIEM features. Up with a Single Command.
https://towardsdatascience.com/running-securing-and-deploying-elastic-stack-on-docker-f1a8ebf1dc5b
MIT License
1.81k stars 319 forks source link

Error 64 on make setup when using ELK_VERSION=8.0.0 #61

Closed pni-mft closed 2 years ago

pni-mft commented 2 years ago

Describe the bug make setup fails when setting ELK_VERSION=8.0.0 or ELK_VERSION=8.0.1 in .env file

To Reproduce set ELK_VERSION=8.0.0 or ELK_VERSION=8.0.1 in .env

make setup

Expected behavior I expected it to build create setup files just as with 7.*

Screenshots

(base) swellmanatee@met-home-server:~/projects/elastdocker$ make setup
make[1]: Entering directory '/home/swellmanatee/projects/elastdocker'
docker-compose -f docker-compose.setup.yml run --rm certs
Creating elastic_certs_run ... done
======= Generating Elastic Stack Certificates =======
=====================================================
Clearing Old Certificates if exits... 
Generating... 
ERROR: 64
make[1]: *** [Makefile:28: certs] Error 64
make[1]: Leaving directory '/home/swellmanatee/projects/elastdocker'
make: *** [Makefile:31: setup] Error 2

Desktop (please complete the following information):

Distributor ID: Ubuntu
Description:    Ubuntu 20.04.4 LTS
Release:        20.04
Codename:       focal

Additional context Works perfectly fine when running 7.* ELK versions

sherifabdlnaby commented 2 years ago

@pni-mft elastdocker doesn't support >= v8.* yet. I have it in the plan but I haven't had the time. With 8.0 just released I might work on this very soon!

ScottFred commented 2 years ago

@sherifabdlnaby This is a great repo! Thanks for your efforts. It might be good to modify your README.md to clarify that the repo only works with ELK_VERSION<8.

brandonros commented 2 years ago

for what it's worth, I skipped logstash and did this:

# one time setup
sudo sysctl -w vm.max_map_count=262144 # Linux only? Not needed on Mac?
docker pull docker.elastic.co/elasticsearch/elasticsearch:8.0.1
docker pull docker.elastic.co/kibana/kibana:8.0.1
docker network create elastic
# begin elasticsearch + kibana setup
docker run \
  --name es01 \
  --net elastic \
  -p 127.0.0.1:9200:9200 \
  -it \
  docker.elastic.co/elasticsearch/elasticsearch:8.0.1
# Wait for elastic user password output as well as Kibana enrollment token output
# Leave running, open next step in 2nd terminal
docker run \
  --name kibana \
  --net elastic \
  -p 127.0.0.1:5601:5601 \
  -it \
  docker.elastic.co/kibana/kibana:8.0.1
# Take note of Kibana verification code in terminal output
# Load http://127.0.0.1:5601 in web browser, it'll ask for Elasticsearch enrollment token and Kibana verification code
# Log in with username: elastic password: from previous step on terminal output
# copy config + certs + data out of docker containers to local machine
docker cp kibana:/usr/share/kibana/config kibana-config
docker cp kibana:/usr/share/kibana/data kibana-data
docker cp es01:/usr/share/elasticsearch/data es01-data
docker cp es01:/usr/share/elasticsearch/config es01-config
# Kill Kibana, kill Elasticsearch with Ctrl+C
# remove old instances
docker rm es01
docker rm kibana
# stand up new instances that are configured with persistent certs, etc.
docker run \
  --name es01 \
  --net elastic \
  -p 127.0.0.1:9200:9200 \
  --mount type=bind,source="$(pwd)"/es01-data,target=/usr/share/elasticsearch/data \
  --mount type=bind,source="$(pwd)"/es01-config,target=/usr/share/elasticsearch/config \
  -it \
  docker.elastic.co/elasticsearch/elasticsearch:8.0.1
docker run \
  --name kibana \
  --net elastic \
  -p 127.0.0.1:5601:5601 \
  --mount type=bind,source="$(pwd)"/kibana-data,target=/usr/share/kibana/data \
  --mount type=bind,source="$(pwd)"/kibana-config,target=/usr/share/kibana/config \
  --mount type=bind,source="$(pwd)"/es01-config/certs,target=/usr/share/kibana/config/certs \
  -it \
  docker.elastic.co/kibana/kibana:8.0.1

Voila. Persistent "ELK" stack (without the L)

sherifabdlnaby commented 2 years ago

I am almost done with upgrading Elastdocker template to start an >8.0 Cluster 🙌🏻.

pni-mft commented 2 years ago

Aweseome!