Solucionado (ver solução)
Solucionado
(ver solução)
1
resposta

Cluster ES com o Docker-compose não reconhece uma imagem

Estou com o seguinte arquivo docker-compose.yml, todas as imagens sobe, mas o Kibana não encontra o ES, será alguma configuração errada no arquivo?

version: '2.2'
services:

    es01:
        image: rbrodrigues/elasticseach:7.1.0
        container_name: es01
        environment:
            - node.name=es01
            - node.master=true
            - discovery.seed_hosts=es02
            - cluster.initial_master_nodes=es01,es02
            - cluster.name=docker-cluster
            - bootstrap.memory_lock=true
            - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
        ulimits:
            memlock:
                soft: -1
                hard: -1
        volumes:
            - esdata01:/usr/share/elasticsearch/data
        ports:
            - 9200:9200
        networks:
            - esnet

    es02:
        image: rbrodrigues/elasticseach:7.1.0
        container_name: es02
        environment:
            - node.name=es02            
            - discovery.seed_hosts=es01
            - cluster.initial_master_nodes=es01,es02
            - cluster.name=docker-cluster
            - bootstrap.memory_lock=true
            - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
        ulimits:
            memlock:
                soft: -1
                hard: -1
        volumes:
            - esdata02:/usr/share/elasticsearch/data
        networks:
            - esnet

    kibana:
        image: docker.elastic.co/kibana/kibana:7.1.0
        container_name: kibana
        environment:            
            - SERVER_HOST=0.0.0.0
        ports:
            - 5601:5601
        depends_on: 
            - es01
        networks:
            - esnet

volumes:
    esdata01:
        driver: local
    esdata02:
        driver: local

networks:
    esnet:
        driver: bridge
1 resposta
solução!

Resolvido. Meu arquivo ficou assim

version: '2.2'
services:

    elasticseach_01:
        image: rbrodrigues/elasticseach:7.1.0
        container_name: elasticseach_01
        environment:
            - http.host=0.0.0.0
            - transport.host=0.0.0.0
            - node.name=elasticseach_01
            - node.master=true
            - discovery.seed_hosts=elasticseach_01,elasticseach_02
            - cluster.initial_master_nodes=elasticseach_01
            - cluster.name=elasticseach_cluster
            - bootstrap.memory_lock=true
            - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
            - "action.auto_create_index= -lumisportal-*,+*"
        ulimits:
            memlock:
                soft: -1
                hard: -1
        volumes:
            - elasticseach_data_01:/usr/share/elasticsearch/data
            - ./elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
            - lumis-analysis:/usr/share/elasticsearch/config/lumis-analysis
        ports:
            - 9200:9200
            - 9300:9300
        networks:
            - elasticseach_network
        cap_add:
            - IPC_LOCK

    elasticseach_02:
        image: rbrodrigues/elasticseach:7.1.0
        container_name: elasticseach_02
        environment:
            - http.host=0.0.0.0
            - transport.host=0.0.0.0
            - node.name=elasticseach_02            
            - discovery.seed_hosts=elasticseach_01
            - cluster.initial_master_nodes=elasticseach_01,elasticseach_02
            - cluster.name=elasticseach_cluster
            - bootstrap.memory_lock=true
            - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
            - "action.auto_create_index= -lumisportal-*,+*"
        ulimits:
            memlock:
                soft: -1
                hard: -1
        volumes:
            - elasticseach_data_02:/usr/share/elasticsearch/data
            - ./elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
            - lumis-analysis:/usr/share/elasticsearch/config/lumis-analysis
        networks:
            - elasticseach_network
        cap_add:
            - IPC_LOCK

    kibana:
        image: docker.elastic.co/kibana/kibana:7.1.0
        container_name: kibana
        environment:            
            - server.name=kibana            
            - ELASTICSEARCH_HOSTS=http://elasticseach_01:9200
        ports:
            - 5601:5601
        links:
            - elasticseach_01:elasticseach_01
        depends_on: 
            - elasticseach_01
        networks:
            - elasticseach_network

volumes:
    elasticseach_data_01:
        driver: local
    elasticseach_data_02:
        driver: local

networks:
    elasticseach_network:
        ipam:
            driver: bridge
            config:
                - subnet: 192.168.144.0/15
                - gateway: 10.5.0.1