Apache Zeppelin | Getting Started

First Steps with Zeppelin

Zeppelin and MySQL

Create a new Interpreter

Create a new interpreter

or confgure existing mysql interpreter

Configure Mysql Interpreter

Under artifact, add absoulte path of mysql-connector-java-8.0.19.jar.

Add/modify properties for

default.user

default.password

Prepare MySQL Database

Create a database user spark with password spark

Create a database spark wirth all permissions to user spark

Add demo values

Test Mysql Conection

Create a new notebook with mysql interpreter

Write sample code

select * from spark.demo;

Installation

Install with Docker

docker run -p 8080:8080 — rm — name zeppelin apache/zeppelin:0.8.1

Set docker volume options to persist notebooks and logs like

docker run -p 8080:8080 — rm -v $PWD/logs:/logs -v $PWD/notebook:/notebook -e ZEPPELIN_LOG_DIR=’/logs’ -e ZEPPELIN_NOTEBOOK_DIR=’/notebook’ — name zeppelin apache/zeppelin:0.8.1

Install in a vagrant box

Setup base Vagrant Box

vagrant init ubuntu/trusty64
vagrant up
vagrant ssh

Update Operating System

sudo apt-get update -y
sudo apt-get upgrade -y

Install the Vagrant Key

The only way that all the vagrant commands will be able to communicate over ssh from the host machine to the guest server is if the guest server has this “insecure vagrant key” installed. It’s called “insecure” because essentially everyone has this same key and anyone can hack into everyone’s vagrant box if you use it.

mkdir -p /home/vagrant/.ssh
chmod 0700 /home/vagrant/.ssh
wget --no-check-certificate \
    https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub \
    -O /home/vagrant/.ssh/authorized_keys
chmod 0600 /home/vagrant/.ssh/authorized_keys
chown -R vagrant /home/vagrant/.ssh

Install Zeppelin and required Software

Detailed description can be found here.

sudo apt-get install -y gcc build-essential linux-headers-server
sudo apt-get install git
sudo apt-get install openjdk-7-jdk
sudo apt-get install npm
sudo apt-get install libfontconfig
sudo apt-get install r-base-dev
sudo apt-get install r-cran-evaluate
git clone https://github.com/apache/zeppelin.git
sudo apt-get -y install maven
mvn clean package -DskipTests -Pspark-2.0 -Phadoop-2.4 -Pr -Pscala-2.11

Configure Zeppelin