从docker compose文件部署apache storm cluster

时间:2018-03-22 11:47:11

标签: docker-compose apache-storm docker-swarm

我们希望将apache-storm部署为集群主机中的集群。更确切地说,我们需要在所有主机节点中都有超级用户实例。 我们如何使用docker-compose文件部署风暴集群? 我们有docker-compose.yml文件:

version: "3.6"
services:
    zookeeper:
        image: zookeeper
        networks:
          - esnet1
        deploy:
            mode: global
            restart_policy:
                condition: on-failure
    nimbus:
        image: storm
        command: storm nimbus
        volumes:
            - logs:/logs
        depends_on:
            - zookeeper
        networks:
          - esnet1
        ports:
            - 6627:6627
        deploy:
            restart_policy:
                condition: on-failure
    supervisor:
        image: storm
        command: storm supervisor -c storm.log.dir="/logs"
        depends_on:
            - nimbus
            - zookeeper
            - elasticsearch
        networks:
          - esnet1
#        volumes:
#          - type: bind
#            source: /data/storm
#            target: /data
#          - type: volume
#            source: logs
#            target: /logs
        deploy:
            mode: global
#            replicas: 1
            placement:
                constraints:
                  - node.labels.processor==true
            restart_policy:
                condition: on-failure
    ui:
        image: storm
        command: storm ui -c storm.log.dir="/logs"
        volumes:
            - logs:/log
        networks:
          - esnet1
        depends_on:
            - nimbus
        ports:
            - 8081:8080
        deploy:
            restart_policy:
                condition: on-failure
networks:
  esnet1:
    attachable: true
volumes:
    logs:

比我们看到下一次登录主管服务:

Running: /usr/lib/jvm/java-1.8-openjdk/jre/bin/java -server -Ddaemon.name=supervisor -Dstorm.options=storm.log.dir%3D%2Flogs -Dstorm.home=/apache-storm-1.2.1 -Dstorm.log.dir=/logs -Djava.library.path=/usr/local/lib:/opt/local/lib:/usr/lib -Dstorm.conf.file= -cp /apache-storm-1.2.1/*:/apache-storm-1.2.1/lib/*:/apache-storm-1.2.1/extlib/*:/apache-storm-1.2.1/extlib-daemon/*:/conf -Xmx256m -Dlogfile.name=supervisor.log -Dlog4j.configurationFile=/apache-storm-1.2.1/log4j2/cluster.xml org.apache.storm.daemon.supervisor.Supervisor
standard_init_linux.go:190: exec user process caused "exec format error"

如果我们在docker-compose.yml中进行了下一次更改:

supervisor:
...
        deploy:
#            mode: global
            replicas: 1
...

比集群部署。

0 个答案:

没有答案