leveraging ambari to build comprehensive management uis
play

Leveraging Ambari to Build Comprehensive Management UIs For Your - PowerPoint PPT Presentation

Leveraging Ambari to Build Comprehensive Management UIs For Your Hadoop Applications by Christian Tzolov @christzolov Whoami Christian Tzolov Technical Architect at Pivotal, BigData, Hadoop, SpringXD, Apache Committer, Crunch PMC member


  1. Leveraging Ambari to Build Comprehensive Management UIs For Your Hadoop Applications by Christian Tzolov @christzolov

  2. Whoami Christian Tzolov Technical Architect at Pivotal, BigData, Hadoop, SpringXD, Apache Committer, Crunch PMC member ctzolov@pivotal.io blog.tzolov.net @christzolov

  3. How To Provision , Manage And Monitor Enterprise Applications At Scale ?

  4. Contents • Ambari Overview • Stacks and Services (demo) • Blueprints (demo) • Views (demo) • Metrics & Monitoring • On the Cloud

  5. Apache Ambari A platform to provision , manage and monitor Hadoop and Enterprise Applications

  6. Deployment Topology admin node Ambari Web (REST API) Ambari Server cluster node 1 cluster node 2 cluster node N Ambari Agent Ambari Agent Ambari Agent

  7. Special Powers Services & Stacks Monitoring Blueprints Views

  8. Services & Stacks

  9. Service Concepts • Stack - Set of (managed) Services and software packages for them • Service - Set of (distributed) Components • Component - Service building block of type Master, Slave, Client

  10. Service Architecture

  11. Service Layout • metainfo.xml - defines service, |_ services components and the |_ <service_name> metainfo.xml command management metrics.json scripts |_ configuration {configuration files} |_ package • configuration - service config |_ scripts files used in and deployed {command scripts} through the command scripts • package/scripts - commandScripts and templates.

  12. Metainfo.xml <metainfo> <components> <schemaVersion/> <component> <services> <name>CUST_MASTER</name> <service> <displayName>Master</displayName> <category> MASTER </category> <name/> <cardinality>1</cardinality> <displayName/> < commandScript > <comment/> <script> scripts/master.py </script> <version/> <scriptType>PYTHON</scriptType> < components /> <timeout>600</timeout> <osSpecifics/> </ commandScript > <commandScript/> </component> <requiredServices/> ……… <configuration-dependencies/> </components> </service> </services> </metainfo>

  13. Service / Command Script import sys import sys from resource_management import * from resource_management import * class Master (Script): class Slave (Script): def install (self, env): def install (self, env): def stop (self, env): def stop (self, env): def start (self, env): def start (self, env): def status (self, env): def status (self, env): def configure (self, env): def configure (self, env): if __name__ == "__main__": if __name__ == "__main__": Master().execute() Slave().execute()

  14. Service / Demo

  15. Ambari Blueprint

  16. Why? • Installation Automation • Declarative definition of a cluster • Specify a Stack , the Component layout and the Configurations to materialize a cluster • REST API

  17. Blueprint Flow REST API Blueprint Host Mapping (json) (json) Ambari Server Cluster 1 Cluster 2 Cluster Z node 1 node 2 node N . . . . . . . .

  18. Blueprint Deploy POST /api/v1/ blueprints /my-blueprint POST /api/v1/ clusters /my-cluster { "Blueprints" : { { "stack_name" : "PHD", "blueprint" : "hdfs-hawq-blueprint", "stack_version" : "3.0" "default_password" : "secret-password", }, "host_groups" : [ "configurations" : [ { { "hawq-site" : { "name" : " management_masters ", "properties" : { "hawq.master.port" : "5532" } "hosts": [ { "fqdn":"ambari.localdomain" } ] } }, } { ], "name" : "masters_workers", "host_groups" : [ "hosts": [ { "fqdn":"phd1.localdomain" }, { "name" : " management_masters ", { "fqdn":"phd2.localdomain" }, "components" : [ { "fqdn":"phd3.localdomain" } ] { "name" : "NAMENODE" }, } { "name" : "HAWQMASTER" } ] ], } "cardinality" : "1" }, …… ]}

  19. Blueprint REST API Cluster Logical Structure and /api/v1/blueprint configuration Physical cluster mapping. /api/v1/cluster Materializes a blueprint with real infrastructure /api/v1/clusters/<cluster name>? Exports blueprint for an existing format = blueprint cluster

  20. Blueprint Demo

  21. Ambari Views

  22. View Components • Client Side - any client-side Ambari Web technologies Client Side VIEW PACKAGE (JAR) • Server Side - Java application, (js,html..) Servlet, a REST service or REST API ResourceProvider. context • View Package - JAR bundles of Server Side the view definition and resources (java) Ambari Server • View Context - Instance attributes and configuration

  23. View Package view.xml <server packages + classes> index.html <supporting UI assets> WEB-INF (lib/*.jar)

  24. View Context • On the Server Side ViewContext getUsername() : String • View-instance Config getViewName() : String getInstanceName() : String getProperties() : Map<String,String> putInstanceData(…) • View-instance Attributes getInstanceData(…) : String • Execution context, authenticated user principal

  25. View Dashboard

  26. View REST API GET /api/v1/views List deployed views List all View GET /api/v1/views/<View Name> instances GET /api/v1/views/< View Name >/versions/< View Show specific View Version > instance POST /api/v1/views/< View Name >/versions/< View Create new View Version >/instances/< Instance Name > Instance [{“ViewInstanceInfo":{ "properties" : { "dataworker.defaultFs":“webhdfs://namenode.host:50070" }}}]

  27. Google Polymer https://www.polymer-project.org/1.0/

  28. View Demo https://github.com/tzolov/ambari-webpage- embedder-view https://youtu.be/qaR_6OBeKsQ

  29. Ambari Monitoring

  30. Ambari Metrics System Collect, Aggregate and Serve System Metrics • Metric Collector - Collects and Aggregates • Metric Monitor - System-level metrics • Metric Hadoop Sinks - Service-level metrics

  31. AMS Architecture

  32. Ambari & Cloud

  33. Virtualization & Cloud • Vagrant - PivotalHD (https://github.com/tzolov/ vagrant-pivotalhd) • Cloudbreak (http://sequenceiq.com/ cloudbreak/)

  34. Thank You!

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend