Skip to content

Commit 426bbe8

Browse files
committed
2 parents 1f9a111 + 68f438d commit 426bbe8

54 files changed

Lines changed: 1528 additions & 159 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

NOTICE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Apache Zeppelin (incubating)
2-
Copyright 2015 The Apache Software Foundation
2+
Copyright 2015 - 2016 The Apache Software Foundation
33

44
This product includes software developed at
55
The Apache Software Foundation (http://www.apache.org/).

bin/common.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,6 @@ if [[ -z "${ZEPPELIN_LOG_DIR}" ]]; then
3636
export ZEPPELIN_LOG_DIR="${ZEPPELIN_HOME}/logs"
3737
fi
3838

39-
if [[ -z "${ZEPPELIN_NOTEBOOK_DIR}" ]]; then
40-
export ZEPPELIN_NOTEBOOK_DIR="${ZEPPELIN_HOME}/notebook"
41-
fi
42-
4339
if [[ -z "$ZEPPELIN_PID_DIR" ]]; then
4440
export ZEPPELIN_PID_DIR="${ZEPPELIN_HOME}/run"
4541
fi

bin/functions.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#!/bin/bash
22
#
3-
# Copyright 2007 The Apache Software Foundation
4-
#
53
# Licensed to the Apache Software Foundation (ASF) under one
64
# or more contributor license agreements. See the NOTICE file
75
# distributed with this work for additional information

bin/zeppelin-daemon.sh

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#!/bin/bash
22
#
3-
# Copyright 2007 The Apache Software Foundation
4-
#
53
# Licensed to the Apache Software Foundation (ASF) under one
64
# or more contributor license agreements. See the NOTICE file
75
# distributed with this work for additional information
@@ -21,7 +19,7 @@
2119
# description: Start and stop daemon script for.
2220
#
2321

24-
USAGE="Usage: zeppelin-daemon.sh [--config <conf-dir>] {start|stop|restart|reload|status}"
22+
USAGE="Usage: zeppelin-daemon.sh [--config <conf-dir>] {start|stop|upstart|restart|reload|status}"
2523

2624
if [[ "$1" == "--config" ]]; then
2725
shift
@@ -93,11 +91,6 @@ function initialize_default_directories() {
9391
echo "Pid dir doesn't exist, create ${ZEPPELIN_PID_DIR}"
9492
$(mkdir -p "${ZEPPELIN_PID_DIR}")
9593
fi
96-
97-
if [[ ! -d "${ZEPPELIN_NOTEBOOK_DIR}" ]]; then
98-
echo "Notebook dir doesn't exist, create ${ZEPPELIN_NOTEBOOK_DIR}"
99-
$(mkdir -p "${ZEPPELIN_NOTEBOOK_DIR}")
100-
fi
10194
}
10295

10396
function wait_for_zeppelin_to_die() {
@@ -159,6 +152,16 @@ function check_if_process_is_alive() {
159152
fi
160153
}
161154

155+
function upstart() {
156+
157+
# upstart() allows zeppelin to be run and managed as a service
158+
# for example, this could be called from an upstart script in /etc/init
159+
# where the service manager starts and stops the process
160+
initialize_default_directories
161+
162+
$ZEPPELIN_RUNNER $JAVA_OPTS -cp $ZEPPELIN_CLASSPATH_OVERRIDES:$CLASSPATH $ZEPPELIN_MAIN >> "${ZEPPELIN_OUTFILE}"
163+
}
164+
162165
function start() {
163166
local pid
164167

@@ -241,6 +244,9 @@ case "${1}" in
241244
stop)
242245
stop
243246
;;
247+
upstart)
248+
upstart
249+
;;
244250
reload)
245251
stop
246252
start

bin/zeppelin.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#!/bin/bash
22
#
3-
# Copyright 2007 The Apache Software Foundation
4-
#
53
# Licensed to the Apache Software Foundation (ASF) under one
64
# or more contributor license agreements. See the NOTICE file
75
# distributed with this work for additional information

conf/zeppelin-site.xml.template

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,33 @@
8383
</property>
8484
-->
8585

86+
<!-- If using Azure for storage use the following settings -->
87+
<!--
88+
<property>
89+
<name>zeppelin.notebook.azure.user</name>
90+
<value>user</value>
91+
<description>optional user name for Azure folder structure</description>
92+
</property>
93+
94+
<property>
95+
<name>zeppelin.notebook.azure.share</name>
96+
<value>zeppelin</value>
97+
<description>share name for notebook storage</description>
98+
</property>
99+
100+
<property>
101+
<name>zeppelin.notebook.azure.connectionString</name>
102+
<value>DefaultEndpointsProtocol=https;AccountName=<accountName>;AccountKey=<accountKey></value>
103+
<description>share name for notebook storage</description>
104+
</property>
105+
106+
<property>
107+
<name>zeppelin.notebook.storage</name>
108+
<value>org.apache.zeppelin.notebook.repo.AzureNotebookRepo</value>
109+
<description>notebook persistence layer implementation</description>
110+
</property>
111+
-->
112+
86113
<!-- For versioning your local norebook storage using Git repository
87114
<property>
88115
<name>zeppelin.notebook.storage</name>

docs/README.md

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,13 @@ See https://help.github.com/articles/using-jekyll-with-pages#installing-jekyll
88

99
**tl;dr version:**
1010

11+
```
1112
ruby --version >= 1.9.3
1213
gem install bundler
14+
# go to /docs under your Zeppelin source
1315
bundle install
14-
16+
```
17+
1518
*On OS X 10.9 you may need to do "xcode-select --install"*
1619

1720

@@ -20,28 +23,28 @@ See https://help.github.com/articles/using-jekyll-with-pages#installing-jekyll
2023
bundle exec jekyll serve --watch
2124

2225

23-
## Deploy to ASF svnpubsub infra (commiters only)
26+
## Adding a new page
27+
28+
rake page name="new-page.md"
29+
30+
31+
## Bumping up version in a new release
32+
33+
* `ZEPPELIN_VERSION` and `BASE_PATH` property in _config.yml
34+
* `Zeppelin <small>([VERSION])</small>` in _includes/themes/zeppelin/_navigation.html
35+
should be updated
36+
37+
38+
## Deploy to ASF svnpubsub infra (for committers only)
2439
1. generate static website in `./_site`
2540
```
41+
# go to /docs under Zeppelin source
2642
bundle exec jekyll build --safe
2743
```
2844
2945
2. checkout ASF repo
3046
```
31-
svn co https://svn.apache.org/repos/asf/incubator/zeppelin asf-zepplelin
47+
svn co https://svn.apache.org/repos/asf/incubator/zeppelin asf-zeppelin
3248
```
33-
3. copy zeppelin/_site to asf-zepplelin/site/docs/[VERSION]
49+
3. copy `zeppelin/docs/_site` to `asf-zeppelin/site/docs/[VERSION]`
3450
4. ```svn commit```
35-
36-
## Adding a new page
37-
38-
rake page name="new-page.md"
39-
40-
41-
42-
## Bumping up version
43-
44-
* `BASE_PATH` property in _config.yml
45-
* `ZEPPELIN <small>([VERSION])</small>` in _includes/themes/zeppelin/_navigation.html
46-
47-
need to be updated
103 KB
Loading
80 KB
Loading

docs/install/install.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,24 @@ You can configure Zeppelin with both **environment variables** in `conf/zeppelin
178178
<td>user</td>
179179
<td>A user name of S3 bucket<br />i.e. <code>bucket/user/notebook/2A94M5J1Z/note.json</code></td>
180180
</tr>
181+
<tr>
182+
<td>ZEPPELIN_NOTEBOOK_AZURE_CONNECTION_STRING</td>
183+
<td>zeppelin.notebook.azure.connectionString</td>
184+
<td></td>
185+
<td>The Azure storage account connection string<br />i.e. <code>DefaultEndpointsProtocol=https;AccountName=&lt;accountName&gt;;AccountKey=&lt;accountKey&gt;</code></td>
186+
</tr>
187+
<tr>
188+
<td>ZEPPELIN_NOTEBOOK_AZURE_SHARE</td>
189+
<td>zeppelin.notebook.azure.share</td>
190+
<td>zeppelin</td>
191+
<td>Share where the Zeppelin notebook files will be saved</td>
192+
</tr>
193+
<tr>
194+
<td>ZEPPELIN_NOTEBOOK_AZURE_USER</td>
195+
<td>zeppelin.notebook.azure.user</td>
196+
<td>user</td>
197+
<td>An optional user name of Azure file share<br />i.e. <code>share/user/notebook/2A94M5J1Z/note.json</code></td>
198+
</tr>
181199
<tr>
182200
<td>ZEPPELIN_NOTEBOOK_STORAGE</td>
183201
<td>zeppelin.notebook.storage</td>
@@ -217,3 +235,39 @@ After successful start, visit [http://localhost:8080](http://localhost:8080) wit
217235
```
218236
bin/zeppelin-daemon.sh stop
219237
```
238+
239+
#### Start Zeppelin with a service manager such as upstart
240+
241+
Zeppelin can auto start as a service with an init script, such as services managed by upstart.
242+
243+
The following is an example upstart script to be saved as `/etc/init/zeppelin.conf`
244+
This example has been tested with Ubuntu Linux.
245+
This also allows the service to be managed with commands such as
246+
247+
`sudo service zeppelin start`
248+
`sudo service zeppelin stop`
249+
`sudo service zeppelin restart`
250+
251+
Other service managers could use a similar approach with the `upstart` argument passed to the zeppelin-daemon.sh script: `bin/zeppelin-daemon.sh upstart`
252+
253+
##### zeppelin.conf
254+
255+
```
256+
description "zeppelin"
257+
258+
start on (local-filesystems and net-device-up IFACE!=lo)
259+
stop on shutdown
260+
261+
# Respawn the process on unexpected termination
262+
respawn
263+
264+
# respawn the job up to 7 times within a 5 second period.
265+
# If the job exceeds these values, it will be stopped and marked as failed.
266+
respawn limit 7 5
267+
268+
# zeppelin was installed in /usr/share/zeppelin in this example
269+
chdir /usr/share/zeppelin
270+
exec bin/zeppelin-daemon.sh upstart
271+
```
272+
273+

0 commit comments

Comments
 (0)