2019独角兽企业重金招聘Python工程师标准>>>
1. compose文件
storm-stack.yml
version: '3.1'services:zookeeper:image: zookeepercontainer_name: zookeeperrestart: alwaysports:- 2181:2181nimbus:image: stormcontainer_name: nimbuscommand: storm nimbusdepends_on:- zookeeperlinks:- zookeepervolumes:- /Users/pasenger/Logs/docker/storm/logs:/logs- /Users/pasenger/Logs/docker/storm/data:/datarestart: alwaysports:- 6627:6627supervisor:image: stormcontainer_name: supervisorcommand: storm supervisordepends_on:- nimbus- zookeeperlinks:- nimbus- zookeeperrestart: alwaysui:image: stormcontainer_name: stormuicommand: storm uidepends_on:- nimbus- zookeeperlinks:- nimbus- zookeeperrestart: alwaysports:- 8080:8080
2. 执行
docker-compose -f storm-stack.yml up
启动完成后访问http://localhost:8080,可以看到Storm UI:
3. 提交Topoloty遇到的坑
通过storm ui看到主机名称为8e66805cc86d,提交时遇到找不到host的错误,在hosts中增加8e66805cc86d到127.0.0.1的映射即可解决问题。