diff --git a/.staroid/docker/zeppelin/Dockerfile b/.staroid/docker/zeppelin/Dockerfile index abf2ffa7d45..3cedccf96b5 100644 --- a/.staroid/docker/zeppelin/Dockerfile +++ b/.staroid/docker/zeppelin/Dockerfile @@ -25,6 +25,9 @@ RUN curl -sL https://deb.nodesource.com/setup_10.x | sh - && \ cd zeppelin-web-angular && npm install && npm install -g @angular/cli && npm run build:projects && \ cd .. +# extract war package into container image. +# Otherwise, war package is extracted on startup and that takes lots of time +# while underlying disk io is not too fast with gvisor (sandboxed). RUN mvn -B -T 2C package -DskipTests -Pweb-angular -Pscala-2.11 -Pbuild-distr -pl '!groovy,!submarine,!livy,!hbase,!pig,!file,!flink,!ignite,!kylin,!lens,!cassandra,!elasticsearch,!bigquery,!alluxio,!scio,!neo4j,!sap,!scalding,!java,!beam,!hazelcastjet,!geode,!ksql,!sparql,!:launcher-docker,!:launcher-cluster,!:launcher-flink' && \ cd zeppelin-distribution/target/zeppelin-0.9.0-SNAPSHOT/zeppelin-0.9.0-SNAPSHOT && \ mkdir -p zeppelin-web/dist && mkdir -p zeppelin-web-angular/dist && \ @@ -61,6 +64,14 @@ COPY --chown=zeppelin:zeppelin --from=builder /zeppelin/zeppelin-distribution/ta COPY --chown=zeppelin:zeppelin ./.staroid/conf/log4j.properties /zeppelin/conf/log4j.properties COPY --chown=zeppelin:zeppelin ./.staroid/k8s/100-interpreter-spec.yaml /zeppelin/k8s/interpreter/100-interpreter-spec.yaml +# create symlink to helium dependencies package (zeppelin-spell, zeppelin-tabledata, zeppelin-vis) +# Reason doing this is, if zeppelin-web is configured from dir, instead of war, it looking for src dir instead of lib dir for this dependency. +# However we don't really ship source code here. +RUN mkdir -p /zeppelin/zeppelin-web/src/app && \ + ln -s /zeppelin/lib/node_modules/zeppelin-tabledata /zeppelin/zeppelin-web/src/app/tabledata && \ + ln -s /zeppelin/lib/node_modules/zeppelin-vis /zeppelin/zeppelin-web/src/app/visualization && \ + ln -s /zeppelin/lib/node_modules/zeppelin-spell /zeppelin/zeppelin-web/src/app/spell + RUN rm -rf /zeppelin/notebook COPY --chown=zeppelin:zeppelin ./.staroid/notebook /zeppelin/notebook diff --git a/.staroid/docker/zeppelin/Dockerfile_prebuilt b/.staroid/docker/zeppelin/Dockerfile_prebuilt index 599e82d1e5f..835eec4dc71 100644 --- a/.staroid/docker/zeppelin/Dockerfile_prebuilt +++ b/.staroid/docker/zeppelin/Dockerfile_prebuilt @@ -3,6 +3,9 @@ FROM apache/zeppelin:0.9.0 AS builder ENV Z_VERSION="0.9.0-preview1" \ Z_HOME="/zeppelin" +# extract war package into container image. +# Otherwise, war package is extracted on startup and that takes lots of time +# while underlying disk io is not too fast with gvisor (sandboxed). RUN cd $Z_HOME && \ mkdir -p zeppelin-web/dist && mkdir -p zeppelin-web-angular/dist && \ cd zeppelin-web/dist && jar xf ../../zeppelin-web-$Z_VERSION.war && rm -f ../../zeppelin-web-$Z_VERSION.war && \ @@ -38,6 +41,14 @@ COPY --chown=zeppelin:zeppelin --from=builder /zeppelin /zeppelin/ COPY --chown=zeppelin:zeppelin ./.staroid/conf/log4j.properties /zeppelin/conf/log4j.properties COPY --chown=zeppelin:zeppelin ./.staroid/k8s/100-interpreter-spec.yaml /zeppelin/k8s/interpreter/100-interpreter-spec.yaml +# create symlink to helium dependencies package (zeppelin-spell, zeppelin-tabledata, zeppelin-vis) +# Reason doing this is, if zeppelin-web is configured from dir, instead of war, it looking for src dir instead of lib dir for this dependency. +# However we don't really ship source code here. +RUN mkdir -p /zeppelin/zeppelin-web/src/app && \ + ln -s /zeppelin/lib/node_modules/zeppelin-tabledata /zeppelin/zeppelin-web/src/app/tabledata && \ + ln -s /zeppelin/lib/node_modules/zeppelin-vis /zeppelin/zeppelin-web/src/app/visualization && \ + ln -s /zeppelin/lib/node_modules/zeppelin-spell /zeppelin/zeppelin-web/src/app/spell + RUN rm -rf /zeppelin/notebook COPY --chown=zeppelin:zeppelin ./.staroid/notebook /zeppelin/notebook diff --git a/.staroid/k8s/zeppelin-conf.yaml b/.staroid/k8s/zeppelin-conf.yaml index 585a9c9edd3..327f0b5a91f 100644 --- a/.staroid/k8s/zeppelin-conf.yaml +++ b/.staroid/k8s/zeppelin-conf.yaml @@ -9,6 +9,11 @@ data: + + zeppelin.helium.registry + helium,https://s3.amazonaws.com/helium-package/helium.json + Location of external Helium Registry + --- # ZEPPELIN_JAVA_OPTS env variable to apply on zeppelin-server