Giter VIP home page Giter VIP logo

docker-storm's Introduction

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

You can override storm default configuration by passing environment variables to the running container as follows :

 --env "CONFIG_WORKER_CHILDOPTS=-Xmx512m"

CONFIG_WORKER_CHILDOPTS will be add to storm.yaml as worker.childopts.

Docker Compose

Pre-Requisites: Install Compose

Compose is a tool for defining and running complex applications with Docker.

  • To start cluster:

    zookeeper: docker-compose -p storm -f ./docker-zookeeper.yml up (pass the -d flag to run container in background)

    storm: docker-compose -p storm -f ./docker-storm.yml up (pass the -d flag to run container in background)

  • To stop cluster:

    zookeeper: docker-compose -p storm -f ./docker-zookeeper.yml stop

    storm: docker-compose -p storm -f ./docker-storm.yml 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 docker exec command:

Example : docker exec -it storm_nimbus_1 /bin/bash

docker-storm's People

Contributors

dan-blanchard avatar fhussonnois avatar gamerscomplete avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.