Analytics Vidhya
Published in

Analytics Vidhya

Journey of Apache Kafka & Zookeeper Administrator ( Part 15 )

August 2020 ( Initial Support for Docker Containers )

Random Picture of CMAK

In this article, I will share things about #CMAK running in #Containers.

I using Docker Runtime as a starting point but the same things can be extended for CoreOS / LXC / etc.

As CMAK is a standalone application and doesn’t store its state in a local machine. It’s the best candidate for containers.

There are two ways for making an image of CMAK.

  1. Building CMAK from Scratch.
  2. Use Pre-build CMAK Jar.

I am going to share details about Building CMAK from Scratch.

Let’s check DockerFile

FROM openjdk:11LABEL AUTHOR="Davinder Pal"
ENV ZK_HOSTS=localhost:2181
RUN cd /tmp && wget${CMAK_VERSION}.tar.gz && \
tar -xzvf ${CMAK_VERSION}.tar.gz
RUN cd /tmp/CMAK-${CMAK_VERSION} && \
./sbt clean dist
RUN unzip -d / /tmp/CMAK-${CMAK_VERSION}/target/universal/cmak-${CMAK_VERSION}.zipRUN rm -fr /tmp/CMAK-${CMAK_VERSION} /tmp/${CMAK_VERSION}.tar.gzWORKDIR /cmak-${CMAK_VERSION}EXPOSE 9000
ENTRYPOINT ["./bin/cmak","-Dconfig.file=conf/application.conf"]
  • I am using OpenJDK 11 as the base Image because CMAK recommends using Java 11.
  • Zookeeper Hosts are passed as environment variables to the container at Runtime.
  • No Need to Install SBT aka because CMAK already contains SBT binary in Code.
  • It doesn’t support any authentication methods Basic / LDAP for now.

The journey takes a break here, as I haven’t done my research on the next part yet so sorry for that. ( Next Things are Support for Kubernetes or Similar Tool )




Analytics Vidhya is a community of Analytics and Data Science professionals. We are building the next-gen data science ecosystem

Recommended from Medium

Troubleshooting network communication issues with the Canon printer

Gradient descent in Python from scratch

Announcing KYVE’s third protocol update

(De)coupling yourself

Creating “Split” in Dataflow using index_of() function

DEUS finance: Vaults and Yield-Farming Launch


Good response time? How to improve your KPIs with Jira!

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Davinder Pal

Davinder Pal

Senior Software Engineer III ( R&D )

More from Medium

Kafka — Event hub project


Deploying Kafka with plain SASL Authentication using Docker

A Quick insight on Apache Airflow

Elasticsearch REST Java Client