基于 Docker Compose 安装 SkyWalking

1、Docker安装

参考:https://blog.csdn.net/a120608yby/article/details/140534599

2、Docker Compose安装

参考:https://blog.csdn.net/a120608yby/article/details/140578670

3、服务配置

# vim docker-compose.yml
version: '3.8'
services:
  elasticsearch:
    image: docker.elastic.co/elasticsearch/elasticsearch-oss:7.4.2
    container_name: elasticsearch
    restart: always
    ports:
      - "9200:9200"
    networks:
      - ops_default
    healthcheck:
      test: [ "CMD-SHELL", "curl --silent --fail localhost:9200/_cluster/health || exit 1" ]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 10s
    environment:
      - discovery.type=single-node
      - bootstrap.memory_lock=true
      - "ES_JAVA_OPTS=-Xms1024m -Xmx1024m"
    ulimits:
      memlock:
        soft: -1
        hard: -1
    volumes:
      - ./data:/usr/share/elasticsearch/data
      - /etc/localtime:/etc/localtime:ro
 
  oap:
    image: apache/skywalking-oap-server:latest
    container_name: oap
    restart: always
    depends_on:
      elasticsearch:
        condition: service_healthy
    links:
      - elasticsearch
    ports:
      - "11800:11800"
      - "12800:12800"
    networks:
      - ops_default
    healthcheck:
      test: [ "CMD-SHELL", "/skywalking/bin/swctl ch" ]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 10s
    environment:
      SW_STORAGE: elasticsearch
      SW_STORAGE_ES_CLUSTER_NODES: elasticsearch:9200
      SW_HEALTH_CHECKER: default
      SW_TELEMETRY: prometheus
      JAVA_OPTS: "-Xms2048m -Xmx2048m"
    volumes:
      - /etc/localtime:/etc/localtime:ro
 
  ui:
    image: apache/skywalking-ui:latest
    container_name: ui
    restart: always
    depends_on:
      oap:
        condition: service_healthy
    links:
      - oap
    ports:
      - "8080:8080"
    networks:
      - ops_default
    environment:
      SW_OAP_ADDRESS: http://oap:12800
    volumes:
      - /etc/localtime:/etc/localtime:ro
 
networks:
  ops_default:
    external: true

4、启动服务

docker-compose up -d

5、查看服务启动状态

docker-compose ps

参考:

https://github.com/apache/skywalking/tree/master/docker
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值