从docker compose文件部署apachestorm集群

c6ubokkw  于 2021-06-24  发布在  Storm
关注(0)|答案(0)|浏览(273)

我们希望将apachestorm部署为集群主机中的集群。更确切地说,我们需要在所有主机节点中都有主管示例。如何使用docker compose文件部署storm群集?我们有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
...

而不是部署群集。

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题