Skip to content
This repository was archived by the owner on Apr 9, 2021. It is now read-only.

avvo/kafkamon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

245049e · Sep 23, 2020
Sep 22, 2020
Feb 19, 2018
Jan 27, 2018
Feb 12, 2018
Feb 19, 2018
Aug 26, 2016
Feb 12, 2018
Feb 19, 2018
Mar 23, 2017
Jan 6, 2018
Feb 12, 2018
Apr 17, 2018
Feb 19, 2018
Sep 22, 2020
Jan 27, 2018
Sep 23, 2020

Repository files navigation

Kafkamon

CircleCI

To start your Phoenix app:

  • Install dependencies with mix deps.get
  • Install Node.js dependencies with npm install
  • Start Phoenix endpoint with mix phoenix.server

Now you can visit localhost:4000 from your browser.

Ready to run in production? Please check our deployment guides.

Learn more

iex --name [email protected] --cookie kafkamon --remsh [email protected]

Test kafka message

mix kafkamon.test_producer

Running kafka locally

You can run a docker kafka container easily with spotify/docker-kafka:

docker run -p 2181:2181 -p 9092:9092 --env ADVERTISED_HOST=`docker-machine ip \`docker-machine active\`` --env ADVERTISED_PORT=9092 spotify/kafka

Then run tests with:

KAKFA_HOSTS=localhost:9092 mix test

Releasing

Using edib building a docker image is super great! Just run ./bin/build.sh and then ./bin/publish.sh to publish.

Obviously publishing only works if you have rights ;)

To use, you can run with docker:

docker run --rm \
-e "PORT=4000" \
-e "KAFKA_HOSTS=172.17.0.1:9092" \
-e "KAFKAMON_HOST=localhost" \
-e "KAFKAMON_PORT=4000" \
-p 4000:4000 \
avvo/kafkamon:latest
  • PORT is the port phoenix listens to inside the container
  • KAFKA_HOSTS is a comma-separated list of kafka host:port pairs.
  • KAFKAMON_HOST is the name you use in the browser to connect to the server. This is important for websockets/javascript/CORS security.
  • KAFKAMON_PORT is the public port you use in your browser to connect to the server. Just like KAFKAMON_HOST its for security.
  • -p internal:external is the docker port exposing flag. It exposes the internal phoenix port to the external browser world.