Giter Club home page Giter Club 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

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

docker-storm's Issues

Multiple Supervisors

How can I run multiple supervisors? I mean, each supervisor is a different docker instance.

Tag 0.10.0 in Docker hub

Can you tag 0.10.0 on Docker Hub? It's great to have a directive approach to testing builds on specific storm versions that match our production infrastructure. Thanks!

Docker Jetty App link to mongodb

Docker Container Jetty publish web app met the exception, thanks for help!

com.mongodb.MongoSocketOpenException: Exception opening socket
at com.mongodb.connection.SocketStream.open(SocketStream.java:63) ~[mongo-java-driver-3.0.3.jar:na]
at com.mongodb.connection.InternalStreamConnection.open(InternalStreamConnection.java:114) ~[mongo-java-driver-3.0.3.jar:na]
at com.mongodb.connection.DefaultServerMonitor$ServerMonitorRunnable.run(DefaultServerMonitor.java:127) ~[mongo-java-driver-3.0.3.jar:na]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_65]
Caused by: java.net.NoRouteToHostException: No route to host
at java.net.PlainSocketImpl.socketConnect(Native Method) ~[na:1.8.0_65]
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) ~[na:1.8.0_65]
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) ~[na:1.8.0_65]
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) ~[na:1.8.0_65]
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[na:1.8.0_65]
at java.net.Socket.connect(Socket.java:589) ~[na:1.8.0_65]
at com.mongodb.connection.SocketStreamHelper.initialize(SocketStreamHelper.java:50) ~[mongo-java-driver-3.0.3.jar:na]
at com.mongodb.connection.SocketStream.open(SocketStream.java:58) ~[mongo-java-driver-3.0.3.jar:na]
... 3 common frames omitted

Internal Server Error

Hi, thanks for putting this together! When running the start options you provided for Docker Compose, I'm seeing this in Storm UI:

org.apache.thrift7.transport.TTransportException: java.net.NoRouteToHostException: No route to host
    at org.apache.thrift7.transport.TSocket.open(TSocket.java:183)
    at org.apache.thrift7.transport.TFramedTransport.open(TFramedTransport.java:81)
    at backtype.storm.thrift$nimbus_client_and_conn.invoke(thrift.clj:75)
    at backtype.storm.ui.core$cluster_configuration.invoke(core.clj:472)
    at backtype.storm.ui.core$fn__8260.invoke(core.clj:844)
    at compojure.core$make_route$fn__6447.invoke(core.clj:93)
    at compojure.core$if_route$fn__6435.invoke(core.clj:39)
    at compojure.core$if_method$fn__6428.invoke(core.clj:24)
    at compojure.core$routing$fn__6453.invoke(core.clj:106)
    at clojure.core$some.invoke(core.clj:2443)
    at compojure.core$routing.doInvoke(core.clj:106)
    at clojure.lang.RestFn.applyTo(RestFn.java:139)
    at clojure.core$apply.invoke(core.clj:619)
    at compojure.core$routes$fn__6457.invoke(core.clj:111)
    at ring.middleware.reload$wrap_reload$fn__6482.invoke(reload.clj:14)
    at backtype.storm.ui.core$catch_errors$fn__8307.invoke(core.clj:909)
    at ring.middleware.keyword_params$wrap_keyword_params$fn__7124.invoke(keyword_params.clj:27)
    at ring.middleware.nested_params$wrap_nested_params$fn__7163.invoke(nested_params.clj:65)
    at ring.middleware.params$wrap_params$fn__7096.invoke(params.clj:55)
    at ring.middleware.multipart_params$wrap_multipart_params$fn__7191.invoke(multipart_params.clj:103)
    at ring.middleware.flash$wrap_flash$fn__7372.invoke(flash.clj:14)
    at ring.middleware.session$wrap_session$fn__7361.invoke(session.clj:43)
    at ring.middleware.cookies$wrap_cookies$fn__7292.invoke(cookies.clj:160)
    at ring.adapter.jetty$proxy_handler$fn__7572.invoke(jetty.clj:16)
    at ring.adapter.jetty.proxy$org.mortbay.jetty.handler.AbstractHandler$0.handle(Unknown Source)
    at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
    at org.mortbay.jetty.Server.handle(Server.java:326)
    at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
    at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928)
    at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
    at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
    at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
    at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
    at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
Caused by: java.net.NoRouteToHostException: No route to host
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:345)
    at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
    at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
    at java.net.Socket.connect(Socket.java:589)
    at org.apache.thrift7.transport.TSocket.open(TSocket.java:178)
    ... 33 more

Provide tagged image version

From the "latest" tag it is not always clear which version of storm is included in the actual docker image. Can you provide a tag for the included storm version as well. You have one for storm 0.9.4, but none for 0.9.5 yet.

specify a fixed ubuntu release

hi,
i've got an issue when i build the Dockerfile .
here are the output
Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.0.0_1.0.1-4ubuntu5.31_amd64.deb 404 Not Found

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing? The command '/bin/sh -c apt-get upgrade -y' returned a non-zero code: 100

when i switch from 'ubuntu:latest' to 'ubuntu:15.10', it works.

can you replace the ubuntu:latest with a fixed version in the Dockerfile?
best regards,

Charles.

Unable to deploy via the image due to placeholders in config

Hello,

when i run

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>

as instructed by the README, i get storm complaining about an invalid character for ui.port in it's config file - to no surprise since it is not pre-processed by entrypoint.sh

any idea on how this could be gracefully resolved in this image? maybe if $STORM_HOME/conf/storm.yaml did not exist ( $STORM_HOME/conf/storm.yaml.template ? ) until entrypoint.sh is invoked?

thanks,
Andras

how many docker instance(zookeeper,nimbus) shoul I run

Hi Florian HUSSONNOIS

Thank for u fhuz/docker-storm images 1.0.1 .

I never use storm . so I am not complete understand your repo info .

I have a question that how many docker instance(zookeeper,nimbus) shoul I run ?

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.