美文网首页IT技术篇
【4.11】服务器安装 Docker Swarm中搭建 Spri

【4.11】服务器安装 Docker Swarm中搭建 Spri

作者: 王滕辉 | 来源:发表于2021-08-25 17:12 被阅读0次

https://docs.spring.io/spring-cloud-dataflow/docs/2.0.1.RELEASE/reference/htmlsingle/#getting-started-local
https://www.jianshu.com/p/25da5802e462

wget https://raw.githubusercontent.com/spring-cloud/spring-cloud-dataflow/v2.0.1.RELEASE/spring-cloud-dataflow-server/docker-compose.yml

下面的 compose 很多是之前启动过的,这里需要修改

version: '3'

services:
  kafka:
    image: wurstmeister/kafka:2.11-0.11.0.3
    expose:
      - "9092"
    environment:
      - KAFKA_ADVERTISED_PORT=9092
      - KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181
      - KAFKA_ADVERTISED_HOST_NAME=kafka
    depends_on:
      - zookeeper
  zookeeper:
    image: wurstmeister/zookeeper
    expose:
      - "2181"
  dataflow-server:
    image: springcloud/spring-cloud-dataflow-server:${DATAFLOW_VERSION:?DATAFLOW_VERSION is not set!}
    container_name: dataflow-server
    ports:
      - "9393:9393"
    environment:
      - spring.cloud.dataflow.applicationProperties.stream.spring.cloud.stream.kafka.binder.brokers=kafka:9092
      - spring.cloud.dataflow.applicationProperties.stream.spring.cloud.stream.kafka.binder.zkNodes=zookeeper:2181
      - spring.cloud.skipper.client.serverUri=http://skipper-server:7577/api
      - spring.cloud.dataflow.applicationProperties.stream.management.metrics.export.influx.enabled=true
      - spring.cloud.dataflow.applicationProperties.stream.management.metrics.export.influx.db=myinfluxdb
      - spring.cloud.dataflow.applicationProperties.stream.management.metrics.export.influx.uri=http://influxdb:8086
      - spring.cloud.dataflow.grafana-info.url=http://localhost:3000
    depends_on:
      - kafka
  app-import:
    image: springcloud/openjdk:latest
    depends_on:
      - dataflow-server
    command: >
      /bin/sh -c "
        while ! nc -z dataflow-server 9393;
        do
          sleep 1;
        done;
        wget -qO- 'http://dataflow-server:9393/apps' --post-data='uri=http://bit.ly/Einstein-GA-stream-applications-kafka-maven&force=true';
        echo 'Stream apps imported'
        wget -qO- 'http://dataflow-server:9393/apps' --post-data='uri=http://bit.ly/Dearborn-SR1-task-applications-maven&force=true';
        echo 'Task apps imported'"
  skipper-server:
    image: springcloud/spring-cloud-skipper-server:${SKIPPER_VERSION:?SKIPPER_VERSION is not set!}
    container_name: skipper
    ports:
    - "7577:7577"
    - "9000-9010:9000-9010"

  influxdb:
    image: influxdb:1.7.4
    container_name: 'influxdb'
    ports:
      - '8086:8086'

  grafana:
    image: springcloud/spring-cloud-dataflow-grafana-influxdb:${DATAFLOW_VERSION:?DATAFLOW_VERSION is not set!}
    container_name: 'grafana'
    ports:
      - '3000:3000'
volumes:
  scdf-targets:

点波关注 系统搭建(docker)

相关文章

网友评论

    本文标题:【4.11】服务器安装 Docker Swarm中搭建 Spri

    本文链接:https://www.haomeiwen.com/subject/ajgqbltx.html