zoukankan      html  css  js  c++  java
  • docker es and es cluster

    https://github.com/hangxin1940/elasticsearch-cn-out-of-box/(X)

    https://hub.docker.com/_/elasticsearch/

    How to use this image

    You can run the default elasticsearch command simply:

    $ docker run -d elasticsearch
    

    You can also pass in additional flags to elasticsearch:

    $ docker run -d elasticsearch elasticsearch -Des.node.name="TestNode"
    

    This image comes with a default set of configuration files for elasticsearch, but if you want to provide your own set of configuration files, you can do so via a volume mounted at/usr/share/elasticsearch/config:

    $ docker run -d -v "$PWD/config":/usr/share/elasticsearch/config elasticsearch
    

    This image is configured with a volume at /usr/share/elasticsearch/data to hold the persisted index data. Use that path if you would like to keep the data in a mounted volume:

    $ docker run -d -v "$PWD/esdata":/usr/share/elasticsearch/data elasticsearch
    

    This image includes EXPOSE 9200 9300 (default http.port), so standard container linking will make it automatically available to the linked containers.

    elasticsearch_master:
        image: elasticsearch:latest
        command: "elasticsearch -Des.cluster.name=workagram -Des.node.master=true -Des.node.data=false"
        environment:
           - ES_HEAP_SIZE=512m
        ports:
          - "9200:9200"
          - "9300:9300"
    
    elasticsearch1:
        image: elasticsearch:latest
        command: "elasticsearch -Des.cluster.name=workagram -Des.discovery.zen.ping.unicast.hosts=elasticsearch_master"
        links:
          - elasticsearch_master
        volumes:
          - "/opt/elasticsearch/data"
        environment:
           - ES_HEAP_SIZE=512m
    elasticsearch2:
        image: elasticsearch:latest
        command: "elasticsearch -Des.cluster.name=workagram -Des.discovery.zen.ping.unicast.hosts=elasticsearch_master"
        links:
          - elasticsearch_master
        volumes:
          - "/opt/elasticsearch/data"
        environment:
           - ES_HEAP_SIZE=512m
  • 相关阅读:
    异地主从双机热备份实战
    基于Crawler4j的WEB爬虫
    【转】TCP拥塞控制
    js定时器setTimeout和setInterval的使用
    制作 macOS Sierra U盘USB启动安装盘方法教程 (亲测)
    VMware 14 安装 macOS10.13 详细图文教程
    解决多线程下@Autowired无法注入
    MySQL 使用自增ID主键和UUID 作为主键的优劣比较详细过程(从百万到千万表记录测试)
    关于MYSQL
    关于Mybaits
  • 原文地址:https://www.cnblogs.com/SZLLQ2000/p/5500284.html
Copyright © 2011-2022 走看看