<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Michael Arnold on Medium]]></title>
        <description><![CDATA[Stories by Michael Arnold on Medium]]></description>
        <link>https://medium.com/@hadoopgeek?source=rss-13754b6725c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*9oQGBygV5kWXt_xI.</url>
            <title>Stories by Michael Arnold on Medium</title>
            <link>https://medium.com/@hadoopgeek?source=rss-13754b6725c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 07:55:04 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@hadoopgeek/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[AWS CloudShell and Terraform]]></title>
            <link>https://medium.com/clairvoyantblog/aws-cloudshell-and-terraform-18eb8b41041f?source=rss-13754b6725c------2</link>
            <guid isPermaLink="false">https://medium.com/p/18eb8b41041f</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[terraform]]></category>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[cloud-shell]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <dc:creator><![CDATA[Michael Arnold]]></dc:creator>
            <pubDate>Fri, 08 Jan 2021 16:27:34 GMT</pubDate>
            <atom:updated>2021-07-20T17:21:03.900Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/128/0*zubvVM8LWYvVRtjS" /></figure><p>Amazon has a new service that can make using <a href="https://www.terraform.io/">Hashicorp Terraform</a> even easier. From the AWS service page:</p><blockquote><a href="https://aws.amazon.com/cloudshell/"><em>AWS CloudShell</em></a><em> is a browser-based shell that makes it easy to securely manage, explore, and interact with your AWS resources. CloudShell is pre-authenticated with your console credentials. Common development and operations tools are pre-installed, so no local installation or configuration is required.</em></blockquote><p>Unfortunately, Terraform is not installed by default. But we can fix that very easily!</p><p>wget <a href="https://releases.hashicorp.com/terraform/0.14.4/terraform_0.14.4_linux_amd64.zip">https://releases.hashicorp.com/terraform/0.14.4/terraform_0.14.4_linux_amd64.zip</a><br> unzip terraform_0.14.4_linux_amd64.zip<br> mkdir ~/bin<br> mv terraform ~/bin</p><p>Or, using my favorite, <a href="https://github.com/tfutils/tfenv">tfenv</a>:</p><p>git clone <a href="https://github.com/tfutils/tfenv.git">https://github.com/tfutils/tfenv.git</a> ~/.tfenv<br> mkdir ~/bin<br> ln -s ~/.tfenv/bin/* ~/bin/<br> tfenv install</p><p>And that is it! You do not need to use Access Key / Secret Access Key as the CloudShell is running as your AWS Management Console user/role. Also, beware of installing code outside of $HOME as it will not persist across sessions.</p><p><em>Originally published at </em><a href="https://intelligentsysadmin.wordpress.com/2021/01/08/aws-cloudshell-and-terraform/"><em>http://intelligentsysadmin.wordpress.com</em></a><em> on January 8, 2021.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=18eb8b41041f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/clairvoyantblog/aws-cloudshell-and-terraform-18eb8b41041f">AWS CloudShell and Terraform</a> was originally published in <a href="https://medium.com/clairvoyantblog">Clairvoyant Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Swap and Hadoop]]></title>
            <link>https://medium.com/clairvoyantblog/swap-and-hadoop-5b8ecf6d9826?source=rss-13754b6725c------2</link>
            <guid isPermaLink="false">https://medium.com/p/5b8ecf6d9826</guid>
            <category><![CDATA[swap]]></category>
            <category><![CDATA[hadoop]]></category>
            <category><![CDATA[big-data]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[apache-hadoop]]></category>
            <dc:creator><![CDATA[Michael Arnold]]></dc:creator>
            <pubDate>Tue, 23 Jun 2020 21:41:09 GMT</pubDate>
            <atom:updated>2023-01-26T19:06:40.914Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/128/0*tYO9rYklRdLRQCGX" /></figure><p><strong>TL;DR</strong> : Turn off swap completely. A properly designed and tuned Hadoop system will not need it.</p><p>So there you are, minding your Hadoop cluster, when alerts start to come in: The hosts are swapping! Oh, the horror! The end is nigh! Why do we even have this horrible swap space?</p><p>But all is not lost. Read on for a short history lesson and a mind-boggling revelation.</p><h3>What is Swap Space?</h3><p>Simply put, <a href="http://www.catb.org/~esr/jargon/html/S/swap.html">swap</a> is a substitute of disk space for random access memory (RAM). You carve out a disk partition or create a file on your local filesystem and tell your operating system to use it in cases where your RAM fills up. Programs in RAM which are not actively in use are then copied (swapped) into the disk partition. The data stays there until the operating system again needs it to resume running the program.</p><h3>Why Do We Need Swap?</h3><p>A better question that should be asked is, do we still need it? Swap was devised decades ago to allow hosts to augment the system’s tiny amounts of RAM. A entire program would be “swapped out” of RAM onto the local hard disk so that another program would be able to run. When the second program finished or paused its execution, it would be swapped out and the first program swapped back into RAM. This was great when your system only had 4 MiB of RAM and a 120 MB disk.</p><p>Today, Hadoop systems can easily have 256 GiB RAM. There exists no program that requires that amount of memory just to execute. The challenge is more about fitting our growing datasets into RAM. With Hadoop processing, data is sliced up into small chunks that can easily fit into memory. This is usually 128 MiB, but it all depends on the Hadoop subsystem and its configuration.</p><h3>What Should We Do For Hadoop?</h3><p>If you were to think that swap is bad for performance, you would be correct. <a href="https://qr.ae/pNKtGJ">Swap is a performance killer.</a></p><p>For Hadoop systems it is standard practice to tune the OS and set <a href="https://docs.cloudera.com/documentation/enterprise/latest/topics/cdh_admin_performance.html#cdh_performance__section_xpq_sdf_jq">vm.swappiness=1</a>, however this is insufficient to stop the system from swapping. Swappiness simply controls how aggressively the system favors memory verses the page cache (swap). In order to <strong>guarantee</strong> that the system will not swap, you have to disable all of the swap spaces. This means removing any mention of swap from /etc/fstab and running the command swapoff -a (or rebooting the system).</p><h3>Rebuttals (Or Why This Might Make Your SysAdmin Unhappy)</h3><p>Now I know there are a lot of SysAdmins out there who will want to argue with this advice. We have been told for ages that every system needs swap. It is a notable build step for every Unix and Linux distribution’s installation. There is quite a bit of hard-earned opinion in determining just how much swap space a given RAM configuration will require for a particular operating system. But that makes the practice no less antiquated in the year 2020.</p><p>Some will argue about what will happen to the system when available memory is low. If the system does not have enough memory to allocate and there is no swap space, then there will be a failure to allocate memory.</p><p>To this I say: Tune the apps! The Hadoop applications (HDFS NameNode, HBase RegionServer, Impala Daemon, etc) need to have memory limits in place (Java max heap/mem_limit) in order to stay below the amount of physical RAM in the system. If the applications need more RAM, then put more in the machine. If that is not possible, then lower the application’s memory limit.</p><p>Some will argue about the Linux <a href="https://www.kernel.org/doc/gorman/html/understand/understand016.html">Out Of Memory</a> killer (OOM). How having swap space will somehow save the system from having one of its programs terminated when the system runs low on available RAM. The argument is that swap will allow an admin to log in to the host and attempt to fix the problem.</p><p>To this I say: Nonsense! It usually takes dozens of minutes if not outright hours to get logged into a <a href="http://www.catb.org/~esr/jargon/html/T/thrash.html">thrashing</a>, memory overcommitted system and just as long to recover. By the time the admin logs in, the host will have been ejected from the Hadoop cluster. No, a Hadoop system would rather have a task, query fragment, or daemon swiftly terminated rather than suffer the performance impact of swapping.</p><p>It can be difficult to get years (if not decades) de facto operation out of one’s head and take a fresh look at the situation. It reminds me too much of <a href="https://despair.com/products/tradition">Tradition</a> from Despair, Inc.: We have been doing it this way for a long time. Now it is time to stop and reconsider our assumptions.</p><h3>TL;DR</h3><p>Turn off swap completely. A properly designed and tuned Hadoop system will not need it.</p><h3>Update</h3><p>And the idea was already <a href="https://books.google.com/books?id=_PApCgAAQBAJ&amp;lpg=PT523&amp;ots=PdExrlDkdW&amp;dq=hadoop%20swap&amp;pg=PT523#v=onepage&amp;q=hadoop%20swap&amp;f=false">in a book</a> years ago, so its not like removing swap is a new concept.</p><p><em>Originally published at </em><a href="https://intelligentsysadmin.wordpress.com/2020/06/23/swap-and-hadoop/"><em>http://intelligentsysadmin.wordpress.com</em></a><em> on June 23, 2020.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5b8ecf6d9826" width="1" height="1" alt=""><hr><p><a href="https://medium.com/clairvoyantblog/swap-and-hadoop-5b8ecf6d9826">Swap and Hadoop</a> was originally published in <a href="https://medium.com/clairvoyantblog">Clairvoyant Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Things to Come From the Cloudera/Hortonworks Merger]]></title>
            <link>https://medium.com/clairvoyantblog/things-to-come-from-the-cloudera-hortonworks-merger-8a0035adbf3b?source=rss-13754b6725c------2</link>
            <guid isPermaLink="false">https://medium.com/p/8a0035adbf3b</guid>
            <category><![CDATA[hortonworks]]></category>
            <category><![CDATA[predictions]]></category>
            <category><![CDATA[big-data]]></category>
            <category><![CDATA[cloudera]]></category>
            <category><![CDATA[hadoop]]></category>
            <dc:creator><![CDATA[Michael Arnold]]></dc:creator>
            <pubDate>Sat, 16 Feb 2019 03:53:58 GMT</pubDate>
            <atom:updated>2019-03-01T00:44:20.238Z</atom:updated>
            <cc:license>https://creativecommons.org/licenses/by-nc-sa/4.0/</cc:license>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*51Twl4ZP1ICXFPG9iZnRgg.png" /></figure><p>Now that the two Hadoop distribution giants have merged, it is time to call out what will happen to their overlapping software offerings. The following are my predictions:</p><p><strong>Ambari is out — replaced by Cloudera Manager.<br></strong>This is a no-brainer for anyone that has used the two tools. People can rant and rave about open source and freedom all they want, but Cloudera Manager is light-years ahead of Ambari in terms of functionality and features. I mean, Ambari can only deploy a single cluster. CM can deploy multiple clusters. And the two features I personally use the most in my job as a consultant are nowhere to be found in Ambari: Host/Role layout and a non-default Configuration view.</p><p><strong>Tez is out — replaced by Spark.<br></strong>Cloudera has already declared that Spark has replaced MapReduce. There is little reason for Tez to remain as a Hive execution engine when Spark does the same things and can also be used for general computation outside of Hive.</p><p><strong>Hive LLAP is out — replaced by Impala.<br></strong>Similar to Tez, there is no reason to keep interactive query performance tools for Hive around when Impala was designed to do just that. Remember: Hive is for batch and Impala is for exploration.</p><p>What do you think? Leave your thoughts in the comments.</p><p><em>Originally published at </em><a href="https://intelligentsysadmin.wordpress.com/2019/02/15/things-to-come-from-the-cloudera-hortonworks-merger/"><em>intelligentsysadmin.wordpress.com</em></a><em> on February 16, 2019</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8a0035adbf3b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/clairvoyantblog/things-to-come-from-the-cloudera-hortonworks-merger-8a0035adbf3b">Things to Come From the Cloudera/Hortonworks Merger</a> was originally published in <a href="https://medium.com/clairvoyantblog">Clairvoyant Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Impala Load Balancing with Amazon Elastic Load Balancer]]></title>
            <link>https://medium.com/clairvoyantblog/impala-load-balancing-with-amazon-elastic-load-balancer-1ab79d91c5d2?source=rss-13754b6725c------2</link>
            <guid isPermaLink="false">https://medium.com/p/1ab79d91c5d2</guid>
            <category><![CDATA[impala]]></category>
            <category><![CDATA[solutions]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[how-to]]></category>
            <category><![CDATA[amazon-web-services]]></category>
            <dc:creator><![CDATA[Michael Arnold]]></dc:creator>
            <pubDate>Tue, 27 Jun 2017 15:59:21 GMT</pubDate>
            <atom:updated>2017-08-28T20:05:04.066Z</atom:updated>
            <content:encoded><![CDATA[<p>In a previous post, we explained how to configure a proxy server to provide <a href="https://medium.com/impala-high-availability/">load balancing for the Impala daemon</a>. The proxy software used was <a href="http://www.haproxy.org/">HAproxy</a>, a free, open source load balancer. This post will demonstrate how to use Amazon’s <a href="https://aws.amazon.com/elasticloadbalancing/">Elastic Load Balancer</a> (ELB) to perform Impala load balancing when running in Amazon’s <a href="https://aws.amazon.com/ec2/">Elastic Compute Cloud</a> (EC2).</p><h3>Details</h3><p>Similar to HAproxy, an Elastic Load Balancer is a reverse proxy that will take incoming TCP connections and distribute them amongst a set of EC2 instances. This is done partly for fault tolerance and partly for load distribution. Cloudera’s <a href="https://www.cloudera.com/documentation/enterprise/latest/topics/impala_proxy.html">Using Impala through a Proxy for High Availability</a> details how load balancing applies to part of Impala.</p><p>To summarize, the proxy will allow us to configure our Impala clients (Hue, Tableau, etc) with a single hostname and port. This well-known hostname will not have to be changed out if there were to be a failure of one or multiple Impala daemons. It will also distribute the load of running a query’s coordinator processing amongst the Impala daemons.</p><p>The steps we will take to set up the Impala load balancer are:</p><ol><li>Configure security groups.</li><li>Create the ELB.</li><li>Configure the ELB.</li><li>Add instances to the ELB.</li><li>Test the ELB.</li><li>Configure Impala.</li></ol><h3>Requirements</h3><p>The following examples require that you have the <a href="https://aws.amazon.com/cli/">AWS CLI</a> software installed and configured on your system. This can be on your Windows, Mac, or Linux workstation/laptop or on a Linux host running elsewhere. Spinning up an EC2 instance running Amazon Linux might be the fastest way to get the tools.</p><p>Of course, you will need an AWS account and IAM privileges to create both the security groups and the ELB.</p><h3>Implementation</h3><p>The following code is run in a shell (bash or cmd.exe) on the system with the AWS CLI tools.</p><p>First, we will need to name the cluster that is running the Impala service. This will be used to name the ELB and security groups. Then, we will create some variables that will hold the ID numbers of existing AWS infrastructure. Lastly, we use an additional variable named $OPTS for general AWS CLI options we may need.</p><p>We will have to look up the VPC ID, the ID of the subnet where we will be deploying the load balancer, and the instance IDs of the Hadoop cluster workers that are running the Impala Daemon. The ELB can reside in the same subnet as the Hadoop cluster or it can be placed in a separate subnet. It is advisable to keep the ELB in the same Availability Zone as the cluster. (You <strong>are</strong> deploying your Hadoop cluster instances to the same AZ, right?)</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3bdb65e7ab61c264a0c5072f1844fa9c/href">https://medium.com/media/3bdb65e7ab61c264a0c5072f1844fa9c/href</a></iframe><p>If you have tagged your objects appropriately, you can use aws ec2 describe-* to look them up programmatically. These are examples. Your environment will be different.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/335842d9ce5419c91e649b2e8f278f70/href">https://medium.com/media/335842d9ce5419c91e649b2e8f278f70/href</a></iframe><h4>Step 1</h4><p>Second, we will define new security groups. The first group will allow client initiated traffic to reach the ELB. This should be locked down to something smaller than “everything” (0.0.0.0/0) <strong>especially</strong> if you have your cluster on the big, bad Internet.</p><p>The second group will allow the ELB to reach the Impala daemons running on the Hadoop cluster worker nodes.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7330a2c2aeb6dade49b54e1c1487fd0a/href">https://medium.com/media/7330a2c2aeb6dade49b54e1c1487fd0a/href</a></iframe><p>Then we will add each EC2 instance to the new $BACKEND security group.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e51c522ef64b7bc235df697e3cea3d34/href">https://medium.com/media/e51c522ef64b7bc235df697e3cea3d34/href</a></iframe><h4>Step 2</h4><p>Next we get to the meat of this post: <a href="https://docs.aws.amazon.com/cli/latest/reference/elb/create-load-balancer.html">creating the load balancer</a>. We will create an ELB with the name “elb-impala-Cluster1” and tell it to listen on ports 21000/TCP and 21050/TCP. The ELB will reside on subnet $SUBNETID and be a member of the security group $FRONTEND. This ELB will be internal/private and will not be available on the Internet. You can change this with the --scheme argument.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9c6f0cc8e6f3a7fe8774ed610a75ecb6/href">https://medium.com/media/9c6f0cc8e6f3a7fe8774ed610a75ecb6/href</a></iframe><h4>Step 3</h4><p>After creation, we will <a href="https://docs.aws.amazon.com/cli/latest/reference/elb/modify-load-balancer-attributes.html">modify some of the ELB configuration</a>. This command will modify the Connection Idle Timeout value to 3600 seconds. It will also set up logging to go to a previously created S3 bucket named “Cluster1-logs” where files prefixed with “Cluster1-Impala” will be written every 60 minutes.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b74a9cd61ccc52c5960b0d6d1cd82ec9/href">https://medium.com/media/b74a9cd61ccc52c5960b0d6d1cd82ec9/href</a></iframe><p>Further modifications to the ELB will add a <a href="https://docs.aws.amazon.com/cli/latest/reference/elb/configure-health-check.html">health check for the ELB</a> to determine if individual instances are available. The ELB will connect to port 21000/TCP every 30 seconds to test if the instance application is listening. The individual checks will timeout after 5 seconds with no response. The instance will be considered to have failed after two failed checks. The instance will return to a healthy status after five successful checks.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2a679f3b9356b05ad15a094ed76bf8be/href">https://medium.com/media/2a679f3b9356b05ad15a094ed76bf8be/href</a></iframe><h4>Step 4</h4><p>Finally, we will <a href="https://docs.aws.amazon.com/cli/latest/reference/elb/register-instances-with-load-balancer.html">attach the Hadoop worker instances to the ELB</a> and load balancing will begin to be available.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8bb8d7abf1451c0d5da1e31a76603dbe/href">https://medium.com/media/8bb8d7abf1451c0d5da1e31a76603dbe/href</a></iframe><p>Lets not forget to <a href="https://docs.aws.amazon.com/cli/latest/reference/elb/describe-load-balancers.html">look up the all-important DNS name</a> that we will be using to talk to the ELB. We will use this to configure our client applications and for impala-shell.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/cf863ec94ed60868b629633c99949735/href">https://medium.com/media/cf863ec94ed60868b629633c99949735/href</a></iframe><h3>Testing</h3><h4>Step 5</h4><p>We will test our implementation to confirm that it works to our expectation.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5fca25f3c51412b8e6cff37966300921/href">https://medium.com/media/5fca25f3c51412b8e6cff37966300921/href</a></iframe><p>You should get output similar to the following which shows that we are connecting to a new coordinator each time:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ec6b42f057cef9178b94a6d77a3cde46/href">https://medium.com/media/ec6b42f057cef9178b94a6d77a3cde46/href</a></iframe><h3>Configure Impala</h3><h4>Step 6</h4><p>Technically, there is nothing you need to configure in Impala. At least not on an insecure (non-Kerberized) cluster. You do need to tell other applications in your Hadoop distribution about the load balancer.</p><p>From Cloudera&#39;s <a href="https://www.cloudera.com/documentation/enterprise/latest/topics/impala_proxy.html">Using Impala through a Proxy for High Availability</a>:</p><p>On systems managed by Cloudera Manager, on the page <strong>Impala</strong> &gt; <strong>Configuration</strong> &gt; <strong>Impala Daemon Default Group</strong>, specify a value for the <strong>Impala Daemons Load Balancer</strong> field. Specify the address of the load balancer in host:port format. This setting lets Cloudera Manager route all appropriate Impala-related operations through the proxy server.</p><h3>Security</h3><p>Since we at Clairvoyant tend to do a lot of security-enabled Hadoop deployments, it makes sense to describe how to get TLS enabled on the ELB.</p><p>Amazon has a service called <a href="https://aws.amazon.com/certificate-manager/">AWS Certificate Manager</a>. This service lets you provision a CA-signed TLS certificate onto the ELB with very little effort and will automatically update the certificate for you before it expires.</p><p>First we will request a certificate. Set the variable $DNAME to the name of the fully qualified domain name that you are using for the certificate. Then we will add tags so that we can provide a simple name.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c56f2b5ab3fcb9cd76dabfb54ee2de33/href">https://medium.com/media/c56f2b5ab3fcb9cd76dabfb54ee2de33/href</a></iframe><p>At this point, the certificate is not yet issued. Emails have been sent to the domain contacts for approval of the request. Once the request is approved, we can continue with assigning the certificate to the ELB. We can list the certificates and watch to see if it has been approved. If there is any output to this command, it means the request has been approved by the domain owner.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/243cd3cfb50270554e5b4b839ce9c5a0/href">https://medium.com/media/243cd3cfb50270554e5b4b839ce9c5a0/href</a></iframe><p>Lastly, we will modify the ELB from TCP mode to SSL mode and tell it to use the TLS certificate on ports 21000/TCP and 21050/TCP.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/37370a59055ed41a12ce678ae95c4e82/href">https://medium.com/media/37370a59055ed41a12ce678ae95c4e82/href</a></iframe><p>You should now have an Amazon-signed TLS certificate protecting your ELB traffic. To confirm, run the following command and look for something like issuer= /C=US/O=Amazon/OU=Server CA 1B/CN=Amazon.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0e608dc0dd069ca5eb56900ff8d5ef6d/href">https://medium.com/media/0e608dc0dd069ca5eb56900ff8d5ef6d/href</a></iframe><p>That’s it. Happy load balancing!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1ab79d91c5d2" width="1" height="1" alt=""><hr><p><a href="https://medium.com/clairvoyantblog/impala-load-balancing-with-amazon-elastic-load-balancer-1ab79d91c5d2">Impala Load Balancing with Amazon Elastic Load Balancer</a> was originally published in <a href="https://medium.com/clairvoyantblog">Clairvoyant Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hue Load Balancer TLS Errors]]></title>
            <link>https://medium.com/clairvoyantblog/hue-load-balancer-tls-errors-54d051def803?source=rss-13754b6725c------2</link>
            <guid isPermaLink="false">https://medium.com/p/54d051def803</guid>
            <category><![CDATA[tls]]></category>
            <category><![CDATA[cloudera]]></category>
            <category><![CDATA[httpd]]></category>
            <category><![CDATA[hue]]></category>
            <dc:creator><![CDATA[Michael Arnold]]></dc:creator>
            <pubDate>Mon, 19 Jun 2017 15:40:16 GMT</pubDate>
            <atom:updated>2017-10-02T18:16:40.546Z</atom:updated>
            <content:encoded><![CDATA[<p>If you are configuring the Hue load balancer with Apache httpd 2.4 and TLS certificates, there is a chance that you may end up with errors. The httpd proxy will check the certificates of the target systems and if they do not pass some basic consistency checks, the proxied connection fails. This could happen if you are using self-signed certificates or a private certificate authority. The subject of the target certificate may be incorrect (i.e. the CommonName or CN may be wrong in the cert) or the subjectAlternativeName (SAN) may not match the subject.</p><p>Error messages in the Hue httpd logs in /var/log/hue-httpd/error_log may include:</p><ul><li>AH01084: pass request body failed to</li><li>AH00898: Error during SSL Handshake with remote server returned by</li></ul><p>Disabling target system certificate checks is a temporary solution. Add the following lines to the Hue load balancer httpd.conf.</p><pre>SSLProxyCheckPeerCN off<br>SSLProxyCheckPeerName off</pre><p>If using Cloudera Manager to configure the <a href="https://www.cloudera.com/documentation/enterprise/5-10-x/topics/cdh_hag_hue_config.html">Hue High Availability</a>, add the above lines to the <em>Hue Load Balancer Advanced Configuration Snippet (Safety Valve) for httpd.conf</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_SCEDJHJyXCZ2gSu0dudug.png" /><figcaption>Hue Load Balancer Advanced Configuration Snippet (Safety Valve) for httpd.conf dialog box in Cloudera Manager</figcaption></figure><p>Ideally, you would also fix the TLS certificates so that they pass the httpd certificate checks, but this fix will buy you the time to get your certificates requests regenerated and signed.</p><p><a href="http://gethue.com/automatic-high-availability-and-load-balancing-of-hue-in-cloudera-manager-with-monitoring/">High availability and load balancing of Hue</a> has been available since Hue version 3.9. The above error has been seen in CDH 5.10.1 on RHEL 7.3 with httpd 2.4.</p><h4>Update:</h4><p><em>June 27 2017 — </em>It looks like Cloudera is seeing this issue in CDH 5.11.0.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=54d051def803" width="1" height="1" alt=""><hr><p><a href="https://medium.com/clairvoyantblog/hue-load-balancer-tls-errors-54d051def803">Hue Load Balancer TLS Errors</a> was originally published in <a href="https://medium.com/clairvoyantblog">Clairvoyant Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Encrypting Amazon EC2 boot volumes via Packer]]></title>
            <link>https://medium.com/clairvoyantblog/encrypting-amazon-ec2-boot-volumes-via-packer-8b24a06bd911?source=rss-13754b6725c------2</link>
            <guid isPermaLink="false">https://medium.com/p/8b24a06bd911</guid>
            <category><![CDATA[solutions]]></category>
            <category><![CDATA[ami]]></category>
            <category><![CDATA[amazon-web-services]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <dc:creator><![CDATA[Michael Arnold]]></dc:creator>
            <pubDate>Tue, 29 Nov 2016 01:15:00 GMT</pubDate>
            <atom:updated>2017-08-31T18:52:34.643Z</atom:updated>
            <content:encoded><![CDATA[<p>In order to layer on some easy data-at-rest security, I want to encrypt the boot volumes of my Amazon EC2 instances. I also want to use the centos.org <a href="https://aws.amazon.com/marketplace/seller-profile?id=16cb8b03-256e-4dde-8f34-1b0f377efe89">CentOS images</a> but those are not encrypted. How can I end up with an encrypted copy of those AMIs in the fewest steps?</p><p>In the past, I have used shell scripts and the <a href="https://aws.amazon.com/cli/">AWS CLI</a> to perform the boot volume encryption dance. The steps are basically:</p><ol><li>Deploy an instance running the source AMI.</li><li>Create an image from that instance.</li><li>Copy the image and encrypt the copy.</li><li>Delete the unencrypted image.</li><li>Terminate the instance.</li><li>Add tags to new AMI.</li></ol><p>The script has a need for a lot of VPC/subnet/security group preparation (which I guess could have been added to the script), and if there were errors during the execution then cleanup was very manual (more possible script work). The script is very flexible and meets my needs, but it is a codebase that needs expertise in order to maintain. And I have better things to do with my time.</p><p>A simpler solution is <a href="https://www.packer.io/">Packer</a>.</p><p>I had looked at Packer around July of 2016 and it was very promising, but it was missing one key feature: it could not actually encrypt the boot volume. Dave Konopka wrote a post describing the problem and his solution of using Ansible in <a href="http://www.davekonopka.com/2016/ec2-encrypted-boot-volumes.html">Encrypted Amazon EC2 boot volumes with Packer and Ansible</a>. Luckily, there was an outstanding <a href="https://github.com/mitchellh/packer/pull/3382">pull request</a> and as of version <a href="https://github.com/mitchellh/packer/blob/master/CHANGELOG.md#0110-october-21-2016">0.11.0</a>, Packer now has support for boot volume encryption whilst copying Marketplace AMIs.</p><p>The nice thing about a Packer template is that it takes care of dynamic generation of most objects. Temporary SSH keys and security groups are created just for the build and are then destroyed. The above steps for the boot volume encryption dance are followed with built-in error checking and recovery in case something goes wrong.</p><p>This template assumes automatic lookup of your AWS credentials. Read the <a href="https://www.packer.io/docs/builders/amazon.html">docs</a> (Specifying Amazon Credentials section) for more details.</p><p>Code can be downloaded from <a href="https://gist.github.com/razorsedge/cc0ce3557fe33089142c210877a74943">GitHub</a>.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5b818017dbc6bb7cbf3718bbbaa93ab7/href">https://medium.com/media/5b818017dbc6bb7cbf3718bbbaa93ab7/href</a></iframe><p>To copy the CentoS 6 AMI, change any references of CentOS “7” to “6” and the product-code from “aw0evgkw8e5c1q413zgy5pjce” to “6x5jmcajty9edm3f211pqjfn2”.</p><p>When you build with this Packer template, you will have to pass in the variables aws_vpc and aws_subnet. The AWS region defaults to us-east-1, but can be overridden by setting aws_region. The newest centos.org CentOS AMI in that region will be automatically discovered.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/03ea5571280a24b39d8aee974e23ce6e/href">https://medium.com/media/03ea5571280a24b39d8aee974e23ce6e/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8b24a06bd911" width="1" height="1" alt=""><hr><p><a href="https://medium.com/clairvoyantblog/encrypting-amazon-ec2-boot-volumes-via-packer-8b24a06bd911">Encrypting Amazon EC2 boot volumes via Packer</a> was originally published in <a href="https://medium.com/clairvoyantblog">Clairvoyant Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How To Rebuild Cloudera’s Spark]]></title>
            <link>https://medium.com/clairvoyantblog/how-to-rebuild-clouderas-spark-f1e4b23769c8?source=rss-13754b6725c------2</link>
            <guid isPermaLink="false">https://medium.com/p/f1e4b23769c8</guid>
            <category><![CDATA[analytics]]></category>
            <category><![CDATA[spark]]></category>
            <category><![CDATA[cloudera]]></category>
            <category><![CDATA[big-data]]></category>
            <category><![CDATA[cdh]]></category>
            <dc:creator><![CDATA[Michael Arnold]]></dc:creator>
            <pubDate>Wed, 08 Jun 2016 00:34:32 GMT</pubDate>
            <atom:updated>2019-04-10T14:57:07.770Z</atom:updated>
            <content:encoded><![CDATA[<p>As a followup to the post <a href="http://site.clairvoyantsoft.com/how-to-upgrade-spark-on-cdh5-5/">How to upgrade Spark on CDH5.5</a>, I will show you how to get a build environment up and running with a <a href="http://www.centos.org/">CentOS</a> 7 virtual machine running via <a href="http://www.vagrantup.com/">Vagrant</a> and <a href="https://www.virtualbox.org/wiki/Downloads">Virtual Box</a>. This will allow for the quick build or rebuild of Cloudera’s version of <a href="https://spark.apache.org/">Apache Spark</a> from <a href="https://github.com/cloudera/spark">https://github.com/cloudera/spark</a>.</p><h4>Why?</h4><p>You may want to rebuild Cloudera’s Spark in the event that you want to add functionality that was not compiled in by default. The Thriftserver and SparkR are two things that Cloudera does not ship (nor support), so if you are looking for these things, these instructions will help.</p><p>Using a disposable virtual machine will allow for a repeatable build and will keep your workstation computing environment clean of all the bits that may get installed.</p><h4>Requirements</h4><p>You will need Internet access during the installation and compilation of the Spark software.</p><p>Make sure that you have the following software installed on your local workstation:</p><ul><li><a href="https://www.virtualbox.org/wiki/Downloads">Virtual Box</a></li><li><a href="http://www.vagrantup.com/downloads.html">Vagrant 1.3+</a></li><li><a href="http://git-scm.com/downloads">Git</a></li><li><a href="https://github.com/voxpupuli/vagrant-librarian-puppet">vagrant-librarian-puppet</a></li><li><a href="https://github.com/petems/vagrant-puppet-install">vagrant-puppet-install</a> (optional)</li></ul><p>Installation of these components are documented at their respective links.</p><h4>Get Started</h4><p>Clone the <a href="https://github.com/teamclairvoyant/vagrant-sparkbuilder">vagrant-sparkbuilder</a> git repository to your local workstation:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7de02a17d1a22d37462dae9b74c449b2/href">https://medium.com/media/7de02a17d1a22d37462dae9b74c449b2/href</a></iframe><p>Start the Vagrant instance that comes with the vagrant-sparkbuilder repository. This will boot a CentOS 7 virtual machine, install the <a href="https://www.puppetlabs.com/">Puppet</a> agent, and instruct Puppet to configure the virtual machine with Oracle Java and the Cloudera Spark git repository. Then it will log you in to the virtual machine.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ab03e334365b4c248366f4b9b0bd53ac/href">https://medium.com/media/ab03e334365b4c248366f4b9b0bd53ac/href</a></iframe><p>Inside the virtual machine, change to the spark directory:</p><pre>cd spark</pre><p>The automation has already checked out the branch/tag that corresponds to the target CDH version (presently defaulting to cdh5.7.0-release). Now you just need to build Spark with the Hive Thriftserver while excluding dependencies that are shipped as part of CDH. The key options in this example are the -Phive -Phive-thriftserver. Expect the compilation to take 20-30 minutes depending upon your Internet speed and workstation CPU and disk speed.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/65b17e350a1b1cb4656369683a25a93d/href">https://medium.com/media/65b17e350a1b1cb4656369683a25a93d/href</a></iframe><p>If the above command fails with a ‘Cannot allocate memory’ error, either run it again or increase the amount of memory in the Vagrantfile.</p><p>Copy the resulting distribution back to your local workstation:</p><pre>rsync -a dist/ /vagrant/dist-cdh5.7.0-nodeps</pre><p>If you want to build against a different CDH release, then use git to change the code:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ac938f09203ab736bac16c55ece6e05c/href">https://medium.com/media/ac938f09203ab736bac16c55ece6e05c/href</a></iframe><p>Log out of the virtual machine with the exit command, then stop and/or destroy the virtual machine:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/bf6f418d2ff13483479ad381996074d2/href">https://medium.com/media/bf6f418d2ff13483479ad381996074d2/href</a></iframe><p>More examples can be found at the <a href="https://github.com/teamclairvoyant/vagrant-sparkbuilder">vagrant-sparkbuilder</a> GitHub site.</p><h4>What Now?</h4><p>From here, you should be able to make use of the newly built software.</p><p>If you are recompiling Spark in order to get the Hive integration along with the JDBC Thriftserver, copy over and then install the newly built jars to the correct locations on the node which will run the Spark Thriftserver.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/16983f5eacfd140daccdfde97256ef2b/href">https://medium.com/media/16983f5eacfd140daccdfde97256ef2b/href</a></iframe><p>You should only need to install on the one node, not on all the cluster members.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f1e4b23769c8" width="1" height="1" alt=""><hr><p><a href="https://medium.com/clairvoyantblog/how-to-rebuild-clouderas-spark-f1e4b23769c8">How To Rebuild Cloudera’s Spark</a> was originally published in <a href="https://medium.com/clairvoyantblog">Clairvoyant Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>