Hi,

I'm setting up a Dockerfile to run Zeppelin using the Flink interpreter.
I'm starting from the Docker image apache/zeppelin:0.9.0 and following the
instructions on
https://medium.com/@zjffdu/flink-on-zeppelin-part-1-get-started-2591aaa6aa47
to download flink-1.10.0-bin-scala_2.11.tgz and
flink-shaded-hadoop-2-2.8.3-10.0.jar. This is mostly working, except for
the fact that I have to manually configure FLINK_HOME in the Zeppelin UI to
have it pointing to the path where I have installed Flink, in my case
/opt/flink/latest. When I do that I am able to use the Flink interpreters.
I have tried to setup that in the Dockerfile, but I'm not sure which files
I have to edit:

   - I have tried editing /zeppelin/conf/interpreter.json, but it looks
   like it is generated the first time Zeppelin runs, the file doesn't exist
   while I build the Docker image
   - I have tried editing
   /zeppelin/interpreter/flink/interpreter-setting.json instead, but it has no
   effect. I used the following statements in my Dockerfile:

 WORKDIR /zeppelin
 RUN apt-get install -y jq \
  && FLINK_CONF_FILE=interpreter/flink/interpreter-setting.json \
  && cp "${FLINK_CONF_FILE}" "${FLINK_CONF_FILE}.bak" \
  && jq '.[0].properties.FLINK_HOME.value = "/opt/flink/latest"'
"${FLINK_CONF_FILE}" > "${FLINK_CONF_FILE}.new" \
  && mv "${FLINK_CONF_FILE}.new" "${FLINK_CONF_FILE}"

   - I have tried editing /zeppelin/conf/zeppelin-env.sh, but it also has
   no effect.  I used the following statements in my Dockerfile

WORKDIR /zeppelin
RUN cp conf/zeppelin-env.sh.template conf/zeppelin-env.sh \
  && echo 'export FLINK_HOME=/opt/flink/latest' >> conf/zeppelin-env.sh \
  && echo '' >> conf/zeppelin-env.sh

Which file should I edit to setup FLINK_HOME from a script? Any idea what
am I doing wrong? I guess this should be the same as setting up any
Zeppelin configuration key, so this is quite a basic question, but I have a
very rudimentary knowledge of Zeppelin.

Thanks a lot for your help

Juan

Reply via email to