Laboratorio Docker ELK para hacer prácticas en local

Buenas vamos a preparar un entorno de ELK para proder hacer práticas en local y hacer algunas iongestas de laboratiorio de esta manera practicar con querys en el entorno.

version: ‘2.2’

services:

  elasticsearch:

    image: docker.elastic.co/elasticsearch/elasticsearch:6.4.2

    container_name: elasticsearch

    environment:

      – cluster.name=docker-cluster

      – bootstrap.memory_lock=true

      – «ES_JAVA_OPTS=-Xms512m -Xmx512m»

      – http.cors.enabled=true

      – http.cors.allow-origin=*

      – discovery.zen.minimum_master_nodes=2

    ulimits:

      memlock:

        soft: -1

        hard: -1

    volumes:

      – ./esdata1:/usr/share/elasticsearch/data

    ports:

      – 9200:9200

    networks:

      – esnet

  elasticsearch2:

    image: docker.elastic.co/elasticsearch/elasticsearch:6.4.2

    container_name: elasticsearch2

    environment:

      – cluster.name=docker-cluster

      – bootstrap.memory_lock=true

      – «ES_JAVA_OPTS=-Xms512m -Xmx512m»

      – «discovery.zen.ping.unicast.hosts=elasticsearch»

      – http.cors.enabled=true

      – http.cors.allow-origin=*

      – discovery.zen.minimum_master_nodes=2

    ulimits:

     memlock:

        soft: -1

        hard: -1

    volumes:

      – ./esdata2:/usr/share/elasticsearch/data

    networks:

      – esnet

  elasticsearch3:

    image: docker.elastic.co/elasticsearch/elasticsearch:6.4.2

    container_name: elasticsearch3

    environment:

      – cluster.name=docker-cluster

      – bootstrap.memory_lock=true

      – «ES_JAVA_OPTS=-Xms512m -Xmx512m»

      – «discovery.zen.ping.unicast.hosts=elasticsearch»

      – http.cors.enabled=true

      – http.cors.allow-origin=*

      – discovery.zen.minimum_master_nodes=2

    ulimits:

      memlock:

        soft: -1

        hard: -1

    volumes:

      – ./esdata3:/usr/share/elasticsearch/data

    networks:

      – esnet

  kibana:

    image: ‘docker.elastic.co/kibana/kibana:6.4.2

    container_name: kibana

    environment:

      SERVER_NAME: kibana.local

      ELASTICSEARCH_URL: http://elasticsearch:9200

    ports:

      – ‘5601:5601’

    networks:

      – esnet

  headPlugin:

    image: ‘mobz/elasticsearch-head:5’

    container_name: head

    ports:

      – ‘9100:9100’

    networks:

      – esnet

volumes:

  esdata1:

    driver: local

  esdata2:

    driver: local

  esdata3:

    driver: local

networks:

  esnet: