Skip to content

Commit

Permalink
Merge branch 'master' into feat/revision-view
Browse files Browse the repository at this point in the history
  • Loading branch information
khalidhuseynov committed Jan 3, 2017
2 parents bbaf286 + 355387a commit 6b8e1f6
Show file tree
Hide file tree
Showing 40 changed files with 924 additions and 137 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ zeppelin-web/src/fonts/source-code-pro*
zeppelin-web/src/fonts/patua-one*
zeppelin-web/src/fonts/google-fonts.css
zeppelin-web/.sass-cache
zeppelin-web/npm-debug.log
zeppelin-web/bower_components
**nbproject/
**node/
Expand Down
15 changes: 0 additions & 15 deletions conf/README.md

This file was deleted.

184 changes: 158 additions & 26 deletions docs/install/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,9 @@ Two binary packages are available on the [Apache Zeppelin Download Page](http://

Unpack and follow [install additional interpreters](../manual/interpreterinstallation.html) to install interpreters. If you're unsure, just run `./bin/install-interpreter.sh --all` and install all interpreters.

## Starting Apache Zeppelin from the Command Line
#### Starting Apache Zeppelin
## Starting Apache Zeppelin

#### Starting Apache Zeppelin from the Command Line

On all unix like platforms:

Expand All @@ -79,6 +80,48 @@ After Zeppelin has started successfully, go to [http://localhost:8080](http://lo
bin/zeppelin-daemon.sh stop
```

#### Start Apache Zeppelin with a service manager

> **Note :** The below description was written based on Ubuntu Linux.
Apache Zeppelin can be auto-started as a service with an init script, using a service manager like **upstart**.

This is an example upstart script saved as `/etc/init/zeppelin.conf`
This allows the service to be managed with commands such as

```
sudo service zeppelin start
sudo service zeppelin stop
sudo service zeppelin restart
```

Other service managers could use a similar approach with the `upstart` argument passed to the `zeppelin-daemon.sh` script.

```
bin/zeppelin-daemon.sh upstart
```

**zeppelin.conf**

```
description "zeppelin"
start on (local-filesystems and net-device-up IFACE!=lo)
stop on shutdown
# Respawn the process on unexpected termination
respawn
# respawn the job up to 7 times within a 5 second period.
# If the job exceeds these values, it will be stopped and marked as failed.
respawn limit 7 5
# zeppelin was installed in /usr/share/zeppelin in this example
chdir /usr/share/zeppelin
exec bin/zeppelin-daemon.sh upstart
```


## Next Steps

Congratulations, you have successfully installed Apache Zeppelin! Here are few steps you might find useful:
Expand Down Expand Up @@ -109,6 +152,11 @@ Congratulations, you have successfully installed Apache Zeppelin! Here are few s
* If you're using previous version please see [Upgrade Zeppelin version](./upgrade.html).


## Building Apache Zeppelin from Source

If you want to build from source instead of using binary package, follow the instructions [here](./build.html).


## Apache Zeppelin Configuration

You can configure Apache Zeppelin with either **environment variables** in `conf/zeppelin-env.sh` (`conf\zeppelin-env.cmd` for Windows) or **Java properties** in `conf/zeppelin-site.xml`. If both are defined, then the **environment variables** will take priority.
Expand Down Expand Up @@ -339,48 +387,132 @@ You can configure Apache Zeppelin with either **environment variables** in `conf
</table>


#### Start Apache Zeppelin with a service manager
## Apache Zeppelin Configuration to enable SSL

> **Note :** The below description was written based on Ubuntu Linux.
Enabling SSL requires a few configuration changes. First you need to create certificates and then update necessary configurations to enable server side SSL and/or client side certificate authentication.

Apache Zeppelin can be auto-started as a service with an init script, using a service manager like **upstart**.
#### Creating and configuring the Certificates

This is an example upstart script saved as `/etc/init/zeppelin.conf`
This allows the service to be managed with commands such as
Information how about to generate certificates and a keystore can be found [here](https://wiki.eclipse.org/Jetty/Howto/Configure_SSL).

A condensed example can be found in the top answer to this [StackOverflow post](http://stackoverflow.com/questions/4008837/configure-ssl-on-jetty).

The keystore holds the private key and certificate on the server end. The trustore holds the trusted client certificates. Be sure that the path and password for these two stores are correctly configured in the password fields below. They can be obfuscated using the Jetty password tool. After Maven pulls in all the dependency to build Zeppelin, one of the Jetty jars contain the Password tool. Invoke this command from the Zeppelin home build directory with the appropriate version, user, and password.

```
sudo service zeppelin start
sudo service zeppelin stop
sudo service zeppelin restart
java -cp ./zeppelin-server/target/lib/jetty-all-server-<version>.jar org.eclipse.jetty.util.security.Password <user> <password>
```

Other service managers could use a similar approach with the `upstart` argument passed to the `zeppelin-daemon.sh` script.
If you are using a self-signed, a certificate signed by an untrusted CA, or if client authentication is enabled, then the client must have a browser create exceptions for both the normal HTTPS port and WebSocket port. This can by done by trying to establish an HTTPS connection to both ports in a browser (i.e. if the ports are 443 and 8443, then visit https://127.0.0.1:443 and https://127.0.0.1:8443). This step can be skipped if the server certificate is signed by a trusted CA and client auth is disabled.

#### Configuring server side SSL

The following properties needs to be updated in the **zeppeling-site.xml** in order to enable server side SSL.

```
bin/zeppelin-daemon.sh upstart
<property>
<name>zeppelin.server.ssl.port</name>
<value>8443</value>
<description>Server ssl port. (used when ssl property is set to true)</description>
</property>
<property>
<name>zeppelin.ssl</name>
<value>true</value>
<description>Should SSL be used by the servers?</description>
</property>
<property>
<name>zeppelin.ssl.keystore.path</name>
<value>keystore</value>
<description>Path to keystore relative to Zeppelin configuration directory</description>
</property>
<property>
<name>zeppelin.ssl.keystore.type</name>
<value>JKS</value>
<description>The format of the given keystore (e.g. JKS or PKCS12)</description>
</property>
<property>
<name>zeppelin.ssl.keystore.password</name>
<value>change me</value>
<description>Keystore password. Can be obfuscated by the Jetty Password tool</description>
</property>
<property>
<name>zeppelin.ssl.key.manager.password</name>
<value>change me</value>
<description>Key Manager password. Defaults to keystore password. Can be obfuscated.</description>
</property>
```

**zeppelin.conf**

#### Enabling client side certificate authentication

The following properties needs to be updated in the **zeppeling-site.xml** in order to enable client side certificate authentication.

```
description "zeppelin"
<property>
<name>zeppelin.server.ssl.port</name>
<value>8443</value>
<description>Server ssl port. (used when ssl property is set to true)</description>
</property>
<property>
<name>zeppelin.ssl.client.auth</name>
<value>true</value>
<description>Should client authentication be used for SSL connections?</description>
</property>
<property>
<name>zeppelin.ssl.truststore.path</name>
<value>truststore</value>
<description>Path to truststore relative to Zeppelin configuration directory. Defaults to the keystore path</description>
</property>
<property>
<name>zeppelin.ssl.truststore.type</name>
<value>JKS</value>
<description>The format of the given truststore (e.g. JKS or PKCS12). Defaults to the same type as the keystore type</description>
</property>
<property>
<name>zeppelin.ssl.truststore.password</name>
<value>change me</value>
<description>Truststore password. Can be obfuscated by the Jetty Password tool. Defaults to the keystore password</description>
</property>
```

start on (local-filesystems and net-device-up IFACE!=lo)
stop on shutdown

# Respawn the process on unexpected termination
respawn
#### Obfuscating Passwords using the Jetty Password Tool

# respawn the job up to 7 times within a 5 second period.
# If the job exceeds these values, it will be stopped and marked as failed.
respawn limit 7 5
Security best practices advise to not use plain text passwords and Jetty provides a password tool to help obfuscating the passwords used to access the KeyStore and TrustStore.

The Password tool documentation can be found [here](http://www.eclipse.org/jetty/documentation/current/configuring-security-secure-passwords.html)

After using the tool:

# zeppelin was installed in /usr/share/zeppelin in this example
chdir /usr/share/zeppelin
exec bin/zeppelin-daemon.sh upstart
```
java -cp $ZEPPELIN_HOME/zeppelin-server/target/lib/jetty-util-9.2.15.v20160210.jar \
org.eclipse.jetty.util.security.Password \
password
2016-12-15 10:46:47.931:INFO::main: Logging initialized @101ms
password
OBF:1v2j1uum1xtv1zej1zer1xtn1uvk1v1v
MD5:5f4dcc3b5aa765d61d8327deb882cf99
```

update your configuration with the obfuscated password :

## Building from Source
```
<property>
<name>zeppelin.ssl.keystore.password</name>
<value>OBF:1v2j1uum1xtv1zej1zer1xtn1uvk1v1v</value>
<description>Keystore password. Can be obfuscated by the Jetty Password tool</description>
</property>
```

If you want to build from source instead of using binary package, follow the instructions [here](./build.html).

**Note:** After updating these configurations, Zeppelin server needs to be restarted.
Original file line number Diff line number Diff line change
Expand Up @@ -76,23 +76,6 @@ public class IgniteInterpreter extends Interpreter {

static final String IGNITE_CFG_URL = "ignite.config.url";

static {
Interpreter.register(
"ignite",
"ignite",
IgniteInterpreter.class.getName(),
true,
new InterpreterPropertyBuilder()
.add(IGNITE_ADDRESSES, "127.0.0.1:47500..47509",
"Coma separated list of addresses "
+ "(e.g. 127.0.0.1:47500 or 127.0.0.1:47500..47509)")
.add(IGNITE_CLIENT_MODE, "true", "Client mode. true or false")
.add(IGNITE_CFG_URL, "", "Configuration URL. Overrides all other settings.")
.add(IGNITE_PEER_CLASS_LOADING_ENABLED, "true",
"Peer class loading enabled. true or false")
.build());
}

private Logger logger = LoggerFactory.getLogger(IgniteInterpreter.class);
private Ignite ignite;
private ByteArrayOutputStream out;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,6 @@ public class IgniteSqlInterpreter extends Interpreter {

static final String IGNITE_JDBC_URL = "ignite.jdbc.url";

static {
Interpreter.register(
"ignitesql",
"ignite",
IgniteSqlInterpreter.class.getName(),
new InterpreterPropertyBuilder()
.add(IGNITE_JDBC_URL,
"jdbc:ignite:cfg://default-ignite-jdbc.xml", "Ignite JDBC connection URL.")
.build());
}

private Logger logger = LoggerFactory.getLogger(IgniteSqlInterpreter.class);

private Connection conn;
Expand Down
46 changes: 46 additions & 0 deletions ignite/src/main/resources/interpreter-setting.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
[
{
"group": "ignite",
"name": "ignite",
"className": "org.apache.zeppelin.ignite.IgniteInterpreter",
"properties": {
"ignite.addresses": {
"envName": null,
"propertyName": "ignite.addresses",
"defaultValue": "127.0.0.1:47500..47509",
"description": "Comma separated list of addresses (e.g. 127.0.0.1:47500 or 127.0.0.1:47500..47509)"
},
"ignite.clientMode": {
"envName": null,
"propertyName": "ignite.clientMode",
"defaultValue": "true",
"description": "Client mode. true or false"
},
"ignite.config.url": {
"envName": null,
"propertyName": "ignite.config.url",
"defaultValue": "",
"description": "Configuration URL. Overrides all other settings."
},
"ignite.peerClassLoadingEnabled": {
"envName": null,
"propertyName": "ignite.peerClassLoadingEnabled",
"defaultValue": "true",
"description": "Peer class loading enabled. True or false"
}
}
},
{
"group": "ignite",
"name": "ignitesql",
"className": "org.apache.zeppelin.ignite.IgniteSqlInterpreter",
"properties": {
"ignite.jdbc.url": {
"envName": null,
"propertyName": "ignite.jdbc.url",
"defaultValue": "jdbc:ignite:cfg://default-ignite-jdbc.xml",
"description": "Ignite JDBC connection URL."
}
}
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ public void setUp() {
props.setProperty(IgniteSqlInterpreter.IGNITE_JDBC_URL, "jdbc:ignite:cfg://cache=person@default-ignite-jdbc.xml");
props.setProperty(IgniteInterpreter.IGNITE_CLIENT_MODE, "false");
props.setProperty(IgniteInterpreter.IGNITE_PEER_CLASS_LOADING_ENABLED, "false");
props.setProperty(IgniteInterpreter.IGNITE_ADDRESSES, HOST);

intp = new IgniteInterpreter(props);
intp.open();
Expand Down

0 comments on commit 6b8e1f6

Please sign in to comment.