### What is this PR for?
The root cause in the log4j.properties in the zeppelin server image. For k8s, we should use stdout for logging, but for the single zeppelin server container, we should use dailyfile for logging (both zeppelin server and interpreter). This PR add a new env `ZEPPELIN_IN_DOCKER` to choose the right log4j properties file for the right scenario.
### What type of PR is it?
[Bug Fix ]
### Todos
* [ ] - Task
### What is the Jira issue?
* https://issues.apache.org/jira/browse/ZEPPELIN-5055
### How should this be tested?
* CI pass
### Screenshots (if appropriate)
### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No
Author: Jeff Zhang <zjffdu@apache.org>
Closes #3918 from zjffdu/ZEPPELIN-5055 and squashes the following commits:
8858569a0 [Jeff Zhang] [ZEPPELIN-5055]. Interpreter log is missing in zeppelin server docker container
2.7 KiB
| layout | title | description | group |
|---|---|---|---|
| page | Apache Zeppelin Releases Docker Images | This document contains instructions about making docker containers for Zeppelin. It mainly provides guidance into how to create, publish and run docker images for zeppelin releases. | setup/deployment |
{% include JB/setup %}
Docker Image for Apache Zeppelin Releases
Overview
This document contains instructions about making docker containers for Zeppelin. It mainly provides guidance into how to create, publish and run docker images for zeppelin releases.
Quick Start
Installing Docker
You need to install docker on your machine.
Running docker image for Zeppelin distribution
docker run -p 8080:8080 -e ZEPPELIN_IN_DOCKER=true --rm --name zeppelin apache/zeppelin-server:<release-version>
Notice, please specify environment variable ZEPPELIN_IN_DOCKER when starting zeppelin in docker,
otherwise you can not see the interpreter log.
- Zeppelin will run at
http://localhost:8080.
If you want to specify logs and notebook dir,
docker run -p 8080:8080 --rm \
-v $PWD/logs:/logs \
-v $PWD/notebook:/notebook \
-e ZEPPELIN_LOG_DIR='/logs' \
-e ZEPPELIN_NOTEBOOK_DIR='/notebook' \
-e ZEPPELIN_IN_DOCKER=true \
--name zeppelin apache/zeppelin-server:<release-version> # e.g '0.9.0'
Building dockerfile locally
cd $ZEPPELIN_HOME
cd scripts/docker/zeppelin/bin
docker build -t my-zeppelin:my-tag ./
Build docker image for Zeppelin server & interpreters
Starting from 0.9, Zeppelin support to run in k8s or docker. So we add the capability to build docker images for Zeppelin server & interpreter. Recommendation: Edit the Docker files yourself to adapt them to your needs and reduce the image size.
At first your need to build a zeppelin-distribution docker image.
cd $ZEPPELIN_HOME
docker build -t zeppelin-distribution .
Build docker image for zeppelin server.
cd $ZEPPELIN_HOME/scripts/docker/zeppelin-server
docker build -t zeppelin-server .
Build base docker image for zeppelin interpreter.
cd $ZEPPELIN_HOME/scripts/docker/zeppelin-interpreter
docker build -t zeppelin-interpreter-base .