Community Articles

Find and share helpful community-sourced technical articles.
Announcements
Celebrating as our community reaches 100,000 members! Thank you!
Labels (1)
avatar
Super Guru

This article describes to store your zeppelin notes in a GitHub repo.

1) Create a GitHub repo where you want to store your zeppelin notes. I have created a repo named 'zeppelin-notes'.

Select ssh for cloning. We will be using ssh key to perform git operations.43741-github-repo-creation.png

2) Copy the ssh public key from the node where Zeppelin is installed and add it in git hub. The command displays the public key and screenshot tells how to add the ssh key to github

# su zeppelin
# cat ~/.ssh/id_rsa.pub

43742-github-ssh-key.png

Click on "New SSH Key" , give a title for the key and paste the content and click save.

3) Clone the git repo in the node where zeppelin is installed and set proper permissions to the folder

su zeppelin
cd /usr/hdp/current/zeppelin-server/
git clone git@github.com:cvr-aditya/zeppelin-notes.git 
chown zeppelin:zeppelin zeppelin-notes
chmod -R 777 zeppelin-notes

4) Change the zeppelin notebook directory path. Go to Ambari -> Zeppelin -> Configs -> Advanced zeppelin-config and set the value for zeppelin.notebook.dir to the git hub repo name (ie zeppelin-notes)

43743-zeppelin-notebook-path.png

5) Change the storage for zeppelin. Go to Ambari -> Zeppelin -> Configs -> Advanced zeppelin-config and set the value for zeppelin.notebook.storage to org.apache.zeppelin.notebook.repo.GitNotebookRepo.

43745-zeppelin-storage.png

Perform steps 4 and 5 and restart Zeppelin

6) Login to zeppelin and create a new Notebook. I named it 'FirstNote'.

7) After making some changes now you may want to commit the note. Click on the icon shown in the screenshot below and write your commit message and click Commit.

43746-commit.png

😎 Check if your commit was successful.

cd /usr/hdp/current/zeppelin-server/zeppelin-notes
git log

43747-commit-check-cmd.png

9) You can check the state of the notebook at a particular commit by setting the revision to the particular commit. Check the screenshot.

43748-commit-check-ui.png

10) You can push your commits to the repo by running the following commands

cd /usr/hdp/current/zeppelin-server/zeppelin-notes
git push origin {branch-name}

Hope this helps 🙂

Refernce : https://help.github.com/articles/adding-a-new-ssh-key-to-your-github-account/

Thanks,

Aditya

16,116 Views
Comments
avatar
New Contributor

Hey, I am unable to change the zeppelin config for some reason. I tried to edit the zeppelin-site.xml.template file in the conf folder, but the changes aren't reflecting in the zepplin even after restarting. Am i missing something?