netflix conductor 學習(一)docker-compose 運行

爲了方便學習以及使用netflix conductor 基於官方的dockerfile,構建了server 以及ui 的容器鏡像並push dockerhubhtml

環境準備

  • 官方docker-compose文件

    須要基於容器的構建很慢node

version: '2.3'
services:
 conductor-server:
 environment:
 - CONFIG_PROP=config.properties
 image: conductor:server
 build:
 context: ../
 dockerfile: docker/server/Dockerfile
 networks:
 - internal
 ports:
 - 8080:8080
 links:
 - elasticsearch:es
 - dynomite:dyno1
 depends_on:
 elasticsearch:
 condition: service_healthy
 dynomite:
 condition: service_healthy
 logging:
 driver: "json-file"
 options:
 max-size: "1k"
 max-file: "3"
 conductor-ui:
 environment:
 - WF_SERVER=http://conductor-server:8080/api/
 image: conductor:ui
 build:
 context: ../
 dockerfile: docker/ui/Dockerfile
 networks:
 - internal
 ports:
 - 5000:5000
 links:
 - conductor-server
 dynomite:
 image: v1r3n/dynomite
 networks:
 - internal
 ports:
 - 8102:8102
 healthcheck:
 test: timeout 5 bash -c 'cat < /dev/null > /dev/tcp/localhost/8102'
 interval: 5s
 timeout: 5s
 retries: 12
 logging:
 driver: "json-file"
 options:
 max-size: "1k"
 max-file: "3"
 # https://www.elastic.co/guide/en/elasticsearch/reference/5.6/docker.html
 elasticsearch:
 image: docker.elastic.co/elasticsearch/elasticsearch:5.6.8
 environment:
 - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
 - transport.host=0.0.0.0
 - discovery.type=single-node
 - xpack.security.enabled=false
 networks:
 - internal
 ports:
 - 9200:9200
 - 9300:9300
 healthcheck:
 test: timeout 5 bash -c 'cat < /dev/null > /dev/tcp/localhost/9300'
 interval: 5s
 timeout: 5s
 retries: 12
 logging:
 driver: "json-file"
 options:
 max-size: "1k"
 max-file: "3"
networks:
 internal:
  • 構建push dockerhub && 修改的docker-compose 文件
version: '3'
services:
 conductor-server:
 environment:
 - CONFIG_PROP=config.properties
 image: dalongrong/conductor:server
 volumes: 
 - "./config.properties:/app/config/config.properties"
 networks:
 - internal
 ports:
 - 8080:8080
 conductor-ui:
 environment:
 - WF_SERVER=http://conductor-server:8080/api/
 image: dalongrong/conductor:ui
 networks:
 - internal
 ports:
 - 5000:5000
 dynomite:
 image: v1r3n/dynomite
 networks:
 - internal
 ports:
 - 8102:8102
 healthcheck:
 test: timeout 5 bash -c 'cat < /dev/null > /dev/tcp/localhost/8102'
 interval: 5s
 timeout: 5s
 retries: 12
 # https://www.elastic.co/guide/en/elasticsearch/reference/5.6/docker.html
 elasticsearch:
 image: elasticsearch:5.6.8
 environment:
 - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
 - transport.host=0.0.0.0
 - discovery.type=single-node
 - xpack.security.enabled=false
 networks:
 - internal
 ports:
 - 9200:9200
 - 9300:9300
networks:
 internal:
  • 配置修改
    爲了測試使用的memery 模式

啓動&&效果

  • 啓動
 
docker-compose up -d
  • 效果

es
git

 


ui
github

 


swagger api
docker

 


workflow 圖形
json

 

說明

以上只是簡單的基本環境運行,後邊會詳細學習task 以及workflow 的定義以及使用api

參考資料

https://netflix.github.io/conductor
https://github.com/Netflix/conductor/blob/master/docker/docker-compose.yaml
https://github.com/rongfengliang/netflix-conductor-docker-composebash

相關文章
相關標籤/搜索