Skip to content

Commit

Permalink
Add Zeppelin (#87)
Browse files Browse the repository at this point in the history
  • Loading branch information
ehoner authored Jan 17, 2025
1 parent c39e65e commit f10e6e8
Show file tree
Hide file tree
Showing 5 changed files with 782 additions and 3 deletions.
15 changes: 13 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

install:
./gradlew compileJava installDist
./gradlew compileJava installDist shadowJar

test:
./gradlew test -x spotbugsMain -x spotbugsTest -x spotbugsTestFixtures
Expand Down Expand Up @@ -125,4 +125,15 @@ release:
test -n "$(VERSION)" # MISSING ARG: $$VERSION
./gradlew publish

.PHONY: install test build bounce clean quickstart deploy-config undeploy-config deploy undeploy deploy-demo undeploy-demo deploy-samples undeploy-samples deploy-flink undeploy-flink deploy-kafka undeploy-kafka deploy-venice undeploy-venice integration-tests integration-tests-kind deploy-dev-environment undeploy-dev-environment generate-models release
build-zeppelin:
docker build -t hoptimator-zeppelin -t hoptimator-zeppelin:0.11.2 -f ./deploy/docker/zeppelin/Dockerfile-zeppelin .

# attaches to terminal (not run as daemon)
run-zeppelin:
docker run --rm -p 8080:8080 \
--volume=${HOME}/.kube/config:/opt/zeppelin/.kube/config \
--add-host=docker-for-desktop:host-gateway \
--name hoptimator-zeppelin \
hoptimator-zeppelin

.PHONY: install test build bounce clean quickstart deploy-config undeploy-config deploy undeploy deploy-demo undeploy-demo deploy-samples undeploy-samples deploy-flink undeploy-flink deploy-kafka undeploy-kafka deploy-venice undeploy-venice build-zeppelin run-zeppelin integration-tests integration-tests-kind deploy-dev-environment undeploy-dev-environment generate-models release
31 changes: 31 additions & 0 deletions deploy/docker/zeppelin/Dockerfile-zeppelin
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# upstream - https://zeppelin.apache.org/docs/0.11.2/
FROM apache/zeppelin:0.11.2

# Add hoptimator fat jar to jdbc interpreter directory
ADD ./hoptimator-jdbc-driver/build/libs/hoptimator-jdbc-driver-all.jar /opt/zeppelin/interpreter/jdbc/hoptimator-jdbc-driver-all.jar

# local copy of hoptimator-cli (for debugging)
ADD ./hoptimator-cli/build/install/hoptimator-cli /opt/hoptimator/hoptimator-cli/build/install/hoptimator-cli/
ADD ./hoptimator /opt/hoptimator/

# zeppelin server configuration (initialized on start)
ADD ./deploy/docker/zeppelin/zeppelin-site.xml /opt/zeppelin/conf/zeppelin-site.xml
# hoptimator specific driver configuration
ADD ./deploy/docker/zeppelin/interpreter.json /opt/zeppelin/conf/interpreter.json

# must be writeable ([re-]written on start + reloads)
USER root
RUN chmod 660 /opt/zeppelin/conf/interpreter.json \
/opt/zeppelin/conf/zeppelin-site.xml

# Add overrides for K8s (see: com.linkedin.hoptimator.k8s.K8sConfig)
# host must match docker argument --add-host=<host>:host-gateway
ENV KUBECONFIG_BASEPATH="https://docker-for-desktop:6443" \
ZEPPELIN_HOME="/opt/zeppelin"

# restore settings from upstream Dockerfile
USER 1000
EXPOSE 8080
ENTRYPOINT [ "/usr/bin/tini", "--" ]
WORKDIR ${ZEPPELIN_HOME}
CMD ["bin/zeppelin.sh"]
Loading

0 comments on commit f10e6e8

Please sign in to comment.