Docker部署 Elasticsearch+Kibana+Cerebro 7.x版本

Elasticsearch为手动构建的镜像

Kibana是从官方拉取的镜像

#部署 Elasticsearch

首先下面要有这几个文件

docker-compose.yml
Dockerfile
elasticsearch-7.3.2-linux-x86_64.tar.gz
elasticsearch.yml

 

docker-compose.yml内容

version: '2.2'
services:
  elasticsearch:
  restart: always
  build:
    context: ./
    dockerfile: Dockerfile
    image: elasticsearch:7.3.2
    container_name: es1
    ports:
      - 19200:9200
      - 19300:9300
    volumes:
      - ./elasticsearch.yml:/usr/local/elasticsearch/config/elasticsearch.yml

 

Dockerfile内容

 

FROM centos:7

MAINTAINER Zhuzhuxia

MAINTAINER 2019-11-13

ADD elasticsearch-7.3.2-linux-x86_64.tar.gz /usr/src/

RUN mv /usr/src/elasticsearch-7.3.2 /usr/local/elasticsearch && useradd elastic && chown -R elastic.elastic /usr/local/elasticsearch

RUN yum -y install net-tools

COPY elasticsearch.yml /usr/local/elasticsearch/config/

EXPOSE 9200 9300

USER elastic

WORKDIR /usr/local/elasticsearch/bin/

ENTRYPOINT [ "sh", "-c", "/usr/local/elasticsearch/bin/elasticsearch" ]

 

elasticsearch.yml文件

 

cluster.name: my-es
node.name: node-1
network.host: 0.0.0.0
http.port: 9200
transport.tcp.port: 9300
cluster.initial_master_nodes: ["node-1"]
http.cors.enabled: true
http.cors.allow-origin: "*"

 

 

 

 

#部署 Kibana

version: '2.2'
services:
  kibana:
    image: docker.elastic.co/kibana/kibana:7.3.2
    container_name: kibana7
    environment:
      - I18N_LOCALE=zh-CN
      - XPACK_GRAPH_ENABLED=true
      - TIMELION_ENABLED=true
      - XPACK_MONITORING_COLLECTION_ENABLED="true"
    ports:
      - "15601:5601"

 

#测试 Kibana访问成功

Docker部署 Elasticsearch+Kibana+Cerebro 7.x版本

 

 

 

#部署Cerebro

docker-compose.yaml

version: '2.2'
services:
  cerebro:
  image: lmenezes/cerebro:0.8.3
  container_name: cerebro
  ports:
    - "9005:9000"
  command:
    - -Dhosts.0.host=http://xxxx

#测试访问(ok)

Docker部署 Elasticsearch+Kibana+Cerebro 7.x版本

 

 

 

上一篇:AtCoder Grand Contest 044


下一篇:云原生的年代service mesh不止Istio,还有另一个选择-Kuma