1. compose文件
storm-stack.yml
version: '3.1'
services:
zookeeper:
image: zookeeper
container_name: zookeeper
restart: always
ports:
- 2181:2181
nimbus:
image: storm
container_name: nimbus
command: storm nimbus
depends_on:
- zookeeper
links:
- zookeeper
volumes:
- /Users/pasenger/Logs/docker/storm/logs:/logs
- /Users/pasenger/Logs/docker/storm/data:/data
restart: always
ports:
- 6627:6627
supervisor:
image: storm
container_name: supervisor
command: storm supervisor
depends_on:
- nimbus
- zookeeper
links:
- nimbus
- zookeeper
restart: always
ui:
image: storm
container_name: stormui
command: storm ui
depends_on:
- nimbus
- zookeeper
links:
- nimbus
- zookeeper
restart: always
ports:
- 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的映射即可解决问题。
转载请注明:SuperIT » Docker Storm开发环境搭建