druid-io / druid-operator

Druid Kubernetes Operator
Other
205 stars 93 forks source link

How to load community extensions? #294

Open vishalgarg837 opened 2 years ago

vishalgarg837 commented 2 years ago

We are planning to expose the Prometheus metrics via prometheus-emitter but for this to work, promtheus-emitter extension has to be loaded which is a community extension.

Can anyone please tell me how can we load community extension through druid-operator?

acherla commented 2 years ago

prometheus emitter now ships as a part of 0.23.0 version of druid by default. Optionally you can create a custom docker image with the extensions loaded into the image if you are using an older version of druid:

FROM apache/druid:0.22.1
RUN mkdir -p /opt/druid/extensions/prometheus-emitter
COPY deps/prometheus-emitter-0.22.1.jar /opt/druid/extensions/prometheus-emitter
COPY deps/simpleclient-0.7.0.jar /opt/druid/extensions/prometheus-emitter
COPY deps/simpleclient_pushgateway-0.7.0.jar /opt/druid/extensions/prometheus-emitter
COPY deps/simpleclient_httpserver-0.7.0.jar /opt/druid/extensions/prometheus-emitter
COPY deps/simpleclient_common-0.7.0.jar /opt/druid/extensions/prometheus-emitter
VOLUME /tmp
vishalgarg837 commented 2 years ago

Thanks, @acherla. Upgrading Druid to 0.23.0 worked fine, I can see the metrics now. I'll also explore creating a custom docker image, just one question, what instruction do I need to pass in ENTRYPOINT? Is it possible for you to share the complete Doclerfile?

AdheipSingh commented 2 years ago

Custom dockerfile is workaround and fine, ideally the operator should support init container for pulling in dependency with custom scripts.

acherla commented 2 years ago

Thanks, @acherla. Upgrading Druid to 0.23.0 worked fine, I can see the metrics now. I'll also explore creating a custom docker image, just one question, what instruction do I need to pass in ENTRYPOINT? Is it possible for you to share the complete Doclerfile?

Dockerfile above is the complete one. By default im using the apache druid base image which already has an entrypoint configured.

bharathkuppala commented 2 years ago

Hello, am building druid custom docker image using 0.23.0 released binary. Now that 0.23.0 ships this I removed deps related to prometheus-emitter. While installing it is throwing error complaining about prometheus-emitter not present in extension load list.

What am I doing wrong? is my understanding correct @acherla