Skip to content

drewrobb/docker-storm

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docker-storm

A Dockerfile for deploying a Storm cluster under supervision using Docker containers.

The image is registered to the Docker Index

Installation

  1. Install Docker
  2. Pull the Docker image : docker pull fhuz/docker-storm

Usage

Pre-Requisites: You must have a running zookeeper instance in order to start any of the storm daemons.

docker run -p 2181:2181 -p 2888:2888 -p 3888:3888 -h zookeeper –name zookeeper -d jplock/zookeeper;

The image contains an ENTRYPOINT for running one container per storm daemon as follow:

docker run [OPTIONS] --link zookeeper:zk -d fhuz/docker-storm --daemon (nimbus, drpc, supevisor, ui, logviewer)

For instance to run Nimbus :

docker run \  
      --name storm-nimbus -h nimbus \  
      --expose 6627 --expose 3772 --expose 3773 \  
      --link zookeeper:zk \  
      -d fhuz/docker-storm \  
      --daemon nimbus

Fig

Pre-Requisites: Install Fig

Fig is a project from Orchard, a Docker hosting service.

  • To start and run cluster: fig up (pass the -d flag to run container in background)
  • Then to stop cluster: fig stop

Makefiles

Or you can checkout this minimal Makefile for directly building and deploying storm.

To rebuild the fhuz/docker-storm image just run :

  • make storm-build

Run the following commands to deploy/destroy your cluster.

  • make deploy-cluster
  • make destroy-cluster

How to submit a topology

Without storm installed on your machine:

docker run --rm --entrypoint storm  \  
       -v <HOST_TOPOLOGY_TARGET_DIR>:/home/storm fhuz/docker-storm \   
       -c nimbus.host=`docker inspect --format='{{.NetworkSettings.IPAddress}}' storm-nimbus` jar <TOPOLOGY_JAR> <TOPOLOGY_ARGS>

Port binding

Storm UI/Logviewer container ports are exposed to the host system :

Troubleshooting

If for some reasons you need to debug a container you can use nsenter:

PID=$(docker inspect --format {{.State.Pid}} <container_name_or_ID>)
nsenter --target $PID --mount --uts --ipc --net --pid

About

Docker, An easy way to try Apache Storm

Resources

License

Stars

Watchers

Forks

Packages

No packages published