Skip to content

Zajs/ambari-iframe-view

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

iFrame embedded in Ambari view

Embed any webapp or webpage into Ambari!

Author: Ali Bajwa


Screenshots
  • Remote desktop into your sandbox from within Ambari by combining the view with the VNC stack: Image

    • ...and bring up Ambari in a Firefox browser to create an Ambari Droste effect Image
  • Ranger audits in Ambari Image

  • Beeswax query in Ambari Image

  • iPython Notebook in Ambari - see here for additional iPython notebook instructions Image

  • Document crawler in Ambari Image

  • phpLDAP UI in Ambari Image

  • Tableau visualization in Ambari Image

  • Other ideas:

    • Create an Ambari view of customer website/webapp in front of them to demonstrate ease of setup
    • Demonstrate integration with external webservices: JQuery webapp making external REST calls (in this case to Youtube) from within Ambari View Image
Setup
  • Download HDP 2.2 sandbox VM image (Sandbox_HDP_2.2_VMware.ova) from Hortonworks website
  • Import Sandbox_HDP_2.2_VMware.ova into VMWare and set the VM memory size to 8GB
  • Now start the VM
  • After it boots up, find the IP address of the VM and add an entry into your machines hosts file e.g.
192.168.191.241 sandbox.hortonworks.com sandbox    
  • Connect to the VM via SSH (password hadoop) and start Ambari server
ssh root@sandbox.hortonworks.com
/root/start_ambari.sh
  • Install Maven
curl -o /etc/yum.repos.d/epel-apache-maven.repo https://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo
yum -y install apache-maven
  • To deploy the iFrame view, run below. On non-sandbox env, these steps should be run on node running Ambari server
#Pull code (pom.xml, view.xml, index.html)
cd
git clone https://github.com/abajwa-hw/iframe-view.git
cd iframe-view

#OPTIONAL STEP: change the iframe to point to any website you want. The default is set to Ranger admin (sandbox:6080)
vi src/main/resources/index.html

#OPTIONAL STEP: change the view label that will display in Ambari, or the internal view name. The default is "iFrame View"
vi src/main/resources/view.xml


#Compile view
mvn clean package

#move jar to Ambari dir
cp target/*.jar /var/lib/ambari-server/resources/views
   
  • Restart Ambari
#on HDP 2.2 sandbox
service ambari restart

#on non-sandbox
service ambari-server restart
#change the url here
vi src/main/resources/index.html

#bump up the version e.g. to 1.0.1
vi src/main/resources/view.xml

mvn clean package
cp target/*.jar /var/lib/ambari-server/resources/views

#Now restart Ambari 

#on HDP 2.2 sandbox
service ambari restart
#on non-sandbox
service ambari-server restart

About

Embed any webapp/website as Ambari view!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 100.0%