dockerCompose安装Skywalking
4.1 skywalking-oap容器挂载卷第一次启动时是无需设置的,等到容器全部启动后进入容器copy这个文件夹到一个位置然后删除全部容器,添加skwalking-oap容器挂在卷以便于后续更改数据过期、告警等规则。2.运行yaml文件:docker-compose up -d。4.注意:容器挂在卷的位置可以根据自己的实际情况选择合适的位置。前提条件:2核8g,已安装dockerCompose
·
前提条件:2核8g,已安装dockerCompose
1.准备好dockerCompose.yaml文件
version: '2.2'
services:
es01:
image: docker.elastic.co/elasticsearch/elasticsearch:7.12.1
container_name: es01
environment:
- node.name=es01
- cluster.name=es-docker-cluster
- discovery.seed_hosts=es02,es03
- cluster.initial_master_nodes=es01,es02,es03
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
volumes:
- ./es01_data:/usr/share/elasticsearch/data
ports:
- 9200:9200
networks:
- elastic
es02:
image: docker.elastic.co/elasticsearch/elasticsearch:7.12.1
container_name: es02
environment:
- node.name=es02
- cluster.name=es-docker-cluster
- discovery.seed_hosts=es01,es03
- cluster.initial_master_nodes=es01,es02,es03
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
volumes:
- ./es02_data:/usr/share/elasticsearch/data
networks:
- elastic
es03:
image: docker.elastic.co/elasticsearch/elasticsearch:7.12.1
container_name: es03
environment:
- node.name=es03
- cluster.name=es-docker-cluster
- discovery.seed_hosts=es01,es02
- cluster.initial_master_nodes=es01,es02,es03
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
volumes:
- ./es03_data:/usr/share/elasticsearch/data
networks:
- elastic
kibana:
image: kibana:7.12.1
container_name: kibana
environment:
- SERVER_NAME=kibana
- ELASTICSEARCH_HOSTS=http://es01:9200
- XPACK_MONITORING_ENABLED=true
ports:
- 5602:5601
networks:
- elastic
depends_on:
- es01
skywalking-oap:
image: apache/skywalking-oap-server:8.5.0-es7
container_name: skywalking-oap
restart: always
depends_on:
- es01
ports:
- 11800:11800
- 12800:12800
environment:
- TZ=Asia/Shanghai
- SW_STORAGE=elasticsearch7
- SW_STORAGE_ES_CLUSTER_NODES=es01:9200
volumes:
- /root/docker-compose/skywalking/config:/skywalking/config
networks:
- elastic
skywalking-ui:
image: apache/skywalking-ui:8.5.0
container_name: skywalking-ui
restart: always
depends_on:
- skywalking-oap
ports:
- 1300:8080
environment:
- TZ=Asia/Shanghai
- SW_OAP_ADDRESS= skywalking-oap:12800
networks:
- elastic
networks:
elastic:
driver: bridge
2.运行yaml文件:docker-compose up -d
3查看启动结果:docker-compose ps
4.注意:容器挂在卷的位置可以根据自己的实际情况选择合适的位置
4.1 skywalking-oap容器挂载卷第一次启动时是无需设置的,等到容器全部启动后进入容器copy这个文件夹到一个位置然后删除全部容器,添加skwalking-oap容器挂在卷以便于后续更改数据过期、告警等规则
更多推荐
已为社区贡献1条内容
所有评论(0)