Skip to content

Commit 1f093d4

Browse files
committed
Add script start-zeppelin to zeppelin-base
1 parent d2c744e commit 1f093d4

File tree

4 files changed

+83
-6
lines changed

4 files changed

+83
-6
lines changed

dev/create_release.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,9 @@ function make_binary_release() {
120120
rm -rf "${WORKING_DIR}/zeppelin-${RELEASE_VERSION}-bin-${BIN_RELEASE_NAME}"
121121
}
122122

123+
build_docker_base
123124
git_clone
124125
make_source_package
125-
build_docker_base
126126
make_binary_release all "-Pspark-2.0 -Phadoop-2.4 -Pyarn -Ppyspark -Psparkr -Pr -Pscala-2.11"
127127
make_binary_release netinst "-Pspark-2.0 -Phadoop-2.4 -Pyarn -Ppyspark -Psparkr -Pr -Pscala-2.11 -pl !alluxio,!angular,!cassandra,!elasticsearch,!file,!flink,!hbase,!ignite,!jdbc,!kylin,!lens,!livy,!markdown,!postgresql,!python,!shell,!bigquery"
128128

docs/install/docker.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,21 +44,27 @@ You need to [install docker](https://docs.docker.com/engine/installation/) on yo
4444
```
4545
docker pull ${DOCKER_USERNAME}/zeppelin-release:<release-version>
4646
47-
docker run --rm -it -p 7077:7077 -p 8081:8081 ${DOCKER_USERNAME}/zeppelin-release:<release-version> -c bash
47+
docker run --rm -it -p 7077:7077 -p 8080:8080 ${DOCKER_USERNAME}/zeppelin-release:<release-version> -c bash
4848
```
4949
* Then a docker container will start with a Zeppelin release on path :
5050
`/usr/local/zeppelin/`
5151

5252
* Run zeppelin inside docker:
5353
```
54-
/usr/local/zeppelin/bin/zeppelin-daemon start
54+
start-zeppelin.sh start
5555
```
5656

57-
* To Run Zeppelin in daemon mode
57+
* To Run Zeppelin in daemon mode
58+
Mounting logs and notebooks zeppelin to folders on your host machine
59+
5860
```
59-
docker run -d -p 7077:7077 -p 8081:8081 ${DOCKER_USERNAME}/zeppelin-release:<release-version> \
60-
bash -c "/usr/local/zeppelin/bin/zeppelin-daemon.sh restart && while true; do sleep 3; done"
61+
docker run -p 7077:7077 -p 8080:8080 --privileged=true -v $PWD/logs:/logs -v $PWD/notebook:/notebook \
62+
-e ZEPPELIN_NOTEBOOK_DIR='/notebook' \
63+
-e ZEPPELIN_LOG_DIR='/logs' \
64+
-d ${DOCKER_USERNAME}/zeppelin-release:<release-version> \
65+
bash -c "start-zeppelin.sh restart && while true; do sleep 3; done"
6166
```
6267

68+
6369
* Zeppelin will run at `http://localhost:8080`.
6470

scripts/docker/zeppelin-base/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ RUN apk add --update bash curl openjdk7-jre wget ca-certificates python build-ba
4545
RUN wget -O /usr/local/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.1.3/dumb-init_1.1.3_amd64
4646
RUN chmod +x /usr/local/bin/dumb-init
4747

48+
ADD start-zeppelin.sh /usr/bin/start-zeppelin.sh
49+
RUN chmod a+x /usr/bin/start-zeppelin.sh
50+
4851
# ports for zeppelin
4952
EXPOSE 8080 7077
5053

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
2+
#!/bin/bash
3+
#
4+
# Licensed to the Apache Software Foundation (ASF) under one
5+
# or more contributor license agreements. See the NOTICE file
6+
# distributed with this work for additional information
7+
# regarding copyright ownership. The ASF licenses this file
8+
# to you under the Apache License, Version 2.0 (the
9+
# "License"); you may not use this file except in compliance
10+
# with the License. You may obtain a copy of the License at
11+
#
12+
# http://www.apache.org/licenses/LICENSE-2.0
13+
#
14+
# Unless required by applicable law or agreed to in writing, software
15+
# distributed under the License is distributed on an "AS IS" BASIS,
16+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17+
# See the License for the specific language governing permissions and
18+
# limitations under the License.
19+
#
20+
#
21+
22+
USAGE="-e Usage: start-zepppelin.sh {start|stop|restart}\n\t"
23+
24+
if [[ -z "$ZEPPELIN_MEM" ]]; then
25+
export ZEPPELIN_MEM="-Xmx1024m -XX:MaxPermSize=512m"
26+
fi
27+
if [[ -z "$ZEPPELIN_INTP_MEM" ]]; then
28+
export ZEPPELIN_INTP_MEM=$ZEPPELIN_MEM
29+
fi
30+
if [[ -z "$ZEPPELIN_JAVA_OPTS" ]]; then
31+
# By default N/A
32+
export ZEPPELIN_JAVA_OPTS=""
33+
fi
34+
if [[ -z "$ZEPPELIN_NOTEBOOK_DIR" ]]; then
35+
export ZEPPELIN_NOTEBOOK_DIR="/usr/local/zeppelin/notebook"
36+
fi
37+
if [[ -z "$ZEPPELIN_LOG_DIR" ]]; then
38+
export ZEPPELIN_LOG_DIR="/usr/local/zeppelin/logs"
39+
fi
40+
if [[ -z "$ZEPPELIN_WEBSOCKET_MAX_TEXT_MESSAGE_SIZE" ]]; then
41+
export ZEPPELIN_WEBSOCKET_MAX_TEXT_MESSAGE_SIZE=1024000
42+
fi
43+
44+
export ZEPPELIN_PORT=8080
45+
export ZEPPELIN_HOME="/usr/local/zeppelin"
46+
47+
function start(){
48+
${ZEPPELIN_HOME}/bin/zeppelin-daemon.sh start
49+
}
50+
51+
function stop(){
52+
${ZEPPELIN_HOME}/bin/zeppelin-daemon.sh stop
53+
}
54+
55+
case "${1}" in
56+
start)
57+
start
58+
;;
59+
stop)
60+
stop
61+
;;
62+
restart)
63+
stop
64+
start
65+
;;
66+
*)
67+
echo ${USAGE}
68+
esac

0 commit comments

Comments
 (0)