From e7c0659f396ff56e3509ed808175271ee1716779 Mon Sep 17 00:00:00 2001 From: Myer Nore Date: Mon, 10 Jul 2023 16:11:39 -0400 Subject: [PATCH] add docker-compose-es7.yml * add utility makefile commands mn/#87-support-elastic-7 --- Makefile | 39 +++++++++++++++++++++++++++++++++++++++ docker-compose-es7.yml | 42 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 81 insertions(+) create mode 100644 docker-compose-es7.yml diff --git a/Makefile b/Makefile index d77ce74..5923d21 100644 --- a/Makefile +++ b/Makefile @@ -79,3 +79,42 @@ nuke: @echo "Removing containers, networks, and data... ๐Ÿงจ" @echo docker compose down -v + +es-health-local-api: + @echo "Assuming you've got docker up, getting health of elasticsearch... ๐Ÿ“„" + @echo + curl 'localhost:9200/_cat/health?format=json&pretty=true' + @echo + +es-list-indexes-local-api: + @echo "Assuming you've got docker up, getting elasticsearch indexes via API call... ๐Ÿ“„" + curl 'localhost:9200/_cat/indices?format=json&pretty=true' + +es-print-java-env: + @echo "printing runtime value of ES_JAVA_OPTS" + docker-compose run --rm elastic printenv ES_JAVA_OPTS + +up: ## check coding style with pycodestyle and pylint + @echo "Bringing up elastic 6 in docker ๐Ÿš€" + docker compose up -d --remove-orphans + +down: + @echo "Destroying local containers, but keeping data volumes intact... ๐Ÿ˜ด" + docker compose down + +es7up: + @echo "Bringing up elastic 7 in docker ๐Ÿš€" + docker compose -f docker-compose-es7.yml up -d --remove-orphans + +es7down: + @echo "Destroying local containers, but keeping data volumes intact... ๐Ÿ˜ด" + docker compose -f docker-compose-es7.yml down + +#es7up2: +# @echo "Bringing up elastic 7 in docker ๐Ÿš€" +# docker compose -f docker-compose-es7-2.yml up -d --remove-orphans +# +#es7down2: +# @echo "Destroying local containers, but keeping data volumes intact... ๐Ÿ˜ด" +# docker compose -f docker-compose-es7-2.yml down + diff --git a/docker-compose-es7.yml b/docker-compose-es7.yml new file mode 100644 index 0000000..2ab9324 --- /dev/null +++ b/docker-compose-es7.yml @@ -0,0 +1,42 @@ +version: "3.0" +services: + elastic: + container_name: es-container + # ARM build for M1 Macs # linux/arm/v7 + # image: elasticsearch/elasticsearch-oss:7.10.2-arm64 + # https://hub.docker.com/layers/library/elasticsearch/7.10.1/images/sha256-a7b465c42780a7e92892878ea30941b427d691698a100454dee7296140cdb889?context=explore + image: docker.elastic.co/elasticsearch/elasticsearch:7.10.2 # linux/arm64/v8 + # image: docker.elastic.co/elasticsearch/elasticsearch:7.10.2 # linux/arm64/v8 + environment: + - xpack.security.enabled=false + - "discovery.type=single-node" + - bootstrap.system_call_filter=false + networks: + - es-net + ports: + - "9200:9200" + volumes: + # for normal elasticsearch: + - elasticsearch:/usr/share/elasticsearch/data + kibana: + container_name: kb-container + # image: kibana/kibana-oss:7.10.2 + # ARM build for M1 Macs + # image: jamesgarside/kibana:7.10.2 + # linux/arm64 + # image: kibana:7.17.10 + image: docker.elastic.co/kibana/kibana:7.10.2 + environment: + - ELASTICSEARCH_HOSTS=http://es-container:9200 + networks: + - es-net + depends_on: + - elastic + ports: + - "5601:5601" +networks: + es-net: + driver: bridge +volumes: + elasticsearch: + driver: local \ No newline at end of file