The PromoJam analytics system is built with Clojure and Java and runs on the
Storm platform. The system is fairly specialized and uses a stack that's not as
familiar to some PromoJam developers. A Dockerized build process creates an
immutable artifact that contains both the application code and a configured
runtime environment. Administrators can download a versioned Docker container
and deploy the corresponding topology in minutes.
It is recommend to manage the Analytics system with the resulting Docker image.
For development, it is recommended to use the
promojam/lein Docker image.
You will need to install Docker to get
Before we get into the details, this is the overall process:
- Pull the versioned Docker image.
- Run a Docker container from the versioned image.
- Specify the remote Storm environment you wish to manage.
- Manage the topology with Storm CLI.
Now, for the details...
Pull the versioned Docker image
docker pull promojam/storm-analytics:<full-sha|tag>
Note: The Docker build process was created prior to
v.0.10.14. You won't
be able to pull for a version created before then. If you need to run a previous
version, you may download the Uberjar from Github releases, and mount the file
with a Docker volume so that it can be accessed inside the container. The
runtime will be compatible.
Run a Docker container from the versioned image
docker run --rm -it promojam/storm-analytics:v0.10.14 sh
It is important to run the container with the
-it options so that you get an interactive terminal. You will use this TTY to manage Storm topologies.
It is recommended that you use the
--rm option to remove the container when done.
Specify the remote Storm environment you wish to manage
Configure with either
The published Docker images contain uberjars for both the stage and prod environments. You must choose which environment you are targeting before you can access a remote topology.
Manage the topology with Storm CLI
storm utility is used to manage remote topologies. You can see the help
to understand all the operations that are possible. An explanation of the most
common operations is available in the