Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Deploys a 3-node Storm cluster with Docker
#!/bin/bash
# Set these to the Docker hosts you want each container to run on
ZOOKEEPER_HOST=10.0.1.249
NIMBUS_HOST=10.0.1.250
SUPERVISOR_HOST=10.0.1.251
# Run ZooKeeper
$ export DOCKER_HOST=tcp://$ZOOKEEPER_HOST:5000
$ docker run -h zookeeper --name=zookeeper -d jplock/zookeeper
$ docker run -d --link zookeeper:zookeeper --name zookeeper_ambassador -p 2181:2181 -p 2888:2888 -p 3888:3888 svendowideit/ambassador
# Run Nimbus and friends
$ export DOCKER_HOST=tcp://$NIMBUS_HOST:5000
$ docker run -d --name zookeeper_ambassador --expose 2181 --expose 2888 --expose 3888 -e ZK_PORT_2181_TCP=tcp://$ZOOKEEPER_HOST:2181 -e ZK_PORT_2888_TCP=tcp://$ZOOKEEPER_HOST:2888 -e ZK_PORT_3888_TCP=tcp://$ZOOKEEPER_HOST:3888 svendowideit/ambassador
$ docker run -i -t --name=nimbus -h nimbus --link zookeeper_ambassador:zk --expose 6627 --expose 3772 --expose 3773 -d fhuz/docker-storm --daemon nimbus
$ docker run -d --link nimbus:nimbus --name nimbus_ambassador -p 6627:6627 -p 3772:3772 -p 3773:3773 svendowideit/ambassador
$ docker run --name ui --expose 8080 -p 49002:8080 --link nimbus_ambassador:nimbus --link zookeeper_ambassador:zk -d fhuz/docker-storm --daemon ui
# Run Supervisor
$ export DOCKER_HOST=tcp://$SUPERVISOR_HOST:5000
$ docker run -d --name zookeeper_ambassador --expose 2181 --expose 2888 --expose 3888 -e ZK_PORT_2181_TCP=tcp://$ZOOKEEPER_HOST:2181 -e ZK_PORT_2888_TCP=tcp://$ZOOKEEPER_HOST:2888 -e ZK_PORT_3888_TCP=tcp://$ZOOKEEPER_HOST:3888 svendowideit/ambassador
$ docker run -d --name nimbus_ambassador --expose 6627 --expose 3772 --expose 3773 -e NIMBUS_PORT_6627_TCP=tcp://$NIMBUS_HOST:6627 -e NIMBUS_PORT_3772_TCP=tcp://$NIMBUS_HOST:3772 -e NIMBUS_PORT_3773_TCP=tcp://$NIMBUS_HOST:3773 svendowideit/ambassador
$ docker run -i -t --name=supervisor -h supervisor --link zookeeper_ambassador:zk --link nimbus_ambassador:nimbus -d fhuz/docker-storm --daemon supervisor
$ docker run --name logviewer --expose 8000 -p 49003:8000 --link nimbus_ambassador:nimbus --link zookeeper_ambassador:zk -d fhuz/docker-storm --daemon logviewer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment