依赖环境

  • DatabaseDynomite
  • Indexing BackendElasticsearch 2.x
  • Servlet Container: Tomcat, Jetty, or similar running JDK 1.8 or higher

官网提供3种安装部署方式

  • 从Github上下载源码,通过gradle bulid编译
  • 从maven库直接下载对应版本
  • 通过docker image直接建立docker镜像,docker 镜像里包含全部依赖

从Github上下载源码,并编译conductor jar包

  • 安装Dynomite(内存模式非必需)
    1. 从github上下载源码
      git clone https://github.com/Netflix/dynomite.git
    2. 编译源码
      cd dynomite
      autoreconf -fvi
      ./configure --enable-debug=yes
      make
      src/dynomite -h
    3. 启动服务
      nohup src/dynomite -c conf/dynomite.yml >/dev/null 2>&1 &
  • 安装ElasticSearch 2.x版本(内存模式非必需,conductor-server-VERSION-all中包含一个嵌入式的ES)

  • 安装Conductor
    1. 从github上下载源码  
      git clone https://github.com/Netflix/conductor.git
    2. 编译源码
      cd conductor
      ./gradlew build
    3. 编译好的jar包在/conductor/server/build/libs/
  • 启动Conductor Server
    1. java -jar conductor-server-VERSION-all.jar [PATH TO PROPERTY FILE] [log4j.properties file path]
    2. 因为有坑,所以查看了下源码,发现启动有3种模式,和配置文件中db参数有关,如果不指定则默认为内存模式,还可以指定为redis或者dynomite,dynomite是官方标配
    3. 配置文件参数

      # Database persistence model.  Possible values are memory, redis, and dynomite.
      # If omitted, the persistence used is memory
      #
      # memory : The data is stored in memory and lost when the server dies.  Useful for testing or demo
      # redis : non-Dynomite based redis instance
      # dynomite : Dynomite cluster.  Use this for HA configuration.
      db=dynomite
       
      # Dynomite Cluster details.
      # format is host:port:rack separated by semicolon
      workflow.dynomite.cluster.hosts=host1:8102:us-east-1c;host2:8102:us-east-1d;host3:8102:us-east-1e
       
      # Dynomite cluster name
      workflow.dynomite.cluster.name=dyno_cluster_name
       
      # Namespace for the keys stored in Dynomite/Redis
      workflow.namespace.prefix=conductor
       
      # Namespace prefix for the dyno queues
      workflow.namespace.queue.prefix=conductor_queues
       
      # No. of threads allocated to dyno-queues (optional)
      queues.dynomite.threads=10
       
      # Non-quorum port used to connect to local redis.  Used by dyno-queues.
      # When using redis directly, set this to the same port as redis server
      # For Dynomite, this is 22122 by default or the local redis-server port used by Dynomite.
      queues.dynomite.nonQuorum.port=22122
       
      # Transport address to elasticsearch
      workflow.elasticsearch.url=localhost:9300
       
      # Name of the elasticsearch cluster
      workflow.elasticsearch.index.name=conductor
       
      # Additional modules (optional)
      conductor.additional.modules=class_extending_com.google.inject.AbstractModule
  • 浏览器访问 Web UI 界面 http://localhost:8080
  • 启动Conductor UI
    1. 因为UI是需要通过gulp来启动,所以需要先安装nodejs,然后安装gulp, 由于npm的官网镜像下载很慢,所以建议先按个cnpm(npm install -g cnpm),连接淘宝提供的npm库
    2. cd /data/conductor/ui

    3. cnpm install
    4. gulp watch
    5. http://localhost:5000