blog/2013/09/19/launching-druid-with-apache-whirr.html (200 lines of code) (raw):

<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content="Apache Druid"> <meta name="keywords" content="druid,kafka,database,analytics,streaming,real-time,real time,apache,open source"> <meta name="author" content="Apache Software Foundation"> <title>Druid | Launching Druid With Apache Whirr</title> <link rel="alternate" type="application/atom+xml" href="/feed"> <link rel="shortcut icon" href="/img/favicon.png"> <link rel="stylesheet" href="/assets/css/font-awesome-5.css"> <link href='//fonts.googleapis.com/css?family=Open+Sans+Condensed:300,700,300italic|Open+Sans:300italic,400italic,600italic,400,300,600,700' rel='stylesheet' type='text/css'> <link rel="stylesheet" href="/css/bootstrap-pure.css?v=1.1"> <link rel="stylesheet" href="/css/base.css?v=1.1"> <link rel="stylesheet" href="/css/header.css?v=1.1"> <link rel="stylesheet" href="/css/footer.css?v=1.1"> <link rel="stylesheet" href="/css/syntax.css?v=1.1"> <link rel="stylesheet" href="/css/docs.css?v=1.1"> <script> (function() { var cx = '000162378814775985090:molvbm0vggm'; var gcse = document.createElement('script'); gcse.type = 'text/javascript'; gcse.async = true; gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//cse.google.com/cse.js?cx=' + cx; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(gcse, s); })(); </script> </head> <body> <!-- Start page_header include --> <script src="//ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script> <div class="top-navigator"> <div class="container"> <div class="left-cont"> <a class="logo" href="/"><span class="druid-logo"></span></a> </div> <div class="right-cont"> <ul class="links"> <li class=""><a href="/technology">Technology</a></li> <li class=""><a href="/use-cases">Use Cases</a></li> <li class=""><a href="/druid-powered">Powered By</a></li> <li class=""><a href="/docs/latest/design/">Docs</a></li> <li class=""><a href="/community/">Community</a></li> <li class="header-dropdown"> <a>Apache</a> <div class="header-dropdown-menu"> <a href="https://www.apache.org/" target="_blank">Foundation</a> <a href="https://www.apache.org/events/current-event" target="_blank">Events</a> <a href="https://www.apache.org/licenses/" target="_blank">License</a> <a href="https://www.apache.org/foundation/thanks.html" target="_blank">Thanks</a> <a href="https://www.apache.org/security/" target="_blank">Security</a> <a href="https://www.apache.org/foundation/sponsorship.html" target="_blank">Sponsorship</a> </div> </li> <li class=" button-link"><a href="/downloads.html">Download</a></li> </ul> </div> </div> <div class="action-button menu-icon"> <span class="fa fa-bars"></span> MENU </div> <div class="action-button menu-icon-close"> <span class="fa fa-times"></span> MENU </div> </div> <script type="text/javascript"> var $menu = $('.right-cont'); var $menuIcon = $('.menu-icon'); var $menuIconClose = $('.menu-icon-close'); function showMenu() { $menu.fadeIn(100); $menuIcon.fadeOut(100); $menuIconClose.fadeIn(100); } $menuIcon.click(showMenu); function hideMenu() { $menu.fadeOut(100); $menuIconClose.fadeOut(100); $menuIcon.fadeIn(100); } $menuIconClose.click(hideMenu); $(window).resize(function() { if ($(window).width() >= 840) { $menu.fadeIn(100); $menuIcon.fadeOut(100); $menuIconClose.fadeOut(100); } else { $menu.fadeOut(100); $menuIcon.fadeIn(100); $menuIconClose.fadeOut(100); } }); </script> <!-- Stop page_header include --> <link rel="stylesheet" href="/css/blogs.css"> <div class="blog druid-header"> <div class="row"> <div class="col-md-8 col-md-offset-2"> <div class="title-image-wrap"> </div> </div> </div> </div> <div class="container blog"> <div class="row"> <div class="col-md-8 col-md-offset-2"> <div class="blog-entry"> <h1>Launching Druid With Apache Whirr</h1> <p class="text-muted">by <span class="author text-uppercase">Russell Jurney</span> · September 19, 2013</p> <p>Without Whirr, to launch a Druid cluster, you&#39;d have to provision machines yourself, and then install each node type manually. This process is outlined <a href="https://github.com/metamx/druid/wiki/Tutorial%3A-The-Druid-Cluster">here</a>. With Whirr, you can boot a druid cluster by editing a simple configuration file and then issuing a single command!</p> <h2 id="about-druid">About Druid</h2> <p>Druid is a rockin&#39; exploratory analytical data store capable of offering interactive query of big data in realtime - as data is ingested. Druid cost effectively drives 10&#39;s of billions of events per day for the <a href="http://www.metamarkets.com">Metamarkets</a> platform, and Metamarkets is committed to building Druid in open source.</p> <h2 id="about-apache-whirr">About Apache Whirr</h2> <p>Apache Whirr is a set of libraries for running cloud services. It allows you to use simple commands to boot clusters of distributed systems for testing and experimentation. Apache Whirr makes booting clusters easy.</p> <h2 id="installing-whirr">Installing Whirr</h2> <p>Until Druid is part of an Apache release (a month or two from now) of Whirr, you&#39;ll need to clone the code from <a href="https://github.com/rjurney/whirr/tree/trunk">https://github.com/rjurney/whirr/tree/trunk</a> and build Whirr.</p> <div class="highlight"><pre><code class="language-text" data-lang="text"><span></span>git clone git@github.com:rjurney/whirr.git cd whirr git checkout trunk mvn clean install -Dmaven.test.failure.ignore=true </code></pre></div> <h2 id="configuring-your-cloud-provider">Configuring your Cloud Provider</h2> <p>You&#39;ll need to set these environment variables:</p> <div class="highlight"><pre><code class="language-text" data-lang="text"><span></span>export WHIRR_PROVIDER=aws-ec2 export WHIRR_IDENTITY=$AWS_ACCESS_KEY_ID export WHIRR_CREDENTIAL=$AWS_SECRET_ACCESS_KEY </code></pre></div> <h2 id="build-properties">build.properties</h2> <div class="highlight"><pre><code class="language-text" data-lang="text"><span></span>cat recipes/druid.properties </code></pre></div> <p>Much of the configuration is self explanatory:</p> <div class="highlight"><pre><code class="language-text" data-lang="text"><span></span># Change the cluster name here whirr.cluster-name=druid # Change the number of machines in the cluster here whirr.instance-templates=1 zookeeper+druid-mysql+druid-master+druid-broker+druid-compute+druid-realtime # whirr.instance-templates=3 zookeeper,1 druid-mysql,2 druid-realtime,2 druid-broker,2 druid-master,5 druid-compute # Which version of druid to load whirr.druid.version=0.5.54 # S3 bucket to store segments in whirr.druid.pusher.s3.bucket=dummy_s3_bucket # The realtime.spec file to use to configure a realtime node # whirr.druid.realtime.spec.path=/path/to/druid/examples/config/realtime/realtime.spec </code></pre></div> <p>Note that you can change a cluster&#39;s configuration with the whirr.instance-templates parameter. This enables you to boot clusters large or small. Note that at least one zookeeper and druid-mysql nodes are required.</p> <h2 id="launching-a-druid-cluster-with-whirr">Launching a Druid Cluster with Whirr</h2> <div class="highlight"><pre><code class="language-text" data-lang="text"><span></span>bin/whirr launch-cluster --config recipes/druid.properties </code></pre></div> <p>When the cluster is ready, ssh instructions will print and we can connect and use the cluster. For more instructions on using a Druid cluster, see <a href="https://github.com/metamx/druid/wiki/Querying-your-data">here</a>. To destroy a cluster when we&#39;re done, run:</p> <div class="highlight"><pre><code class="language-text" data-lang="text"><span></span>bin/whirr destroy-cluster --config recipes/druid.properties </code></pre></div> <p>We hope Apache Whirr makes experimenting with Druid easier than ever!</p> </div> </div> </div> </div> <!-- Start page_footer include --> <footer class="druid-footer"> <div class="container"> <div class="text-center"> <p> <a href="/technology">Technology</a>&ensp;·&ensp; <a href="/use-cases">Use Cases</a>&ensp;·&ensp; <a href="/druid-powered">Powered by Druid</a>&ensp;·&ensp; <a href="/docs/latest/">Docs</a>&ensp;·&ensp; <a href="/community/">Community</a>&ensp;·&ensp; <a href="/downloads.html">Download</a>&ensp;·&ensp; <a href="/faq">FAQ</a> </p> </div> <div class="text-center"> <a title="Join the user group" href="https://groups.google.com/forum/#!forum/druid-user" target="_blank"><span class="fa fa-comments"></span></a>&ensp;·&ensp; <a title="Follow Druid" href="https://twitter.com/druidio" target="_blank"><span class="fab fa-twitter"></span></a>&ensp;·&ensp; <a title="GitHub" href="https://github.com/apache/druid" target="_blank"><span class="fab fa-github"></span></a> </div> <div class="text-center license"> Copyright © 2020 <a href="https://www.apache.org/" target="_blank">Apache Software Foundation</a>.<br> Except where otherwise noted, licensed under <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">CC BY-SA 4.0</a>.<br> Apache Druid, Druid, and the Druid logo are either registered trademarks or trademarks of The Apache Software Foundation in the United States and other countries. </div> </div> </footer> <script async src="https://www.googletagmanager.com/gtag/js?id=UA-131010415-1"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'UA-131010415-1'); </script> <script> function trackDownload(type, url) { ga('send', 'event', 'download', type, url); } </script> <script src="//code.jquery.com/jquery.min.js"></script> <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script> <script src="/assets/js/druid.js"></script> <!-- stop page_footer include --> </body> </html>