Apache Zeppelin on OCI with MDS

Apache Zeppelin is a web-based notebook that enables data-driven,
 interactive data analytics, machine learning, and collaborative documents with SQL, Scala, Python, R.

Today we will see how we can deploy Apache Zeppelin on a Compute instance in Oracle Cloud Infrastructure (OCI) using MySQL Database Service (MDS).

You can manually deploy a compute instance and install zeppelin on it then connect to MySQL Database Service or you can use the Terraform modules I’m sharing on GitHub: https://github.com/lefred/oci-zeppelin-mds

Finally you can also deploy all this by just clicking on the follow button to use OCI’s Ressource Manager Stack. This is the easiest and recommended way to deploy all the resources you need. From the instances to the VCN and security lists.

Start by clicking on this button: Deploy to Oracle Cloud

Resource Manager

Once you click on the button, after being authenticated to OCI, you will see a similar screen:

You need to accept the Oracle Terms of Use, some fields will be automatically filled and you can click on “Next”:

Now will will reach a form to configure some variables:

Fill the required fields. You also have the possibility to deploy a High Available setup for your MDS instance or a HeatWave Cluster (if you use a compatible shape). We will see that later, for the moment just fill the passwords and click “Next”:

You will get a review panel, you can enable the apply of the stack and click on “Create”:

Now, OCI will create all the resources, Zeppellin will be installed and MySQL Connector/J will also be installed to be used with Zeppelin.

Connecting to Zeppelin

When the stack is created and applied, you will have some important output information that you need to be able to connect to the environment we just deployed:

You just need to use that public ip in your browser and you will reach Zeppelin:

Add the MySQL Interpreter

MySQL Connector/J is installed but we need to create an interpreter to use it with Zeppelin.

We first click on the top right and choose “Interpreter”:

Then we click on “+Create”:

We then fill with the following information:

As you can see, we use the jdbc interpreter group and the driver is com.mysql.jdbc.Driver. We also need to specify the IP of the MDS instance.

And finally, we also need to specify MySQL Connector/J as dependency (/opt/zeppelin/interpreter/mysql/mysql-connector-java.jar):

Create a Notebook

We are now ready to create our first Notebook. I’ve loaded the example airport-db on my MDS instance using the Compute instance where MySQL Shell is also installed already by the Stack.

And we need to select our new Interpreter:

We can start with a simple query:

Excellent, now we can use different queries to create some visualization of the data:


As you can see, it’s very easy to deploy Apache Zeppelin on OCI with MySQL Database Service as back-end.

On the next article, we will see how we can enable MySQL Heatwave to speed up all the processed queries when creating large Notebooks.

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

One comment

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.

As MySQL Community Manager, I am an employee of Oracle and the views expressed on this blog are my own and do not necessarily reflect the views of Oracle.

You can find articles I wrote on Oracle’s blog.