Sign inSign up

monasca/storm

By monasca

•Updated almost 7 years ago

Image
0

1M+

monasca/storm repository overview

⁠monasca/storm Dockerfile

This image runs an instance of Apache Storm⁠ optimized for Docker and Kubernetes environments.

Sources: monasca/storm⁠ · Dockerfile⁠ · monasca-docker⁠

⁠Tags

Images in this repository are tagged as follows:

  • 1.0.3: storm version
  • latest: the latest version recommended for use with other Monasca components. Currently, this is 1.0.3
  • master: a development / testing build not necessarily intended for production use

⁠Usage

Storm requires several components. First a nimbus instance should be started:

docker run --name storm-nimbus monasca/storm:1.0.3 storm nimbus

Then one or more supervisor instances:

docker run \
  --name storm-supervisor \
  --link storm-nimbus \
  monasca/storm:1.0.3 storm supervisor

The cluster then requires a topology. To use monasca-thresh⁠:

docker run --rm=true --link storm-nimbus monasca/thresh:master

The submission takes around a minute to complete, after which the container is no longer needed. Storm will automatically transfer the topology to new workers that join, restart, etc, and as such the topology only needs to be submitted once unless the cluster is completely reset.

⁠Configuration

Several parameters can be specified using environment variables:

VariableDefaultDescription
ZOOKEEPER_SERVERSzookeeperComma-separated list of ZK hostnames
ZOOKEEPER_PORT2181Port to use for hostnames
ZOOKEEPER_WAITtrueIf true, wait for ZK before startup
SUPERVISOR_SLOTS_PORTS6701,6702List of supervisor ports, 1 per process
NIMBUS_SEEDSstorm-nimbusComma-separated list of Nimbus hosts
STORM_LOCAL_HOSTNAMEIf set, use as storm hostname, if not set, use container IP
LOG_LEVELwarnlog4j2 console logging level
WORKER_LOGS_TO_STDOUTfalseif true, workers log to container stdout

Note that the configuration template also supports a number of less common environment variables. See the storm.yaml.j2⁠ template for a full list.

⁠Memory

Note that all Storm JVM processes are configured to scale their max heap size based on a configured container limit (using Docker's --memory flag or similar). This behavior can be tuned as follows:

VariableDefaultDescription
JVM_MAX_RATIO0.75The max % of allocatable memory to pass to -XX:MaxRAM
JVM_MAX_MBunsetValue to use for allocatable memory, autodetect if unset
MAX_OVERRIDE_MBunsetIgnore scaling, always return -XX:MaxRAM$MAX_OVERRIDE_MB
SUPERVISOR_MAX_MB256MaxRam of JVM in MiB for supervisor
WORKER_MAX_MB784MaxRam of JVM in MiB for workers
NIMBUS_MAX_MB256MaxRam of JVM in MiB for nimbus
UI_MAX_MB768MaxRam of JVM in MiB for UI
SUPERVISOR_STACK_SIZE1024kJVM stack size
WORKER_STACK_SIZE1024kJVM stack size
NIMBUS_STACK_SIZE1024kJVM stack size
UI_STACK_SIZE1024kJVM stack size

Memory scaling is done based off of an automatically determined "effective" memory limit. The ultimate limit is either the true system memory limit or, if set, a limited value set via Docker's --memory flag (whichever value is smallest). This value is then scaled by JVM_MAX_RATIO to ensure some memory is left for other use.

The final max ram size for each component is then the smallest of:

  • The component-specific memory request, e.g. WORKER_MAX_MB
  • The scaled allocatable memory (as described above)
  • If set, JVM_MAX_MB
⁠monasca-thresh

Configuration for monasca-thresh⁠ is included by default and supports a number of additional configuration options:

VariableDefaultDescription
METRIC_SPOUT_THREADS2Metric Spout threads
METRIC_SPOUT_TASKS2Metric Spout tasks
KAFKA_URIkafka:9092Kafka host
MYSQL_DB_HOSTmysqlMySQL host
MYSQL_DB_PORT3306MySQL port
MYSQL_DB_DATABASEmonMonasca database name
MYSQL_DB_USERNAMEthreshMySQL user
MYSQL_DB_PASSWORDpasswordMySQL password
EVENT_SPOUT_THREADS2Event Spout Threads
EVENT_SPOUT_TASKS2Event Spout Tasks
EVENT_BOLT_THREADS2Event Bolt Threads
EVENT_BOLT_TASKS2Event Bolt Tasks
FILTERING_BOLT_THREADS2Filtering Bolt Threads
FILTERING_BOLT_TASKS2Filtering Bolt Tasks
ALARM_CREATION_BOLT_THREADS2Alarm Creation Bolt Threads
ALARM_CREATION_BOLT_TASKS2Alarm Creation Bolt Tasks
AGGREGATION_BOLT_THREADS2Aggregation Bolt Threads
AGGREGATION_BOLT_TASKS2Aggregation Bolt Tasks
THRESHOLDING_BOLT_THREADS2Thresholding Bolt Threads
THRESHOLDING_BOLT_TASKS2Thresholding Bolt Tasks
USE_SSL_ENABLEDtrueUse SSL validation with MySql

Note that monasca-thresh configs can be removed by overwriting or removing /templates/thresh-config.yml.j2.

Tag summary

Content type

Image

Digest

Size

136.6 MB

Last updated

almost 7 years ago

docker pull monasca/storm