Installing and configuring Zepplin and Interpreters

Install zepplin notebook using ambari
SSH into the server running Zeppelin.Once SSH-ed into the server, let’s look at the
available interpreters. To view the interpreters, run the following:
# /usr/hdp/current/zeppelin-server/bin/install-interpreter.sh --list
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=512m; support was removed in 8.0

alluxio                 Alluxio interpreter
angular                 HTML and AngularJS view rendering
beam                    Beam interpreter
bigquery                        BigQuery interpreter
cassandra                       Cassandra interpreter built with Scala 2.11
elasticsearch                   Elasticsearch interpreter
file                    HDFS file interpreter
flink                   Flink interpreter built with Scala 2.11
hbase                   Hbase interpreter
ignite                  Ignite interpreter built with Scala 2.11
jdbc                    Jdbc interpreter
kylin                   Kylin interpreter
lens                    Lens interpreter
livy                    Livy interpreter
md                      Markdown support
pig                     Pig interpreter
postgresql                      Postgresql interpreter
python                  Python interpreter
scio                    Scio interpreter
shell                   Shell command
To install an interpreter, run:
# /usr/hdp/current/zeppelin-server/bin/install-interpreter.sh --name elasticsearch

Install elasticsearch(org.apache.zeppelin:zeppelin-elasticsearch:0.7.1) to /usr/hdp/current/zeppelin-server/interpreter/elasticsearch ...
Interpreter elasticsearch installed under /usr/hdp/current/zeppelin-server/interpreter/elasticsearch.

1. Restart Zeppelin
2. Create interpreter setting in 'Interpreter' menu on Zeppelin GUI
3. Then you can bind the interpreter on your note

# /usr/hdp/current/zeppelin-server/bin/install-interpreter.sh --name file

Install file(org.apache.zeppelin:zeppelin-file:0.7.1) to /usr/hdp/current/zeppelin-server/interpreter/file ...
Interpreter file installed under /usr/hdp/current/zeppelin-server/interpreter/file.

1. Restart Zeppelin
2. Create interpreter setting in 'Interpreter' menu on Zeppelin GUI
3. Then you can bind the interpreter on your note

# /usr/hdp/current/zeppelin-server/bin/install-interpreter.sh --name flink

Install flink(org.apache.zeppelin:zeppelin-flink_2.11:0.7.1) to /usr/hdp/current/zeppelin-server/interpreter/flink ...
Interpreter flink installed under /usr/hdp/current/zeppelin-server/interpreter/flink.

1. Restart Zeppelin
2. Create interpreter setting in 'Interpreter' menu on Zeppelin GUI
3. Then you can bind the interpreter on your note

# /usr/hdp/current/zeppelin-server/bin/install-interpreter.sh --name hbase

Install hbase(org.apache.zeppelin:zeppelin-hbase:0.7.1) to /usr/hdp/current/zeppelin-server/interpreter/hbase ...
Interpreter hbase installed under /usr/hdp/current/zeppelin-server/interpreter/hbase.

1. Restart Zeppelin
2. Create interpreter setting in 'Interpreter' menu on Zeppelin GUI
3. Then you can bind the interpreter on your note

# /usr/hdp/current/zeppelin-server/bin/install-interpreter.sh --name jdbc

Directory /usr/hdp/current/zeppelin-server/interpreter/jdbc already exists

Skipped

# /usr/hdp/current/zeppelin-server/bin/install-interpreter.sh --name livy

Directory /usr/hdp/current/zeppelin-server/interpreter/livy already exists

Skipped

# /usr/hdp/current/zeppelin-server/bin/install-interpreter.sh --name pig

Install pig(org.apache.zeppelin:zeppelin-pig:0.7.1) to /usr/hdp/current/zeppelin-server/interpreter/pig ...
Interpreter pig installed under /usr/hdp/current/zeppelin-server/interpreter/pig.

1. Restart Zeppelin
2. Create interpreter setting in 'Interpreter' menu on Zeppelin GUI
3. Then you can bind the interpreter on your note

# /usr/hdp/current/zeppelin-server/bin/install-interpreter.sh --name postgresql

Install postgresql(org.apache.zeppelin:zeppelin-postgresql:0.7.1) to /usr/hdp/current/zeppelin-server/interpreter/postgresql ...
Interpreter postgresql installed under /usr/hdp/current/zeppelin-server/interpreter/postgresql.

1. Restart Zeppelin
2. Create interpreter setting in 'Interpreter' menu on Zeppelin GUI
3. Then you can bind the interpreter on your note

# /usr/hdp/current/zeppelin-server/bin/install-interpreter.sh --name python

Install python(org.apache.zeppelin:zeppelin-python:0.7.1) to /usr/hdp/current/zeppelin-server/interpreter/python ...
Interpreter python installed under /usr/hdp/current/zeppelin-server/interpreter/python.

1. Restart Zeppelin
2. Create interpreter setting in 'Interpreter' menu on Zeppelin GUI
3. Then you can bind the interpreter on your note

# /usr/hdp/current/zeppelin-server/bin/install-interpreter.sh --name shell

Install shell(org.apache.zeppelin:zeppelin-shell:0.7.1) to /usr/hdp/current/zeppelin-server/interpreter/shell ...
Interpreter shell installed under /usr/hdp/current/zeppelin-server/interpreter/shell.

1. Restart Zeppelin
2. Create interpreter setting in 'Interpreter' menu on Zeppelin GUI
3. Then you can bind the interpreter on your note

Restart Zepplin from ambari
To add users:
Login to Ambari UI and then navigate to :
Ambari UI --> Zeppelin Notebook --> Configs --> Advanced --> Advanced zeppelin-shiro-ini
Then add the users inside the "[users]" section as following:
[users]
# List of users with their password allowed to access Zeppelin.
# To use a different strategy (LDAP / Database / ...) check the shiro doc at http://shiro.apache.org/configuration.html
#Configuration-INISections
admin = admin
user1=user1pwd
user2=user2pwd
Also edit the "[urls]" section and add "authBasic" as following to tell which
all URL patterns needs to be protected:
[urls]
# anon means the access is anonymous.
# authcBasic means Basic Auth Security
# To enfore security, comment the line below and uncomment the next one /api/version = anon
#/** = anon
/** = authcBasic

Deactivate the line "/** = anon" and activate the line "/** = authc" in conf/shiro.ini file.

#/** = anon
/** = authc
Groups and permissions (optional)
In case you want to leverage user groups and permissions, use one of the following
configuration for LDAP or AD under [main] segment in shiro.ini
ldapRealm = org.apache.zeppelin.server.LdapGroupRealm
# search base for ldap groups (only relevant for LdapGroupRealm):
ldapRealm.contextFactory.environment[ldap.searchBase] = dc=COMPANY,dc=COM
ldapRealm.contextFactory.url = ldap://ldap.test.com:389
ldapRealm.userDnTemplate = uid={0},ou=Users,dc=COMPANY,dc=COM
ldapRealm.contextFactory.authenticationMechanism = SIMPLE
also define roles/groups that you want to have in system, like below;

[roles]
admin = *
hr = *
finance = *
group1 = *
Secure your Zeppelin information (optional)
By default, anyone who defined in [users] can share Interpreter Setting, Credential
and Configuration information in Apache Zeppelin. Sometimes you might want to hide 
these information for your use case. Since Shiro provides url-based security, you 
can hide the information by commenting or uncommenting these below lines in 
conf/shiro.ini.
[urls]

/api/interpreter/** = authc, roles[admin]
/api/configurations/** = authc, roles[admin]
/api/credential/** = authc, roles[admin]
In this case, only who have admin role can see Interpreter Setting, Credential and Configuration information. If you want to grant this permission to other users, you can change roles[ ] as you defined at [users] section.
0 Comments

There are no comments yet

Leave a comment

Your email address will not be published. Required fields are marked *