<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>jon zobrist (dot) com</title>
	<atom:link href="http://www.jonzobrist.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jonzobrist.com</link>
	<description>Unix, Linux, IT, Cloud, Meat</description>
	<lastBuildDate>Fri, 27 Apr 2012 18:49:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>My response to Edward Capriolo&#8217;s &#8220;Myth Busters: Ops edition. Is EC2 is less expensive then running your own gear?&#8221;</title>
		<link>http://www.jonzobrist.com/2012/04/27/my-response-to-edward-capriolos-myth-busters-ops-edition-is-ec2-is-less-expensive-then-running-your-own-gear/</link>
		<comments>http://www.jonzobrist.com/2012/04/27/my-response-to-edward-capriolos-myth-busters-ops-edition-is-ec2-is-less-expensive-then-running-your-own-gear/#comments</comments>
		<pubDate>Fri, 27 Apr 2012 18:49:18 +0000</pubDate>
		<dc:creator>Jon Zobrist</dc:creator>
				<category><![CDATA[AutoScale]]></category>
		<category><![CDATA[AWS]]></category>
		<category><![CDATA[EBS]]></category>
		<category><![CDATA[EC2]]></category>
		<category><![CDATA[Amazon]]></category>
		<category><![CDATA[Amazon AWS]]></category>
		<category><![CDATA[Auto Scale]]></category>
		<category><![CDATA[Blog Responses]]></category>
		<category><![CDATA[Cloud]]></category>

		<guid isPermaLink="false">http://www.jonzobrist.com/?p=532</guid>
		<description><![CDATA[
Related posts:<ol>
<li><a href='http://www.jonzobrist.com/2012/03/22/my-response-to-is-the-cloud-undermining-enterprise-disaster-recovery-aryakanetworks-no/' rel='bookmark' title='My response to &#8220;Is the Cloud Undermining Enterprise Disaster Recovery&#8221; @aryakanetworks [No]'>My response to &#8220;Is the Cloud Undermining Enterprise Disaster Recovery&#8221; @aryakanetworks [No]</a> <small>...</small></li>
<li><a href='http://www.jonzobrist.com/2011/09/24/reading-peecho-minimizing-downtime-on-amazon-aws/' rel='bookmark' title='Reading : Peecho Minimizing Downtime on Amazon AWS'>Reading : Peecho Minimizing Downtime on Amazon AWS</a> <small>...</small></li>
<li><a href='http://www.jonzobrist.com/2011/10/09/my-comments-on-cheap-hosting-amazon-aws-blog-post/' rel='bookmark' title='My Comments on &#8216;Cheap Hosting Amazon AWS&#8217; Blog Post'>My Comments on &#8216;Cheap Hosting Amazon AWS&#8217; Blog Post</a> <small>...</small></li>
</ol>

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2012%2F04%2F27%2Fmy-response-to-edward-capriolos-myth-busters-ops-edition-is-ec2-is-less-expensive-then-running-your-own-gear%2F' data-shr_title='My+response+to+Edward+Capriolo%27s+%22Myth+Busters%3A+Ops+edition.+Is+EC2+is+less+expensive+then+running+your+own+gear%3F%22'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2012%2F04%2F27%2Fmy-response-to-edward-capriolos-myth-busters-ops-edition-is-ec2-is-less-expensive-then-running-your-own-gear%2F' data-shr_title='My+response+to+Edward+Capriolo%27s+%22Myth+Busters%3A+Ops+edition.+Is+EC2+is+less+expensive+then+running+your+own+gear%3F%22'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2012%2F04%2F27%2Fmy-response-to-edward-capriolos-myth-busters-ops-edition-is-ec2-is-less-expensive-then-running-your-own-gear%2F' data-shr_title='My+response+to+Edward+Capriolo%27s+%22Myth+Busters%3A+Ops+edition.+Is+EC2+is+less+expensive+then+running+your+own+gear%3F%22'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Edward Capriolo&#8217;s (@edwardcapriolo) post may be better titled &#8220;Myth Busters: Opts edition. The Misleading Appearance of Amazon AWS Costs.&#8221;</p>
<p><a title="Myth Busters: Opts edition. Misleading Evaluation of Amazon AWS Costs." href="http://www.edwardcapriolo.com/roller/edwardcapriolo/entry/myth_busters_ops_editition_is" target="_blank">http://www.edwardcapriolo.com/roller/edwardcapriolo/entry/myth_busters_ops_editition_is</a></p>
<p>Edward, you are absolutely correct. The cost of servers on AWS is more than the cost of servers in real life.</p>
<p>Your final conclusion is absolutely incorrect.</p>
<p>In fairness you are attempting an apples to apples comparison, and concluding that apples are better than oranges.</p>
<p>I suggest you consider apples to oranges comparison and see that the cloud (specifically Amazon&#8217;s AWS) is not the sour apples you&#8217;re comparing it to.</p>
<p>So, if you compared features on the servers, and, even more so, if you change your application to take advantage of the AWS cloud, the cloud will absolutely crush your comparison in price and scale.</p>
<p>Things that you won&#8217;t have on your servers for $175k.</p>
<ol>
<li>Atomic-multi data center sub second volume snapshots. EBS volumes rock. Snapshots persistent to S3 are amazing.</li>
<li>Global redundancy. You pay $2k/month for your data center, I&#8217;m guessing if it gets hit by a meteor you&#8217;re SOL. With AWS for far less than $2k/month we can recover to either coast of the US, Ireland, Singapore, Tokyo or Sao Paolo in &lt; 1 hour.</li>
<li>Elasticity. They named their platform Elastic Cloud for a reason. You bought 20 servers. How long did that take? A week, a month, a day? On Amazon it took 2 minutes. Need 20 more, 2 more minutes. Don&#8217;t want to watch your Cassandra cluster for load and pre-order servers? Setup an auto scaling group, have 10-60 nodes based on average CPU, or any other metric you want. You don&#8217;t only get elastic load scaling, if your app can wait you get elastic pricing. Don&#8217;t care when your job runs, just needs to be sometime between midnight and 6am? Game the spot instance market, save a ton, 50-90%. Have a resource that is usually idle but sometimes needs 60GB RAM? Pay for a micro/medium instance and scale it to a 4XL whenever your spikes are.</li>
</ol>
<p>This is all just with EC2, server virtualization.</p>
<p>If you added the components necessary to do this with your own hardware your price would be 4X what it is on AWS.</p>
<p>Now, let&#8217;s talk about where you can save 10X. Things AWS excels in that you did not even mention.</p>
<ol>
<li>S3. I know your local SATA drives or SAN are cheaper. But are they designed for 11 9&#8242;s of redundancy? Compare that cost. Are they secure and globally accessible? Do they have virtually unlimited bandwidth to your alternate site/customers? Can you just keep growing them and only paying fer allocated space?</li>
<li>Bandwidth. You did not even mention this. We went from a traditional 5MBPS commit on a dual 100MBPS ethernet for $800/month 95% billing scam, to no upper limit for burst, and tens of dollars per month based on a fair, actual usage at pennies per GB.</li>
<li>Actual cloud apps. Ditch your MySQL database and use simpleDB or the SSD based DynamoDB. Get infinite scale, price per actual data used, and built in redundancy.</li>
<li>Support staff. As an IT person this one pains me a bit, until I recall how many bad IT departments I&#8217;ve experienced. How much are you paying the monkey who maintains those 20 servers? Your developers do it? What if they could just concentrate on coding? All of this costs more than your straight hardware comparison.</li>
<li>Opportunity cost. You own those servers. Microsoft or Apple or Google or someone completely new comes up with a new cloud paradigm, I can migrate in days if not less from AWS. There is no option for dealing with one of the most consistent paradigms of our age &#8211; Change is inevitable.</li>
<li>Development flexibility. You did not price the likely necessary qa and dev servers. Right off the top, that doubles or triples your price if you need a clone of production for test or development. On AWS you automatically clone your running production and test your continuous deploys on real, identical data and setups. It takes some work, but once you&#8217;re there it&#8217;s a million times better, and you never have to hear &#8220;It worked on QA&#8221; again! And what about new development? You or one of your engineers wants to &#8216;try out&#8217; something new. How much is that server? AWS it&#8217;s pennies to tens of dollars to let people play with wild new configurations.</li>
<li>Growth. Already mentioned in the elastic part, but consider how much happier your boss is if sales hit the hockey stick and he didn&#8217;t hear complaints of any operations issues, vs. calling you on vacation to yell about &#8220;Everything being down&#8221; right at the moment you made it big.</li>
</ol>
<p>&nbsp;</p>
<p>There are 2 instances where I think you should not drop everything you are doing and migrate to AWS.</p>
<ol>
<li>If you are very data heavy (PB) you should burst to the cloud, get a 10gb cross connect to AWS.</li>
<li>If you are cpu heavy (&gt;80% cpu/server avg) you should burst cpu to the cloud.</li>
</ol>
<p>&nbsp;</p>
<p>I did the same comparisons you did when I first evaluated AWS, and am so glad my boss urged me to try it out. And, yes, it seemed scary and more expensive, but has turned out easy and far less expensive.</p>
<p><strong>Everyone else should refactor their applications and move to the cloud. If you haven&#8217;t already started you are behind in the game.</strong></p>
<p>And you can quote me on that.</p>
<p>-Jon</p>
<div class="shr-publisher-532"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2012%2F04%2F27%2Fmy-response-to-edward-capriolos-myth-busters-ops-edition-is-ec2-is-less-expensive-then-running-your-own-gear%2F' data-shr_title='My+response+to+Edward+Capriolo%27s+%22Myth+Busters%3A+Ops+edition.+Is+EC2+is+less+expensive+then+running+your+own+gear%3F%22'></a><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2012%2F04%2F27%2Fmy-response-to-edward-capriolos-myth-busters-ops-edition-is-ec2-is-less-expensive-then-running-your-own-gear%2F'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2012%2F04%2F27%2Fmy-response-to-edward-capriolos-myth-busters-ops-edition-is-ec2-is-less-expensive-then-running-your-own-gear%2F' data-shr_title='My+response+to+Edward+Capriolo%27s+%22Myth+Busters%3A+Ops+edition.+Is+EC2+is+less+expensive+then+running+your+own+gear%3F%22'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><p>Related posts:<ol>
<li><a href='http://www.jonzobrist.com/2012/03/22/my-response-to-is-the-cloud-undermining-enterprise-disaster-recovery-aryakanetworks-no/' rel='bookmark' title='My response to &#8220;Is the Cloud Undermining Enterprise Disaster Recovery&#8221; @aryakanetworks [No]'>My response to &#8220;Is the Cloud Undermining Enterprise Disaster Recovery&#8221; @aryakanetworks [No]</a> <small>Disagree completely with your assessment of Cloud Computing Disastery Recovery....</small></li>
<li><a href='http://www.jonzobrist.com/2011/09/24/reading-peecho-minimizing-downtime-on-amazon-aws/' rel='bookmark' title='Reading : Peecho Minimizing Downtime on Amazon AWS'>Reading : Peecho Minimizing Downtime on Amazon AWS</a> <small>&nbsp; What the guys over at Peecho have done is...</small></li>
<li><a href='http://www.jonzobrist.com/2011/10/09/my-comments-on-cheap-hosting-amazon-aws-blog-post/' rel='bookmark' title='My Comments on &#8216;Cheap Hosting Amazon AWS&#8217; Blog Post'>My Comments on &#8216;Cheap Hosting Amazon AWS&#8217; Blog Post</a> <small>My Comments on the post “Cheap Hosting Case Study: You...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.jonzobrist.com/2012/04/27/my-response-to-edward-capriolos-myth-busters-ops-edition-is-ec2-is-less-expensive-then-running-your-own-gear/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My updated Cloud Drive Pricing Breakdowns</title>
		<link>http://www.jonzobrist.com/2012/04/25/my-updated-my-cloud-drive-pricing-breakdowns/</link>
		<comments>http://www.jonzobrist.com/2012/04/25/my-updated-my-cloud-drive-pricing-breakdowns/#comments</comments>
		<pubDate>Wed, 25 Apr 2012 18:35:43 +0000</pubDate>
		<dc:creator>Jon Zobrist</dc:creator>
				<category><![CDATA[Amazon Cloud Drive]]></category>
		<category><![CDATA[Box.net]]></category>
		<category><![CDATA[Cloud]]></category>
		<category><![CDATA[Dropbox]]></category>
		<category><![CDATA[Google Drive]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[SkyDrive]]></category>
		<category><![CDATA[Cloud Drive]]></category>

		<guid isPermaLink="false">http://www.jonzobrist.com/?p=517</guid>
		<description><![CDATA[Old google pricing is WAS the cheapest per GB at $.25/GB/Year. Microsoft SkyDrive is second at $.50/GB/Year, and the New Google Drive pricing is third with tiers mostly around $.60/GB/Year Here is the link to my &#8220;Public Google Spreadsheet With Cloud Storage Options Breakdown http://bit.ly/IPlANs There are plenty of good articles out there comparing the features [...]
Related posts:<ol>
<li><a href='http://www.jonzobrist.com/2011/09/14/understand-how-bitcasa-can-do-what-they-say/' rel='bookmark' title='Guest Blogger Brad Zobrist &#8211; How he would implement a Bitcasa'>Guest Blogger Brad Zobrist &#8211; How he would implement a Bitcasa</a> <small>First I think it&#8217;s good to clarify what I understand...</small></li>
<li><a href='http://www.jonzobrist.com/2012/03/22/my-response-to-is-the-cloud-undermining-enterprise-disaster-recovery-aryakanetworks-no/' rel='bookmark' title='My response to &#8220;Is the Cloud Undermining Enterprise Disaster Recovery&#8221; @aryakanetworks [No]'>My response to &#8220;Is the Cloud Undermining Enterprise Disaster Recovery&#8221; @aryakanetworks [No]</a> <small>Disagree completely with your assessment of Cloud Computing Disastery Recovery....</small></li>
</ol>

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2012%2F04%2F25%2Fmy-updated-my-cloud-drive-pricing-breakdowns%2F' data-shr_title='My+updated+Cloud+Drive+Pricing+Breakdowns'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2012%2F04%2F25%2Fmy-updated-my-cloud-drive-pricing-breakdowns%2F' data-shr_title='My+updated+Cloud+Drive+Pricing+Breakdowns'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2012%2F04%2F25%2Fmy-updated-my-cloud-drive-pricing-breakdowns%2F' data-shr_title='My+updated+Cloud+Drive+Pricing+Breakdowns'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Old google pricing <del>is</del> WAS <img src='http://www.jonzobrist.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  the cheapest per GB at $.25/GB/Year.<br />
Microsoft SkyDrive is second at $.50/GB/Year, and the New Google Drive pricing is third with tiers mostly around $.60/GB/Year</p>
<p>Here is the link to my &#8220;Public Google Spreadsheet With Cloud Storage Options Breakdown<br />
<a title="Public Google Spreadsheet With Cloud Storage Options Breakdown" href="http://bit.ly/IPlANs" target="_blank"> http://bit.ly/IPlANs</a></p>
<p>There are plenty of good articles out there comparing the features of each cloud drive, as many provide nice add ons.<br />
Here are a few</p>
<p>Mashable Tech - Google Officially Launches Google Drive</p>
<p><a title="Google Officially Launches Google Drive" href="http://mashable.com/2012/04/24/google-drive/" target="_blank">http://mashable.com/2012/04/24/google-drive/</a></p>
<p>Telegraph &#8211; Google Drive: iCloud, Dropbox, SkyDrive and Box comparison</p>
<p><a title="Google Drive: iCloud, Dropbox, SkyDrive and Box comparison" href="http://www.telegraph.co.uk/technology/google/9223583/Google-Drive-iCloud-Dropbox-SkyDrive-and-Box-comparison.html" target="_blank">http://www.telegraph.co.uk/technology/google/9223583/Google-Drive-iCloud-Dropbox-SkyDrive-and-Box-comparison.html</a></p>
<p>The Guardian &#8211; Google Drive versus Dropbox and the rest: cloud storage compared</p>
<p><a title="Google Drive versus Dropbox and the rest: cloud storage compared" href="http://www.guardian.co.uk/technology/blog/2012/apr/25/google-drive-cloud-storage-compared" target="_blank">http://www.guardian.co.uk/technology/blog/2012/apr/25/google-drive-cloud-storage-compared</a></p>
<p>CNN - How does Google Drive compare to the competition?</p>
<p><a title="How does Google Drive compare to the competition?" href="http://www.cnn.com/2012/04/25/tech/web/compare-competition-google-drive/index.html" target="_blank">http://www.cnn.com/2012/04/25/tech/web/compare-competition-google-drive/index.html</a></p>
<p>Lifehacker&#8217;s article, &#8220;Drag-and-Drop To Automatically Encrypt Files in Google Drive Using Automator on Mac&#8221; <a title="Drag-and-Drop To Automatically Encrypt Files in Google Drive Using Automator on Mac" href="http://lifehacker.com/google-drive/" target="_blank">http://lifehacker.com/google-drive/</a></p>
<p>And they discuss it extensively on Twit.tv&#8217;s podcast [which totally rocks] &#8211; This Week in Google episode 143 <a title="Twig episode 143" href="http://twit.tv/show/this-week-in-google/143" target="_blank">http://twit.tv/show/this-week-in-google/143</a></p>
<p>So many cloud storages, still too many files, and still too little bandwidth&#8230;. My ~3.5TB of files would take 169 Days 21 Hours 47 Minutes 44 Seconds to upload at 2 Mbit/Sec&#8230;</p>
<div class="shr-publisher-517"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2012%2F04%2F25%2Fmy-updated-my-cloud-drive-pricing-breakdowns%2F' data-shr_title='My+updated+Cloud+Drive+Pricing+Breakdowns'></a><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2012%2F04%2F25%2Fmy-updated-my-cloud-drive-pricing-breakdowns%2F'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2012%2F04%2F25%2Fmy-updated-my-cloud-drive-pricing-breakdowns%2F' data-shr_title='My+updated+Cloud+Drive+Pricing+Breakdowns'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><p>Related posts:<ol>
<li><a href='http://www.jonzobrist.com/2011/09/14/understand-how-bitcasa-can-do-what-they-say/' rel='bookmark' title='Guest Blogger Brad Zobrist &#8211; How he would implement a Bitcasa'>Guest Blogger Brad Zobrist &#8211; How he would implement a Bitcasa</a> <small>First I think it&#8217;s good to clarify what I understand...</small></li>
<li><a href='http://www.jonzobrist.com/2012/03/22/my-response-to-is-the-cloud-undermining-enterprise-disaster-recovery-aryakanetworks-no/' rel='bookmark' title='My response to &#8220;Is the Cloud Undermining Enterprise Disaster Recovery&#8221; @aryakanetworks [No]'>My response to &#8220;Is the Cloud Undermining Enterprise Disaster Recovery&#8221; @aryakanetworks [No]</a> <small>Disagree completely with your assessment of Cloud Computing Disastery Recovery....</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.jonzobrist.com/2012/04/25/my-updated-my-cloud-drive-pricing-breakdowns/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Change ports on an Amazon Elastic Load Balancer (ELB)</title>
		<link>http://www.jonzobrist.com/2012/04/20/change-ports-on-an-amazon-elastic-load-balancer-elb/</link>
		<comments>http://www.jonzobrist.com/2012/04/20/change-ports-on-an-amazon-elastic-load-balancer-elb/#comments</comments>
		<pubDate>Fri, 20 Apr 2012 21:43:29 +0000</pubDate>
		<dc:creator>Jon Zobrist</dc:creator>
				<category><![CDATA[AWS]]></category>
		<category><![CDATA[ELB]]></category>
		<category><![CDATA[internet]]></category>

		<guid isPermaLink="false">http://www.jonzobrist.com/?p=522</guid>
		<description><![CDATA[Of course you need your ELB command line tools, but you also need the IAM Cli tools if you are using an SSL certificate. There is more detail here for SSL certificates https://makandracards.com/makandra/1673-change-update-ssl-certificate-for-amazon-elastic-load-balancer &#160; You will need your ELB load balancer&#8217;s name, find it with elb-describe-lbs 1. Remove the old port if there is one already [...]
No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2012%2F04%2F20%2Fchange-ports-on-an-amazon-elastic-load-balancer-elb%2F' data-shr_title='Change+ports+on+an+Amazon+Elastic+Load+Balancer+%28ELB%29'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2012%2F04%2F20%2Fchange-ports-on-an-amazon-elastic-load-balancer-elb%2F' data-shr_title='Change+ports+on+an+Amazon+Elastic+Load+Balancer+%28ELB%29'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2012%2F04%2F20%2Fchange-ports-on-an-amazon-elastic-load-balancer-elb%2F' data-shr_title='Change+ports+on+an+Amazon+Elastic+Load+Balancer+%28ELB%29'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Of course you need your ELB command line tools, but you also need the IAM Cli tools if you are using an SSL certificate.</p>
<p>There is more detail here for SSL certificates <a href="https://makandracards.com/makandra/1673-change-update-ssl-certificate-for-amazon-elastic-load-balancer" target="_blank">https://makandracards.com/makandra/1673-change-update-ssl-certificate-for-amazon-elastic-load-balancer</a></p>
<p>&nbsp;</p>
<p><span style="text-decoration: underline;">You will need your ELB load balancer&#8217;s name, find it with elb-describe-lbs</span></p>
<p>1. Remove the old port if there is one already (In this example it&#8217;s 80 and 443)</p>
<pre>
./elb-delete-lb-listeners my-inthinc-com-oregon --lb-ports 80
</pre>
<p>-or- for HTTPS</p>
<pre>
./elb-delete-lb-listeners my-inthinc-com-oregon --lb-ports 443
</pre>
<p>2. Add the new port (using your SSL cert name found from iam-servercertlistbypath)</p>
<pre>
./elb-create-lb-listeners my-inthinc-com-oregon --listener "lb-port=443,instance-port=80,protocol=http"
</pre>
<p>-or- for HTTPS</p>
<pre>
./elb-create-lb-listeners my-inthinc-com-oregon --listener "lb-port=443,instance-port=8080,protocol=https,cert-id=arn:aws:iam::322191361670:server-certificate/www.example.com"
</pre>
<p>That&#8217;s it!</p>
<p>You can&#8217;t do this in the current AWS Management Console.</p>
<div class="shr-publisher-522"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2012%2F04%2F20%2Fchange-ports-on-an-amazon-elastic-load-balancer-elb%2F' data-shr_title='Change+ports+on+an+Amazon+Elastic+Load+Balancer+%28ELB%29'></a><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2012%2F04%2F20%2Fchange-ports-on-an-amazon-elastic-load-balancer-elb%2F'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2012%2F04%2F20%2Fchange-ports-on-an-amazon-elastic-load-balancer-elb%2F' data-shr_title='Change+ports+on+an+Amazon+Elastic+Load+Balancer+%28ELB%29'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.jonzobrist.com/2012/04/20/change-ports-on-an-amazon-elastic-load-balancer-elb/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gather All Public SSH Keys on a Server &#8211; Bash Script</title>
		<link>http://www.jonzobrist.com/2012/04/18/gather-all-public-ssh-keys-on-a-server-bash-script/</link>
		<comments>http://www.jonzobrist.com/2012/04/18/gather-all-public-ssh-keys-on-a-server-bash-script/#comments</comments>
		<pubDate>Wed, 18 Apr 2012 18:31:23 +0000</pubDate>
		<dc:creator>Jon Zobrist</dc:creator>
				<category><![CDATA[Bash]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Linux Support - Servers]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[authorized_keys]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[BSD License]]></category>
		<category><![CDATA[PKI]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://www.jonzobrist.com/?p=518</guid>
		<description><![CDATA[Often times you manage similar users across various servers and they have the same public keys between servers. Here is a quick script to gather all the users local public keys (the ~/.ssh/id_rsa.pub) as well as their externally used keys (the ~/.ssh/authorized_keys) I published this on github, here. #!/bin/bash # # Author : Jon Zobrist &#60;jon@jonzobrist.com&#62; # [...]
No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2012%2F04%2F18%2Fgather-all-public-ssh-keys-on-a-server-bash-script%2F' data-shr_title='Gather+All+Public+SSH+Keys+on+a+Server+-+Bash+Script'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2012%2F04%2F18%2Fgather-all-public-ssh-keys-on-a-server-bash-script%2F' data-shr_title='Gather+All+Public+SSH+Keys+on+a+Server+-+Bash+Script'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2012%2F04%2F18%2Fgather-all-public-ssh-keys-on-a-server-bash-script%2F' data-shr_title='Gather+All+Public+SSH+Keys+on+a+Server+-+Bash+Script'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Often times you manage similar users across various servers and they have the same public keys between servers.</p>
<p>Here is a quick script to gather all the users local public keys (the ~/.ssh/id_rsa.pub) as well as their externally used keys (the ~/.ssh/authorized_keys)</p>
<p>I published this on <a href="https://github.com/jonzobrist/Bash-Admin-Scripts/blob/master/gather-public-ssh-keys.sh" target="_blank">github, here.</a></p>
<pre>
#!/bin/bash
#
# Author : Jon Zobrist &lt;jon@jonzobrist.com&gt;
# Homepage : http://www.jonzobrist.com
# License : BSD http://en.wikipedia.org/wiki/BSD_license
# Copyright (c) 2012, Jon Zobrist
# All rights reserved.

# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# Purpose : This script aims to gather all public ssh keys on a server and put them in a directory, with appropriate names
# Usage : gather-public-ssh-keys.sh [Directory]

if [ "${1}" ]
then
OUTPUT_DIR="${1}"
else
OUTPUT_DIR="./pubkeys"
fi

mkdir -p ${OUTPUT_DIR}
echo "Writing keys to ${OUTPUT_DIR}"

HOME_DIR="/home"
CHOWN_USER="root:root"
CHMOD_PERMS="400"
KEYFILES="id_rsa.pub id_dsa.pub identity.pub id_ecdsa.pub authorized_keys"

for USER in $(/bin/ls -1 ${HOME_DIR})
do
for KEY in ${KEYFILES}
do
if [ -f "${HOME_DIR}/${USER}/.ssh/${KEY}" ]
then
FILE=${OUTPUT_DIR}/${USER}-${KEY}
echo "${USER} has public keys, copied to ${FILE}"
touch ${FILE}
chown ${CHOWN_USER} ${FILE}
chmod ${CHMOD_PERMS} ${FILE}
cp ${HOME_DIR}/${USER}/.ssh/authorized_keys ${FILE}
else
echo "${USER} has no public keys"
fi
done
done
</pre>
<p>&nbsp;</p>
<pre>Download the script here : <a href="http://www.jonzobrist.com/files/gather-public-ssh-keys.gz">gather-public-ssh-keys.gz</a> plain text : <a href="http://www.jonzobrist.com/files/gather-public-ssh-keys.sh">gather-public-ssh-keys.sh</a></pre>
<div class="shr-publisher-518"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2012%2F04%2F18%2Fgather-all-public-ssh-keys-on-a-server-bash-script%2F' data-shr_title='Gather+All+Public+SSH+Keys+on+a+Server+-+Bash+Script'></a><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2012%2F04%2F18%2Fgather-all-public-ssh-keys-on-a-server-bash-script%2F'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2012%2F04%2F18%2Fgather-all-public-ssh-keys-on-a-server-bash-script%2F' data-shr_title='Gather+All+Public+SSH+Keys+on+a+Server+-+Bash+Script'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.jonzobrist.com/2012/04/18/gather-all-public-ssh-keys-on-a-server-bash-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install Clustered (4 nodes) Apache Kafka and Zookeeper on Ubuntu 10.04</title>
		<link>http://www.jonzobrist.com/2012/04/17/install-apache-kafka-and-zookeeper-on-ubuntu-10-04/</link>
		<comments>http://www.jonzobrist.com/2012/04/17/install-apache-kafka-and-zookeeper-on-ubuntu-10-04/#comments</comments>
		<pubDate>Tue, 17 Apr 2012 21:38:01 +0000</pubDate>
		<dc:creator>Jon Zobrist</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Apache Kafka]]></category>
		<category><![CDATA[Apache Zookeeper]]></category>
		<category><![CDATA[AWS]]></category>
		<category><![CDATA[Cassandra]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Linux Support - Servers]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Amazon Web Services]]></category>
		<category><![CDATA[Kafka]]></category>
		<category><![CDATA[Zookeeper]]></category>

		<guid isPermaLink="false">http://www.jonzobrist.com/?p=504</guid>
		<description><![CDATA[Roughly followed quickstart guide http://incubator.apache.org/kafka/quickstart.html Need Java? Pissed that Ubuntu dropped official Sun JDK from their Partner Repository? Use https://launchpad.net/~ferramroberto/+archive/java Need this to add-apt-repository apt-get install -y python-software-properties sudo add-apt-repository ppa:ferramroberto/java apt-get update apt-get -y install sun-java6-jdk java -version #Should return something like java version &#8220;1.6.0_26&#8243; Java(TM) SE Runtime Environment (build 1.6.0_26-b03) Java HotSpot(TM) 64-Bit [...]
Related posts:<ol>
<li><a href='http://www.jonzobrist.com/2012/01/06/capturing-users-ip-addresses-in-apache-httpd-and-tomcat-logs-behind-an-elb/' rel='bookmark' title='Capturing users IP addresses in Apache httpd and Tomcat logs behind an ELB'>Capturing users IP addresses in Apache httpd and Tomcat logs behind an ELB</a> <small>When an Elastic Load Balancer handles a connection it sends...</small></li>
<li><a href='http://www.jonzobrist.com/2011/08/22/im-wondering-if-i-should-have-my-install-script-clone-common-linux-oss-like-red-hatcentos-and-debianubuntu/' rel='bookmark' title='I&#8217;m wondering if I should have my install script clone common Linux OS&#8217;s like Red Hat/CentOS and Debian/Ubuntu?'>I&#8217;m wondering if I should have my install script clone common Linux OS&#8217;s like Red Hat/CentOS and Debian/Ubuntu?</a> <small>So, I have a script that can run from init....</small></li>
<li><a href='http://www.jonzobrist.com/2011/06/05/howto-quick-setup-a-minecraft-server/' rel='bookmark' title='HowTo Quick Setup a Minecraft Server'>HowTo Quick Setup a Minecraft Server</a> <small>My kids have dove into the game Minecraft and one...</small></li>
</ol>

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2012%2F04%2F17%2Finstall-apache-kafka-and-zookeeper-on-ubuntu-10-04%2F' data-shr_title='Install+Clustered+%284+nodes%29+Apache+Kafka+and+Zookeeper+on+Ubuntu+10.04'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2012%2F04%2F17%2Finstall-apache-kafka-and-zookeeper-on-ubuntu-10-04%2F' data-shr_title='Install+Clustered+%284+nodes%29+Apache+Kafka+and+Zookeeper+on+Ubuntu+10.04'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2012%2F04%2F17%2Finstall-apache-kafka-and-zookeeper-on-ubuntu-10-04%2F' data-shr_title='Install+Clustered+%284+nodes%29+Apache+Kafka+and+Zookeeper+on+Ubuntu+10.04'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetTop Automatic --><address>Roughly followed quickstart guide<br />
<a title="Apache Kafka Quickstart" href="http://incubator.apache.org/kafka/quickstart.html" target="_blank">http://incubator.apache.org/kafka/quickstart.html</a></address>
<p><strong>Need Java?</strong> Pissed that Ubuntu dropped official Sun JDK from their Partner Repository?<br />
Use<br />
<a title="Sun JDK for Ubuntu 10.04" href="https://launchpad.net/~ferramroberto/+archive/java" target="_blank">https://launchpad.net/~ferramroberto/+archive/java</a><br />
Need this to add-apt-repository<br />
apt-get install -y python-software-properties<br />
sudo add-apt-repository ppa:ferramroberto/java<br />
apt-get update<br />
apt-get -y install sun-java6-jdk<br />
java -version<br />
#Should return something like<br />
java version &#8220;1.6.0_26&#8243;<br />
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)<br />
Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02, mixed mode)</p>
<h3>#Setup the Kafka user, install Kafka</h3>
<p>I&#8217;m using 4 nodes, their IP&#8217;s are 192.168.1.50,51,52,53, all run Kafka and Zookeeper. The Zookeeper Admin guide recommends an odd number for the ensemble so majority rule is less likely to be split evenly/split brain style. <del>although I did get an error from one of them urging me to run either Kafka or Zookeeper in an odd number of nodes, which I&#8217;m not sure the reasoning behind.</del></p>
<p>groupadd -g 3320 kafka<br />
useradd -m -d /usr/local/kafka -s /bin/bash -u 3320 -g 3320 kafka<br />
wget http://people.apache.org/~nehanarkhede/kafka-0.7.0-incubating/kafka-0.7.0-incubating-src.tar.gz<br />
tar -zxvf kafka-0.7.0-incubating-src.tar.gz<br />
cd kafka-0.7.0-incubating-src<br />
mv * ~kafka/<br />
chown -R kafka:kafka ~kafka<br />
chown -R kafka:kafka ~kafka/*</p>
<p>su kafka</p>
<p>echo &#8216;declare -x JAVA_OPTS=&#8221;-Xmx3600M -Xms256M&#8221;&#8216; &gt;&gt; ~/.bashrc<br />
echo &#8216;declare -x PATH=&#8221;${HOME}/bin:${PATH}&#8221;&#8216; &gt;&gt; ~/.bashrc<br />
mkdir -p ~/zookeeper ~/logs ~/run/logs<br />
#Configure Kafka<br />
#setup myid file, myid has to match the server&#8217;s setting in ~kafka/config/zookeeper.properties<br />
#This will be different on each server (1,2,3,4)<br />
echo &#8220;2&#8243; &gt; /usr/local/kafka/zookeeper/myid<br />
#Setup Kafka&#8217;s config file, needs direct pointers to all servers in the Kafka cluster on the zk.connect setting</p>
<pre> brokerid=2
 port=9092
 num.threads=8
 socket.send.buffer=1048576
 socket.receive.buffer=1048576
 max.socket.request.bytes=104857600
 log.dir=/usr/local/kafka/logs
 num.partitions=1
 log.flush.interval=10000
 log.default.flush.interval.ms=1000
 log.default.flush.scheduler.interval.ms=1000
 log.retention.hours=168
 log.file.size=536870912
 log.cleanup.interval.mins=1
 enable.zookeeper=true
 zk.connect=192.168.1.50:2181,192.168.1.51:2181,192.168.1.52:2181,192.168.1.53:2181
 zk.connectiontimeout.ms=1000000</pre>
<p>#Setup Zookeeper&#8217;s config file, needs server.X for each node along with IP:port:port<br />
vi config/zookeeper.properties</p>
<pre>dataDir=/tmp/zookeeper
 clientPort=2181
 maxClientCnxns=0
 tickTime=2000
 dataDir=/usr/local/kafka/zookeeper/
 initLimit=5
 syncLimit=2
 server.1=192.168.1.50:2888:3888
 server.2=192.168.1.51:2888:3888
 server.3=192.168.1.52:2888:3888
 server.4=192.168.1.53:2888:3888</pre>
<p>#Setup Kafka&#8217;s producer.properties</p>
<pre> broker.list=1:192.168.1.50:9092,2:192.168.1.51:9092,3:192.168.1.52:9092,4:192.168.1.53:9092
 zk.connect=192.168.1.50:2181,192.168.1.51:2181,192.168.1.52:2181,192.168.1.53:2181
 producer.type=sync
 compression.codec=0
 serializer.class=kafka.serializer.StringEncoder</pre>
<p>#Setup Kafka&#8217;s consumer.properties</p>
<pre> zk.connect=192.168.1.50:2181,192.168.1.51:2181,192.168.1.52:2181,192.168.1.53:2181
 zk.connectiontimeout.ms=1000000
 groupid=test-consumer-group</pre>
<p>#Start it all, the docs say to use something like djb&#8217;s daemon tools, but for now I just run these in a screen, as user kafka</p>
<pre>screen -R zookeeper
cd
~/bin/zookeeper-server-start.sh ~/config/zookeeper.properties
CTRL+A D

screen -R kafka
cd
~/bin/kafka-server-start.sh ~/config/server.properties
CTRL+A D</pre>
<p>Check zookeeper</p>
<pre>telnet localhost 2181
ruok</pre>
<p>#expect back imok</p>
<p>#Send some Kafka messages<br />
#Start Producer</p>
<pre>bin/kafka-console-producer.sh --zookeeper localhost:2181 --topic test
This is a test
This is more testing</pre>
<p>#Shutdown producer<br />
CTRL+D<br />
#Start consumer<br />
#Receive the messages</p>
<pre>bin/kafka-console-consumer.sh --zookeeper localhost:2181 --topic test --from-beginning</pre>
<p>#Expect to see<br />
This is a test<br />
This is more testing<br />
References<br />
<a href="http://incubator.apache.org/kafka/quickstart.html" target="_blank">http://incubator.apache.org/kafka/quickstart.html<br />
</a><a href="http://zookeeper.apache.org/doc/trunk/zookeeperAdmin.html" target="_blank">http://zookeeper.apache.org/doc/trunk/zookeeperAdmin.html<br />
</a><a href="http://zookeeper.apache.org/doc/r3.4.3/recipes.html" target="_blank">http://zookeeper.apache.org/doc/r3.4.3/recipes.html<br />
</a><a href="http://zookeeper.apache.org/doc/trunk/zookeeperJMX.html" target="_blank">http://zookeeper.apache.org/doc/trunk/zookeeperJMX.html</a></p>
<p>Download Kafka from<br />
<a href="http://incubator.apache.org/kafka/downloads.html" target="_blank">http://incubator.apache.org/kafka/downloads.html</a></p>
<p>&nbsp;</p>
<div class="shr-publisher-504"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2012%2F04%2F17%2Finstall-apache-kafka-and-zookeeper-on-ubuntu-10-04%2F' data-shr_title='Install+Clustered+%284+nodes%29+Apache+Kafka+and+Zookeeper+on+Ubuntu+10.04'></a><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2012%2F04%2F17%2Finstall-apache-kafka-and-zookeeper-on-ubuntu-10-04%2F'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2012%2F04%2F17%2Finstall-apache-kafka-and-zookeeper-on-ubuntu-10-04%2F' data-shr_title='Install+Clustered+%284+nodes%29+Apache+Kafka+and+Zookeeper+on+Ubuntu+10.04'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><p>Related posts:<ol>
<li><a href='http://www.jonzobrist.com/2012/01/06/capturing-users-ip-addresses-in-apache-httpd-and-tomcat-logs-behind-an-elb/' rel='bookmark' title='Capturing users IP addresses in Apache httpd and Tomcat logs behind an ELB'>Capturing users IP addresses in Apache httpd and Tomcat logs behind an ELB</a> <small>When an Elastic Load Balancer handles a connection it sends...</small></li>
<li><a href='http://www.jonzobrist.com/2011/08/22/im-wondering-if-i-should-have-my-install-script-clone-common-linux-oss-like-red-hatcentos-and-debianubuntu/' rel='bookmark' title='I&#8217;m wondering if I should have my install script clone common Linux OS&#8217;s like Red Hat/CentOS and Debian/Ubuntu?'>I&#8217;m wondering if I should have my install script clone common Linux OS&#8217;s like Red Hat/CentOS and Debian/Ubuntu?</a> <small>So, I have a script that can run from init....</small></li>
<li><a href='http://www.jonzobrist.com/2011/06/05/howto-quick-setup-a-minecraft-server/' rel='bookmark' title='HowTo Quick Setup a Minecraft Server'>HowTo Quick Setup a Minecraft Server</a> <small>My kids have dove into the game Minecraft and one...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.jonzobrist.com/2012/04/17/install-apache-kafka-and-zookeeper-on-ubuntu-10-04/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>50,000 ft view for Asynchronous MySQL replication for HA, DW, and DR</title>
		<link>http://www.jonzobrist.com/2012/03/25/50000-ft-view-for-asynchronous-mysql-replication-for-ha-dw-and-dr/</link>
		<comments>http://www.jonzobrist.com/2012/03/25/50000-ft-view-for-asynchronous-mysql-replication-for-ha-dw-and-dr/#comments</comments>
		<pubDate>Sun, 25 Mar 2012 12:04:27 +0000</pubDate>
		<dc:creator>Jon Zobrist</dc:creator>
				<category><![CDATA[AWS]]></category>
		<category><![CDATA[Bash]]></category>
		<category><![CDATA[EBS]]></category>
		<category><![CDATA[EC2]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[MySQL Server Support]]></category>
		<category><![CDATA[S3]]></category>
		<category><![CDATA[Amazon]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[backups]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[Disaster Recovery]]></category>
		<category><![CDATA[ec2-consistent-snapshot]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[snapshots]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://www.jonzobrist.com/?p=492</guid>
		<description><![CDATA[I&#8217;ve been meaning to writeup a detailed account of the Asynchronous binlog replication I&#8217;ve been running for almost 2 years, and it&#8217;s never the right time, so I&#8217;m going to put this short version up, and see if anyone is interested. I plan to post the Bash scripts on github soon, if you want them [...]
Related posts:<ol>
<li><a href='http://www.jonzobrist.com/2011/08/22/im-wondering-if-i-should-have-my-install-script-clone-common-linux-oss-like-red-hatcentos-and-debianubuntu/' rel='bookmark' title='I&#8217;m wondering if I should have my install script clone common Linux OS&#8217;s like Red Hat/CentOS and Debian/Ubuntu?'>I&#8217;m wondering if I should have my install script clone common Linux OS&#8217;s like Red Hat/CentOS and Debian/Ubuntu?</a> <small>So, I have a script that can run from init....</small></li>
<li><a href='http://www.jonzobrist.com/2011/10/24/script-to-rotate-the-mysql-general-query-log/' rel='bookmark' title='Script to rotate the MySQL General Query Log'>Script to rotate the MySQL General Query Log</a> <small>You want general query logging in, but don&#8217;t want to...</small></li>
<li><a href='http://www.jonzobrist.com/2011/06/28/thinking-about-hosting-a-wordpress-site-on-s3/' rel='bookmark' title='Thinking about hosting a WordPress site on S3'>Thinking about hosting a WordPress site on S3</a> <small>I recently moved my Joomla backed consulting website completely to...</small></li>
</ol>

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2012%2F03%2F25%2F50000-ft-view-for-asynchronous-mysql-replication-for-ha-dw-and-dr%2F' data-shr_title='50%2C000+ft+view+for+Asynchronous+MySQL+replication+for+HA%2C+DW%2C+and+DR'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2012%2F03%2F25%2F50000-ft-view-for-asynchronous-mysql-replication-for-ha-dw-and-dr%2F' data-shr_title='50%2C000+ft+view+for+Asynchronous+MySQL+replication+for+HA%2C+DW%2C+and+DR'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2012%2F03%2F25%2F50000-ft-view-for-asynchronous-mysql-replication-for-ha-dw-and-dr%2F' data-shr_title='50%2C000+ft+view+for+Asynchronous+MySQL+replication+for+HA%2C+DW%2C+and+DR'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetTop Automatic --><p>I&#8217;ve been meaning to writeup a detailed account of the Asynchronous binlog replication I&#8217;ve been running for almost 2 years, and it&#8217;s never the right time, so I&#8217;m going to put this short version up, and see if anyone is interested.</p>
<p>I plan to post the Bash scripts on github soon, if you want them before I do, feel free to email me <a href="mailto:jon@jonzobrist.com">jon@jonzobrist.com</a></p>
<p>Let me address the awful acronym soup!</p>
<p><a title="High Availability Wikipedia Article" href="http://en.wikipedia.org/wiki/High_availability" target="_blank">HA = High Availability</a></p>
<p><a title="Wikipedia Article on Data Warehousing" href="http://en.wikipedia.org/wiki/Data_warehousing" target="_blank">DW = Data Warehousing</a></p>
<p><a title="Wikipedia Article on Disaster Recovery" href="http://en.wikipedia.org/wiki/Disaster_recovery" target="_blank">DR = Disaster Recovery</a></p>
<p>And, of course, you probably know our good friend, <a title="MySQL Database" href="http://www.mysql.com" target="_blank">MySQL</a>.</p>
<p>The problem this setup tries to address is how to gain better uptime (our HA part), be prepared to handle the wide array of disasters (DR), and use some of this data shipping legwork to feed our data sales team and clients (DW), all while keeping things affordable on Amazon&#8217;s cloud computing platform, <a title="Amazon Web Services (AWS)" href="http://aws.amazon.com/" target="_blank">AWS</a>.</p>
<p>I do not claim that this is the best way to do things, and there are some caveats I detail below.</p>
<p>If you merely want one region backups of your database, I highly recommend you checkout Eric Hammond&#8217;s excellent tool <a title="EC2 Consistent Snapshot for Amazon AWS" href="https://launchpad.net/ec2-consistent-snapshot" target="_blank">ec2-consistent-snapshot</a>.</p>
<p>If you want multi-region (or multi-country) disaster recovery, perhaps a setup like the one I&#8217;ve made would be best.</p>
<p>Or you may have a use for asynchronous database replication that this fits.</p>
<div id="attachment_493" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.jonzobrist.com/wp-content/uploads/2012/03/Overview-of-Async-Binlog-shipping.png"><img class="size-medium wp-image-493" title="Overview of Async Binlog shipping" src="http://www.jonzobrist.com/wp-content/uploads/2012/03/Overview-of-Async-Binlog-shipping-300x225.png" alt="" width="300" height="225" /></a><p class="wp-caption-text">Overview of Async Binlog shipping</p></div>
<p>Let&#8217;s go through it in a nice, ordered list.</p>
<p>Setup :</p>
<ol>
<li>Production MySQL cluster has the normal master/slave replication strategy</li>
<li>A full locking backup is taken and manually restored onto a permanent EBS volume</li>
<ol>
<li>Note &#8211; This EBS volume has a full install of MySQL server</li>
</ol>
<li>The binlog from when the locking backup was taken is replayed from the log position onward</li>
<li>List files are setup on the volume indicating which files are already replayed and which are new and ready to be replayed</li>
<li>The remaining binlog files are processed, leaving a MySQL server updated from when the latest binlogs were transferred</li>
<li>Data is imported into the Data Warehouse</li>
<li>MySQL is shut down, the volume is unmounted and detached, the instance is then terminated</li>
<li>A snapshot of the volume is taken within AWS. This copies any changed data and puts it into S3.</li>
</ol>
<p>Now that the volume is setup, we setup an automated job that runs daily that updates the volumes :</p>
<ol>
<li>The EBS volume is mounted on the server running the job</li>
<li>S3 bucket is checked for new files, anything new is downloaded, decrypted and placed onto the EBS volume</li>
<li>The volume is unmounted, a new instance is launched</li>
<li>Once the instance is up and running, the volume is attached to it, mounted, any dependencies for MySQL are installed, and MySQL server is started</li>
<li>The decrypted binlogs are played back in order until they are all completed</li>
<li>Data is imported into the Data Warehouse</li>
<li>MySQL is stopped, the volume unmounted and snapshotted</li>
<li>The instance is terminated</li>
</ol>
<div>A recovery from failure of the master/slave MySQL looks something like this :</div>
<div>
<ol>
<li>If you can, get any binlog files encrypted and put into S3 from the master</li>
<li>Run the download/decrypt job/restore/stop/snapshot processes</li>
<li>Create a new volume from the snapshot -or- don&#8217;t have shutdown the node and make changes to get your application using the new database server.</li>
</ol>
</div>
<p>Caveats :</p>
<ul>
<li>No temp tables &#8211; There are certain operations, largely involving the use of MySQL temp tables, that are not very asynchronous replication friendly. These kinds of things break my setup and require a resync with a full backup. I believe the goal for fixing this is to have a bit of pre-processing on the binlogs to either concatenate them all into one (which would lessen, but not eliminate the problem), or to be aware of things that are replication unfriendly and not execute them until it has the missing parts.</li>
<li>GPG is using real encryption &#8211; If you lose your keys, you lose your encrypted data.</li>
<li>All of the uses of Amazon&#8217;s services incur costs, that you will have to pay-  This should go without saying, but remember, YOU are responsible for putting files into AWS, and these scripts and methods are merely a tool.</li>
<li>Backups are not encrypted everywhere. If you have sensitive data you may way to use an encrypted volume on the EBS volumes.</li>
</ul>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div class="shr-publisher-492"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2012%2F03%2F25%2F50000-ft-view-for-asynchronous-mysql-replication-for-ha-dw-and-dr%2F' data-shr_title='50%2C000+ft+view+for+Asynchronous+MySQL+replication+for+HA%2C+DW%2C+and+DR'></a><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2012%2F03%2F25%2F50000-ft-view-for-asynchronous-mysql-replication-for-ha-dw-and-dr%2F'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2012%2F03%2F25%2F50000-ft-view-for-asynchronous-mysql-replication-for-ha-dw-and-dr%2F' data-shr_title='50%2C000+ft+view+for+Asynchronous+MySQL+replication+for+HA%2C+DW%2C+and+DR'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><p>Related posts:<ol>
<li><a href='http://www.jonzobrist.com/2011/08/22/im-wondering-if-i-should-have-my-install-script-clone-common-linux-oss-like-red-hatcentos-and-debianubuntu/' rel='bookmark' title='I&#8217;m wondering if I should have my install script clone common Linux OS&#8217;s like Red Hat/CentOS and Debian/Ubuntu?'>I&#8217;m wondering if I should have my install script clone common Linux OS&#8217;s like Red Hat/CentOS and Debian/Ubuntu?</a> <small>So, I have a script that can run from init....</small></li>
<li><a href='http://www.jonzobrist.com/2011/10/24/script-to-rotate-the-mysql-general-query-log/' rel='bookmark' title='Script to rotate the MySQL General Query Log'>Script to rotate the MySQL General Query Log</a> <small>You want general query logging in, but don&#8217;t want to...</small></li>
<li><a href='http://www.jonzobrist.com/2011/06/28/thinking-about-hosting-a-wordpress-site-on-s3/' rel='bookmark' title='Thinking about hosting a WordPress site on S3'>Thinking about hosting a WordPress site on S3</a> <small>I recently moved my Joomla backed consulting website completely to...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.jonzobrist.com/2012/03/25/50000-ft-view-for-asynchronous-mysql-replication-for-ha-dw-and-dr/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My response to &#8220;Is the Cloud Undermining Enterprise Disaster Recovery&#8221; @aryakanetworks [No]</title>
		<link>http://www.jonzobrist.com/2012/03/22/my-response-to-is-the-cloud-undermining-enterprise-disaster-recovery-aryakanetworks-no/</link>
		<comments>http://www.jonzobrist.com/2012/03/22/my-response-to-is-the-cloud-undermining-enterprise-disaster-recovery-aryakanetworks-no/#comments</comments>
		<pubDate>Thu, 22 Mar 2012 23:13:53 +0000</pubDate>
		<dc:creator>Jon Zobrist</dc:creator>
				<category><![CDATA[AWS]]></category>
		<category><![CDATA[EC2]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[Amazon]]></category>
		<category><![CDATA[Aryaka]]></category>
		<category><![CDATA[Disaster Recovery]]></category>
		<category><![CDATA[DR]]></category>
		<category><![CDATA[S3]]></category>

		<guid isPermaLink="false">http://www.jonzobrist.com/?p=484</guid>
		<description><![CDATA[Disagree completely with your assessment of Cloud Computing Disastery Recovery. With Amazon EC2 we have &#60; 1 hour fail over for complete region loss, we can durably snapshot our volumes with a few seconds of a pause. We can test our DR for &#60; $100. If a Disaster may affect the primary and secondary site, [...]
Related posts:<ol>
<li><a href='http://www.jonzobrist.com/2011/09/24/reading-peecho-minimizing-downtime-on-amazon-aws/' rel='bookmark' title='Reading : Peecho Minimizing Downtime on Amazon AWS'>Reading : Peecho Minimizing Downtime on Amazon AWS</a> <small>&nbsp; What the guys over at Peecho have done is...</small></li>
<li><a href='http://www.jonzobrist.com/2011/06/28/thinking-about-hosting-a-wordpress-site-on-s3/' rel='bookmark' title='Thinking about hosting a WordPress site on S3'>Thinking about hosting a WordPress site on S3</a> <small>I recently moved my Joomla backed consulting website completely to...</small></li>
<li><a href='http://www.jonzobrist.com/2011/10/09/my-comments-on-cheap-hosting-amazon-aws-blog-post/' rel='bookmark' title='My Comments on &#8216;Cheap Hosting Amazon AWS&#8217; Blog Post'>My Comments on &#8216;Cheap Hosting Amazon AWS&#8217; Blog Post</a> <small>My Comments on the post “Cheap Hosting Case Study: You...</small></li>
</ol>

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2012%2F03%2F22%2Fmy-response-to-is-the-cloud-undermining-enterprise-disaster-recovery-aryakanetworks-no%2F' data-shr_title='My+response+to+%22Is+the+Cloud+Undermining+Enterprise+Disaster+Recovery%22+%40aryakanetworks+%5BNo%5D'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2012%2F03%2F22%2Fmy-response-to-is-the-cloud-undermining-enterprise-disaster-recovery-aryakanetworks-no%2F' data-shr_title='My+response+to+%22Is+the+Cloud+Undermining+Enterprise+Disaster+Recovery%22+%40aryakanetworks+%5BNo%5D'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2012%2F03%2F22%2Fmy-response-to-is-the-cloud-undermining-enterprise-disaster-recovery-aryakanetworks-no%2F' data-shr_title='My+response+to+%22Is+the+Cloud+Undermining+Enterprise+Disaster+Recovery%22+%40aryakanetworks+%5BNo%5D'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Disagree completely with your assessment of Cloud Computing Disastery Recovery. With Amazon EC2 we have &lt; 1 hour fail over for complete region loss, we can durably snapshot our volumes with a few seconds of a pause. We can test our DR for &lt; $100. If a Disaster may affect the primary and secondary site, it&#8217;s trivial to add a third, or a fourth, or a fifth. If you have enough data and want to be sure you don&#8217;t have to rely on the Internet, Amazon Direct Connect (1Gbps $.30/hr, 10Gpbs $2.25/hr) DR is one of the key benefits to Cloud Computing. Should&#8217;t WAN optimization help you effectively use Cloud Computing?<br />
Original URL of article  <a href="http://www.aryaka.com/2012/02/22/is-the-cloud-undermining-enterprise-disaster-recovery">http://www.aryaka.com/2012/02/22/is-the-cloud-undermining-enterprise-disaster-recovery</a></p>
<div class="shr-publisher-484"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2012%2F03%2F22%2Fmy-response-to-is-the-cloud-undermining-enterprise-disaster-recovery-aryakanetworks-no%2F' data-shr_title='My+response+to+%22Is+the+Cloud+Undermining+Enterprise+Disaster+Recovery%22+%40aryakanetworks+%5BNo%5D'></a><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2012%2F03%2F22%2Fmy-response-to-is-the-cloud-undermining-enterprise-disaster-recovery-aryakanetworks-no%2F'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2012%2F03%2F22%2Fmy-response-to-is-the-cloud-undermining-enterprise-disaster-recovery-aryakanetworks-no%2F' data-shr_title='My+response+to+%22Is+the+Cloud+Undermining+Enterprise+Disaster+Recovery%22+%40aryakanetworks+%5BNo%5D'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><p>Related posts:<ol>
<li><a href='http://www.jonzobrist.com/2011/09/24/reading-peecho-minimizing-downtime-on-amazon-aws/' rel='bookmark' title='Reading : Peecho Minimizing Downtime on Amazon AWS'>Reading : Peecho Minimizing Downtime on Amazon AWS</a> <small>&nbsp; What the guys over at Peecho have done is...</small></li>
<li><a href='http://www.jonzobrist.com/2011/06/28/thinking-about-hosting-a-wordpress-site-on-s3/' rel='bookmark' title='Thinking about hosting a WordPress site on S3'>Thinking about hosting a WordPress site on S3</a> <small>I recently moved my Joomla backed consulting website completely to...</small></li>
<li><a href='http://www.jonzobrist.com/2011/10/09/my-comments-on-cheap-hosting-amazon-aws-blog-post/' rel='bookmark' title='My Comments on &#8216;Cheap Hosting Amazon AWS&#8217; Blog Post'>My Comments on &#8216;Cheap Hosting Amazon AWS&#8217; Blog Post</a> <small>My Comments on the post “Cheap Hosting Case Study: You...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.jonzobrist.com/2012/03/22/my-response-to-is-the-cloud-undermining-enterprise-disaster-recovery-aryakanetworks-no/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Goodbye Linux Desktop, Hello Windows 7</title>
		<link>http://www.jonzobrist.com/2012/02/18/goodbye-linux-desktop-hello-windows-7/</link>
		<comments>http://www.jonzobrist.com/2012/02/18/goodbye-linux-desktop-hello-windows-7/#comments</comments>
		<pubDate>Sat, 18 Feb 2012 19:32:54 +0000</pubDate>
		<dc:creator>Jon Zobrist</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Linux Support - Desktops]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Windows Support - Desktop]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[cygwin]]></category>
		<category><![CDATA[Desktop]]></category>
		<category><![CDATA[Desktop Computing]]></category>
		<category><![CDATA[Farewells]]></category>
		<category><![CDATA[Linux on the Desktop]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[Windows 7]]></category>

		<guid isPermaLink="false">http://www.jonzobrist.com/?p=467</guid>
		<description><![CDATA[I have not run a Windows desktop since the 90s. I migrated from Windows 95 to FreeBSD with Enlightenment (e) and never looked back. Over the years I gradually shifted to Linux with e, every now and then switching to GNOME, KDE, or Fluxbox. These were always short lived, and I always ended up on [...]
No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2012%2F02%2F18%2Fgoodbye-linux-desktop-hello-windows-7%2F' data-shr_title='Goodbye+Linux+Desktop%2C+Hello+Windows+7'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2012%2F02%2F18%2Fgoodbye-linux-desktop-hello-windows-7%2F' data-shr_title='Goodbye+Linux+Desktop%2C+Hello+Windows+7'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2012%2F02%2F18%2Fgoodbye-linux-desktop-hello-windows-7%2F' data-shr_title='Goodbye+Linux+Desktop%2C+Hello+Windows+7'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetTop Automatic --><p>I have not run a Windows desktop since the 90s. I migrated from Windows 95 to <a title="FreeBSD" href="http://www.freebsd.org" target="_blank">FreeBSD</a> with <a title="E" href="http://www.enlightenment.org" target="_blank">Enlightenment </a>(e) and never looked back. Over the years I gradually shifted to Linux with e, every now and then switching to <a title="GNOME" href="http://www.gnome.org" target="_blank">GNOME</a>, <a title="KDE" href="http://www.kde.com" target="_blank">KDE</a>, or <a title="Fluxbox" href="http://fluxbox.org" target="_blank">Fluxbox</a>. These were always short lived, and I always ended up on e again. I was sad when e missed a few major chances to update or add new things, and the next version seemed like an awesome set of libraries, but never materialized as a usable desktop (yet). I would try out the new e every now and then. And then I found Beryl, which made GNOME much more usable, and shiny pretty flashy all at once. During the chaos of the Beryl/Compiz departure/re-joining, I would alternate between old e and GNOME/Beryl/<a title="Compiz" href="http://www.compiz.org" target="_blank">Compiz</a>. Eventually Compiz stabilized and GNOME/Compiz was the desktop for me for years. It worked, I was happy, and nothing else seemed to be even plausibly better.</p>
<p>Then one day I became rudely awakened that my favorite Linux Distro (<a title="Ubuntu" href="http://www.ubuntu.org" target="_blank">Ubuntu</a>) had gone down some horrible path and decided to make a new, completely lame, desktop called <a title="Ubuntu Unity Sucks" href="http://unity.ubuntu.com/" target="_blank">Unity</a>. Being used to the open source world, and the total amount of control I didn&#8217;t worry about it. I gave Unity a few hours research, a few weeks trial in use, decided it was a pile of steaming shit, and moved back to my GNOME/Compiz. After upgrading my home Ubuntu to the latest/greatest version I was given another rude awakening. NO MORE GNOME/Compiz. W-T-F. Sure, I could go back and build it myself, but I have grown lazy (not to mention busy), and if I wanted LFS I would have LFS. I did a little research, downgraded my Ubuntu and went happily back to GNOME/Compiz on 10.04. Then, a co-worker who had run into much the same problem told me that <a title="Linux Mint" href="http://www.linuxmint.com" target="_blank">Linux Mint</a> had &#8220;solved&#8221; the GNOME 3/Unity dilemma rather aptly. As Mint had been the version of Linux I recommend to anyone for desktop use, and only did not use since I wanted my Linux to  match the Linux I used in production as closely as possible, I was hopeful. They had a GNOME 3 hackup with Compiz to act much like the GNOME/Compiz I had known and loved. I quickly jumped ships to Mint, and have been happy there for the past few months.</p>
<p>The problem with Mint, however, is that they have diverged from some of the basic functionality I am used to in Linux. I&#8217;m sure I could spend the time and &#8220;fix&#8221; this, but the fact these minor issues were not a simple option in the control panel, and that they had deviated from &#8220;standard&#8221; Linux (read every other version I have used ever), was not a good sign. The best illustration of this is that when I highlight something in Linux with a quick slick and drag with my mouse, it is immediately and awesomely put onto my middle click clip board. I use this probably 300 times a day, and it is the main reason I ever touch my mouse.</p>
<p>Thus my Linux world has been shattered. Now, I&#8217;m not crazy enough to consider running Windows on an actual production server, and my deepest sympathy to those of you who have made this error, but I do need a functional, working, usable, desktop. And Linux has consistently been in decline in this area. It&#8217;s probably worth mentioning that other areas of Linux have been annoying over the last few years, kernel &#8220;taint&#8221;? Really? Grow up guys, if I want binary close sourced drivers, I don&#8217;t need a nag that my junk is now &#8216;tainted&#8217;, and I don&#8217;t really give a shit if you&#8217;re hungup on it. In addition, there have been a boatload of security problems userspace to kernel that have made Linux security less defensible, and this was one of the key areas for it&#8217;s widespread adoption on servers. Throw in the occasional kernel panic bug, and Linux doesn&#8217;t get let into the club house of bomb proof OS&#8217;s like <a title="FreeBSD" href="http://www.freebsd.org" target="_blank">FreeBSD </a>and <a title="OpenBSD" href="http://www.openbsd.org" target="_blank">openBSD</a>.</p>
<p>So, being of sound mind and reasonable technical aptitude, I decided that Mac OS X was the way to go. I already have MacBooks, Mac Mini&#8217;s, iMacs, iPhones, iPods, iPads, I ought to run OS X on my main workstation. Sadly I am not retarded enough to throw money away on a Mac Desktop, even though they are very nice, so I decided to go the <a title="Hackintosh" href="http://www.hackintosh.com/" target="_blank">Hackintosh</a> route. This is a very good route, and I have bought more than all versions of <a title="Mac OS X" href="http://www.apple.com/macosx/" target="_blank">OS X</a> from <a title="Apple" href="http://www.apple.com/" target="_blank">Apple</a>. I got a USB drive and hit the forums on <a href="http://tonymacx86.com/">http://tonymacx86.com/</a> and decided I was already in luck, having a Gigabyte motherboard, an Nvidia graphics card, plenty of RAM and a fast CPU. I installed my first Hackintosh and was up and running in less than an hour. It was awesome. I was excited. This was a good progress. But, no sound. I searched forums, and tried a few things, but, again, lazy and busy. Having no sound via my HDMI connection to my home TV/stereo was a deal breaker. I wasn&#8217;t ready to admit it, so I tried installing my hackintosh on my work computer. It worked much less well. Intel CPU, intel chipset, but not Gigabyte, and not working easily. I went back to Linux, and decided to hold off on change for now.</p>
<p>Mint wasn&#8217;t bad, and I had a lot to get done. I swapped computers to one that would more likely work as a hackintosh. But, it was already running Windows, and I was more busy than normal. I decided to give ole Windows 7 a try again. I&#8217;ve used it, not hated it, and generally ignored it. I grabbed my usual program suites and was off to the races in less than an hour. I had forgotten the vast array of available software that I did not get on a Linux or even Mac platform. <a title="Skype" href="http://Skype.com" target="_blank">Skype </a>on Mac is pretty good, but the Linux version is a steaming pile, and both seem to lag a fair amount behind Skype on Windows. As Skype is one of my major methods of production communication, this was a big check in the plus column for Windows. After setting up <a title="Cygwin" href="http://www.cygwin.com/" target="_blank">cygwin </a> (I need grep, it&#8217;s what I do), <a title="Putty" href="http://www.chiark.greenend.org.uk/~sgtatham/putty/" target="_blank">Putty</a>, <a title="WinSCP" href="http://winscp.net/eng/index.php" target="_blank">Winscp</a>, <a title="Chrome" href="http://www.google.com/chrome/" target="_blank">Chrome</a>, <a title="Mozilla Firefox" href="http://www.firefox.org" target="_blank">Firefox</a>, <a title="Gvim Vim" href="http://www.vim.org/download.php" target="_blank">gvim</a>, <a title="Dropbox" href="http://www.dropbox.com" target="_blank">Dropbox</a>, <a title="Evernote" href="http://www.evernote.com/" target="_blank">Evernote</a> (way better on Windows), <a title="7-zip" href="http://7-zip.org" target="_blank">7-zip</a>, <a title="Truecrypt" href="http://www.truecrypt.com" target="_blank">Truecrypt</a>, <a title="Gimp" href="http://www.gimp.org" target="_blank">GIMP</a>, <a title="LibreOffice" href="http://www.libreoffice.org" target="_blank">LibreOffice</a>, <a title="python" href="http://www.python.com" target="_blank">python</a>, <a title="Strawberry Perl" href="http://www.strawberryperl.com" target="_blank">Strawberry Perl</a> (where did this come from? Awesomeland?), <a title="Pidgin" href="http://www.pidgin.im/" target="_blank">pidgin</a>, <a title="pidgin-otr" href="http://www.cypherpunks.ca/otr/" target="_blank">pidgin-otr</a>, and a few tweaks to my command setup, I was completely back in business. The new ways Windows shows off multiple windows is much better than how it used to be. I still haven&#8217;t setup any multiple desktops or window groups, but I&#8217;m hopeful that won&#8217;t be too hard. After this I found there are a lot of FOSS packages out there for Windows.</p>
<p>I spent some time getting cygwin opensshd to allow me to remotely connect via a secure bash terminal. In the end this was actually fairly simple, but did not seem to be well documented anywhere I could find. I vow to make a post with big pictures titled &#8220;Step by step cygwin openssh sshd servers howto&#8221;. Now, I can remote into my Windows boxes via ssh with public key authentication and run both bash and Windows commands from the cygwin shell.</p>
<p>One of the most exciting things about coming back to Windows is Microsoft PowerShell. I follow a few people on Twitter who are always posting cool PowerShell scripts, and I wished I had access to this new, exciting, tool. I hope to soon have ssh-&gt;bash/cmd/powershell to all of my windows boxes. I admit I really do run a few Windows servers, but only because I have to.</p>
<p>So, with a deep sigh of parting, I have to say &#8220;Goodbye Linux on my desktop, you were awesome, and I believe you are still so. I hope to come back someday.&#8221;. At the same time &#8220;Helllloooooo Windows, what&#8217;s up you sexy devil? When did you get all grown up? New abilities? A *real* shell? SQL like data access in your shell? Open source programs? Let&#8217;s get it on!&#8221;</p>
<div class="shr-publisher-467"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2012%2F02%2F18%2Fgoodbye-linux-desktop-hello-windows-7%2F' data-shr_title='Goodbye+Linux+Desktop%2C+Hello+Windows+7'></a><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2012%2F02%2F18%2Fgoodbye-linux-desktop-hello-windows-7%2F'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2012%2F02%2F18%2Fgoodbye-linux-desktop-hello-windows-7%2F' data-shr_title='Goodbye+Linux+Desktop%2C+Hello+Windows+7'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.jonzobrist.com/2012/02/18/goodbye-linux-desktop-hello-windows-7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Capturing users IP addresses in Apache httpd and Tomcat logs behind an ELB</title>
		<link>http://www.jonzobrist.com/2012/01/06/capturing-users-ip-addresses-in-apache-httpd-and-tomcat-logs-behind-an-elb/</link>
		<comments>http://www.jonzobrist.com/2012/01/06/capturing-users-ip-addresses-in-apache-httpd-and-tomcat-logs-behind-an-elb/#comments</comments>
		<pubDate>Fri, 06 Jan 2012 18:59:34 +0000</pubDate>
		<dc:creator>Jon Zobrist</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[AWS]]></category>
		<category><![CDATA[ELB]]></category>
		<category><![CDATA[Linux Support - Servers]]></category>
		<category><![CDATA[HTTP]]></category>
		<category><![CDATA[httpd]]></category>
		<category><![CDATA[HTTPS]]></category>
		<category><![CDATA[Tomcat]]></category>

		<guid isPermaLink="false">http://www.jonzobrist.com/?p=462</guid>
		<description><![CDATA[When an Elastic Load Balancer handles a connection it sends it&#8217;s own (internal/private/10.x) address instead of the clients. It sends the clients along with the request as X-Forwarded-For. To log this you need to log X-Forwarded-For instead of the source IP. Here are 2 links discussing the problem, the first covers a basic Apache &#38; Tomcat [...]
Related posts:<ol>
<li><a href='http://www.jonzobrist.com/2011/09/24/reading-peecho-minimizing-downtime-on-amazon-aws/' rel='bookmark' title='Reading : Peecho Minimizing Downtime on Amazon AWS'>Reading : Peecho Minimizing Downtime on Amazon AWS</a> <small>&nbsp; What the guys over at Peecho have done is...</small></li>
</ol>

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2012%2F01%2F06%2Fcapturing-users-ip-addresses-in-apache-httpd-and-tomcat-logs-behind-an-elb%2F' data-shr_title='Capturing+users+IP+addresses+in+Apache+httpd+and+Tomcat+logs+behind+an+ELB'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2012%2F01%2F06%2Fcapturing-users-ip-addresses-in-apache-httpd-and-tomcat-logs-behind-an-elb%2F' data-shr_title='Capturing+users+IP+addresses+in+Apache+httpd+and+Tomcat+logs+behind+an+ELB'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2012%2F01%2F06%2Fcapturing-users-ip-addresses-in-apache-httpd-and-tomcat-logs-behind-an-elb%2F' data-shr_title='Capturing+users+IP+addresses+in+Apache+httpd+and+Tomcat+logs+behind+an+ELB'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetTop Automatic --><p>When an Elastic Load Balancer handles a connection it sends it&#8217;s own (internal/private/10.x) address instead of the clients. It sends the clients along with the request as X-Forwarded-For. To log this you need to log X-Forwarded-For instead of the source IP.</p>
<p>Here are 2 links discussing the problem, the first covers a basic Apache &amp; Tomcat setup, but the second one has a point about direct access getting not logged and has an Apache httpd specific solution.</p>
<p><a title="Amazon ELB Capturing Client IP Address" href="http://blog.kenweiner.com/2009/09/amazon-elb-capturing-client-ip-address.html">http://blog.kenweiner.com/2009/09/amazon-elb-capturing-client-ip-address.html</a></p>
<p><a title="How to log client IP in Apache behind ELB" href="http://blog.grahampoulter.com/2011/10/how-to-log-client-ip-from-apache-behind.html">http://blog.grahampoulter.com/2011/10/how-to-log-client-ip-from-apache-behind.html</a></p>
<p>Thanks @grahampoulter and @kweiner</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div class="shr-publisher-462"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2012%2F01%2F06%2Fcapturing-users-ip-addresses-in-apache-httpd-and-tomcat-logs-behind-an-elb%2F' data-shr_title='Capturing+users+IP+addresses+in+Apache+httpd+and+Tomcat+logs+behind+an+ELB'></a><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2012%2F01%2F06%2Fcapturing-users-ip-addresses-in-apache-httpd-and-tomcat-logs-behind-an-elb%2F'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2012%2F01%2F06%2Fcapturing-users-ip-addresses-in-apache-httpd-and-tomcat-logs-behind-an-elb%2F' data-shr_title='Capturing+users+IP+addresses+in+Apache+httpd+and+Tomcat+logs+behind+an+ELB'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><p>Related posts:<ol>
<li><a href='http://www.jonzobrist.com/2011/09/24/reading-peecho-minimizing-downtime-on-amazon-aws/' rel='bookmark' title='Reading : Peecho Minimizing Downtime on Amazon AWS'>Reading : Peecho Minimizing Downtime on Amazon AWS</a> <small>&nbsp; What the guys over at Peecho have done is...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.jonzobrist.com/2012/01/06/capturing-users-ip-addresses-in-apache-httpd-and-tomcat-logs-behind-an-elb/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Script to rotate the MySQL General Query Log</title>
		<link>http://www.jonzobrist.com/2011/10/24/script-to-rotate-the-mysql-general-query-log/</link>
		<comments>http://www.jonzobrist.com/2011/10/24/script-to-rotate-the-mysql-general-query-log/#comments</comments>
		<pubDate>Tue, 25 Oct 2011 06:31:23 +0000</pubDate>
		<dc:creator>Jon Zobrist</dc:creator>
				<category><![CDATA[Bash]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[MySQL Server Support]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[Debug]]></category>
		<category><![CDATA[Debugging]]></category>
		<category><![CDATA[General Query Log]]></category>
		<category><![CDATA[Logrotate]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[MySQL Troubleshooting]]></category>
		<category><![CDATA[Rotate]]></category>
		<category><![CDATA[Troubleshooting]]></category>

		<guid isPermaLink="false">http://jonzobrist.com/?p=213</guid>
		<description><![CDATA[You want general query logging in, but don&#8217;t want to keep those pesky query log files around? I generally setup the MySQL user and run this from cron. Here&#8217;s my script to do so, here&#8217;s a gzip&#8217;d version, and here is a zipped version &#160; #!/bin/bash #setup a user in mysql with the RELOAD priviledge [...]
Related posts:<ol>
<li><a href='http://www.jonzobrist.com/2011/06/15/i-am-always-cautious-with-this-on-my-clipboard/' rel='bookmark' title='I am always cautious with this on my clipboard..'>I am always cautious with this on my clipboard..</a> <small>su mysql cd rm -Rf data/* innodb/* tmp/* logs/* mysqld/*...</small></li>
</ol>

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2011%2F10%2F24%2Fscript-to-rotate-the-mysql-general-query-log%2F' data-shr_title='Script+to+rotate+the+MySQL+General+Query+Log'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2011%2F10%2F24%2Fscript-to-rotate-the-mysql-general-query-log%2F' data-shr_title='Script+to+rotate+the+MySQL+General+Query+Log'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2011%2F10%2F24%2Fscript-to-rotate-the-mysql-general-query-log%2F' data-shr_title='Script+to+rotate+the+MySQL+General+Query+Log'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetTop Automatic --><p>You want general query logging in, but don&#8217;t want to keep those pesky query log files around?</p>
<p>I generally setup the MySQL user and run this from cron.</p>
<p>Here&#8217;s my script to do so, <a title="Rotate General Log Bash Script Gzipped" href="http://www.jonzobrist.com/files/rotate-general-log.sh.gz">here&#8217;s a gzip&#8217;d version</a>, and here is a <a title="Rotate General Log Bash Script Zipped Version" href="http://www.jonzobrist.com/files/rotate-general-log.sh.zip">zipped version</a></p>
<p>&nbsp;</p>
<pre>#!/bin/bash
#setup a user in mysql with the RELOAD priviledge
#grant RELOAD on *.* to reloader@'localhost' identified by 'PASSWORD';
#flush privileges;

user="reloader"
password="PASSWORD"
LOG="${HOME}/mysqld/mysqld.log"
LOGARCHIVE="${HOME}/logarchive"
NEW_LOG="${LOGARCHIVE}/mysqld-`date +%F-%s`.log"
KEEP_MIN=15
MAX_LOAD="5.0"
RUNFILE="${HOME}/rotate-general-log.pid"

if [ -f ${RUNFILE} ]
 then
  echo "Runfile ${RUNFILE} exists, exiting at `date`"
  ${HOME}/bin/page.sh "Runfile ${RUNFILE} exists, exiting at `date`"
  exit 1
 else
  echo "$$" &gt; ${RUNFILE}
fi

#if [ $(echo "`cut -f1 -d ' ' /proc/loadavg` &lt; ${MAX_LOAD}" | bc) -eq 1 ];
if [ $(echo "`cut -f1 -d ' ' /proc/loadavg` &lt; ${MAX_LOAD}" | bc) -eq 1 ];
 then
  echo "System load less than ${MAX_LOAD}, proceeding [DEBUG]"
else
  echo "log rotate delayed, due to system load &gt; ${MAX_LOAD}"
  ${HOME}/bin/page.sh "log rotate delayed, due to system load &gt; ${MAX_LOAD}"
  /bin/rm ${RUNFILE}
  exit 1
fi

MYSQLD_PID=`pgrep mysqld`

if [ ! "${MYSQLD_PID}" ]
 then
  echo "Mysqld is NOT running, paging and exiting at `date`"
  ${HOME}/bin/page.sh "NO MySQLD on `hostname` at `date`"
  /bin/rm ${RUNFILE}
  exit 1
else
  echo "Mysqld running at `date`, PID ${MYSQLD_PID}, continuing"
fi

if [ -d "${LOGARCHIVE}" ]
 then
  echo "Moving general log at `date`"
  /bin/mv ${LOG} ${NEW_LOG}
  touch ${LOG}
  chmod og-rwx ${LOG}
  echo "Flushing general log at `date`"
  mysqladmin -u ${user} -p --password="${password}" flush-logs
  echo "Done flushing general log at `date`"
  echo "Gzipping ${NEW_LOG} log at `date`"
  gzip ${NEW_LOG}
  echo "Done gzipping ${NEW_LOG} log at `date`"
  echo "Size is `du -sh ${LOGARCHIVE}` pre-clean"
  echo "Cleaning ${LOGARCHIVE}, deleting files older than ${KEEP_MIN} minutes at `date`"
  find ${LOGARCHIVE} -iname "*.gz" -mmin +${KEEP_MIN} -print -exec /bin/rm {} \;
  echo "Done cleaning ${LOGARCHIVE}, at `date`"
  echo "Size is `du -sh ${LOGARCHIVE}` post-clean"
else
 echo "Missing logarchive dir ${LOGARCHIVE}"
  ${HOME}/bin/page.sh "Missing logarchive dir ${LOGARCHIVE}"
 /bin/rm ${RUNFILE}
 exit 1
fi

/bin/rm ${RUNFILE}
echo "Done at `date`"</pre>
<div class="shr-publisher-213"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2011%2F10%2F24%2Fscript-to-rotate-the-mysql-general-query-log%2F' data-shr_title='Script+to+rotate+the+MySQL+General+Query+Log'></a><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2011%2F10%2F24%2Fscript-to-rotate-the-mysql-general-query-log%2F'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fwww.jonzobrist.com%2F2011%2F10%2F24%2Fscript-to-rotate-the-mysql-general-query-log%2F' data-shr_title='Script+to+rotate+the+MySQL+General+Query+Log'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><p>Related posts:<ol>
<li><a href='http://www.jonzobrist.com/2011/06/15/i-am-always-cautious-with-this-on-my-clipboard/' rel='bookmark' title='I am always cautious with this on my clipboard..'>I am always cautious with this on my clipboard..</a> <small>su mysql cd rm -Rf data/* innodb/* tmp/* logs/* mysqld/*...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.jonzobrist.com/2011/10/24/script-to-rotate-the-mysql-general-query-log/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

