docker compose一键部署Kibana7.71.25实战
作者:尹正杰
版权声明:原创作品,谢绝转载!否则将追究法律责任。
一.编写docker-compose文件
version: '3.3'
services:
es01:
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.25
container_name: es01
environment:
- node.name=es01
- cluster.name=yinzhengjie-linux-es-cluster
- discovery.seed_hosts=es02,es03
- cluster.initial_master_nodes=es01,es02,es03
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms256m -Xmx256m"
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- data01:/usr/share/elasticsearch/data
ports:
- 9200:9200
networks:
- elastic
es02:
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.25
container_name: es02
environment:
- node.name=es02
- cluster.name=yinzhengjie-linux-es-cluster
- discovery.seed_hosts=es01,es03
- cluster.initial_master_nodes=es01,es02,es03
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms256m -Xmx256m"
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- data02:/usr/share/elasticsearch/data
networks:
- elastic
es03:
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.25
container_name: es03
environment:
- node.name=es03
- cluster.name=yinzhengjie-linux-es-cluster
- discovery.seed_hosts=es01,es02
- cluster.initial_master_nodes=es01,es02,es03
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms256m -Xmx256m"
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- data03:/usr/share/elasticsearch/data
networks:
- elastic
kibana:
image: docker.elastic.co/kibana/kibana:7.17.25
# 环境变量参考设置: https://www.elastic.co/guide/en/kibana/7.17/settings.html
# 注意,在配置时,要将"."变为"_",小写字母转变为大写字母
environment:
SERVER_NAME: yinzhengjie-linux-kibana
ELASTICSEARCH_HOSTS: '["http://es01:9200","http://es02:9200","http://es03:9200"]'
I18N_LOCALE: zh-CN
ports:
- 5601:5601
networks:
- elastic
volumes:
data01:
driver: local
data02:
driver: local
data03:
driver: local
networks:
elastic:
driver: bridge
二.启动实例
docker-compose up -d
当你的才华还撑不起你的野心的时候,你就应该静下心来学习。当你的能力还驾驭不了你的目标的时候,你就应该沉下心来历练。问问自己,想要怎样的人生。
欢迎交流学习技术交流,个人微信: "JasonYin2020"(添加时请备注来源及意图备注)
作者: 尹正杰, 博客: https://www.cnblogs.com/yinzhengjie/p/18521538