<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"><channel><atom:link rel="hub" href="http://tumblr.superfeedr.com/" xmlns:atom="http://www.w3.org/2005/Atom"/><description>I’m finally poisoning the web with my thought words, again.</description><title>Dirk Kelly</title><generator>Tumblr (3.0; @dirkkelly)</generator><link>http://www.dirkkelly.com/</link><item><title>iPad and ST</title><description>&lt;p&gt;Just finished my first meeting centered around my iPad. Sitting in the cafe typing up this post on the same device.&lt;/p&gt;

&lt;p&gt;Firstly, typing. Really easy. I have this down flat on the table in landscape and I’m just using it exactly like my keyboard.&lt;/p&gt;

&lt;hr&gt;
&lt;h2&gt;Imockups for iPad&lt;/h2&gt;

&lt;p&gt;Fucking annoying to get the hang of at first and lacking in a heap of features. Once you get over the learning curve it becomes insanely fun and the centerpiece of your table top conversations.&lt;/p&gt;

&lt;p&gt;I will be using this in place of balsamiq.&lt;/p&gt;

&lt;hr&gt;
&lt;h2&gt;penultimate&lt;/h2&gt;

&lt;p&gt;Seriously fantastic. I was packing my bag with my notepad (paper) when I thought there must be a better way. This app cost $4 and resulted in my walking out the house with only the iPad.&lt;/p&gt;

&lt;p&gt;iPad in the table in portrait and you’re just jotting down notes and scribbling things as you chat.&lt;/p&gt;

&lt;hr&gt;
&lt;h2&gt;telstra&lt;/h2&gt;

&lt;p&gt;It is fast. The reception is great and their customer service still sucks ass to the nth degree. I can’t recommend them. But i would suggest looking into them if you are having reception issues.&lt;/p&gt;

&lt;hr&gt;
&lt;h2&gt;people are looking&lt;/h2&gt;

&lt;p&gt;I’m the only guy in this area of the cafe. And I am being noticed. Which is awesome.&lt;/p&gt;

&lt;hr&gt;
&lt;h2&gt;$930~&lt;/h2&gt;

&lt;p&gt;Yes. Worth it I would do it again in a heartbeat.&lt;/p&gt;

&lt;hr&gt;
&lt;h2&gt;frypapers&lt;/h2&gt;

&lt;p&gt;It just makes it easier to read his incredible writing. Also free :-)&lt;/p&gt;</description><link>http://www.dirkkelly.com/post/643060642</link><guid>http://www.dirkkelly.com/post/643060642</guid><pubDate>Sat, 29 May 2010 15:09:22 +0800</pubDate></item><item><title>Roadmap For squaretalent</title><description>&lt;p&gt;Just noting down the things that I’m aiming for with &lt;a href="http://www.squaretalent.com"&gt;squaretalent&lt;/a&gt;, heroku and all our clients works&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Leave Paperclipped for a really lightweight ‘images’ extension, to be used with galleries and shop_products&lt;/li&gt;
&lt;li&gt;Fix up the cache not clearing on Heroku&lt;/li&gt;
&lt;li&gt;Introduce expanding text areas in a plug in&lt;/li&gt;
&lt;li&gt;Tidy up shop_products and add more tests, update existing sites&lt;/li&gt;
&lt;li&gt;Build the egsample.com brand so that clients can check out what they’re paying for&lt;/li&gt;
&lt;li&gt;Poke &lt;a href="http://mariovisic.com"&gt;mariovisic&lt;/a&gt; about making screencasts for using Radiant&lt;/li&gt;
&lt;li&gt;Invest time into moving assets into the database&lt;/li&gt;
&lt;li&gt;Investigate leaving the single deployment for each client model&lt;/li&gt;
&lt;li&gt;Refocus the brand of &lt;a href="http://www.squaretalent.com/docs"&gt;st&lt;/a&gt; so that it is more about people than corporate&lt;/li&gt;
&lt;/ul&gt;</description><link>http://www.dirkkelly.com/post/637896510</link><guid>http://www.dirkkelly.com/post/637896510</guid><pubDate>Thu, 27 May 2010 23:46:08 +0800</pubDate><category>radiant</category><category>heroku</category><category>squaretalent</category></item><item><title>Radiant+Heroku+Paperclip³</title><description>&lt;p&gt;Here at &lt;a href="http://www.squaretalent.com/docs"&gt;Square Talent&lt;/a&gt; we’ve moved to running all our Radiant sites off &lt;a href="http://www.heroku.com"&gt;Heroku&lt;/a&gt; (we’re still using &lt;a href="http://www.slicehost.com"&gt;slicehost&lt;/a&gt; to run &lt;a href="http://www.dirkkelly.com/post/592510233/monitor-heroku-apps"&gt;watchy&lt;/a&gt;), &lt;em&gt;that’s how Dad did it, that’s how America does it, and it’s worked out pretty well so far.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I’d like to share my experience with this over the past 3+ months, and hopefully help others looking to go down this path.&lt;/p&gt;

&lt;hr&gt;
&lt;h2&gt;Heroku Goes to Sleep&lt;/h2&gt;

&lt;p&gt;We’re not all running sites that get 200 hits a minute, let alone an hour, some won’t reach those results in a month. In fact their most recurrent visitor during the quiet period is going to be themselves, and they’re going to notice everything.&lt;/p&gt;

&lt;p&gt;So when the app takes 6 seconds to spin up, they’re going to be on the phone complaining that it’s broken.&lt;/p&gt;

&lt;p&gt;I’ve picked through the acceptable user agreement and not seen anything to say we shouldn’t do this.&lt;/p&gt;

&lt;p&gt;Check out &lt;a href="http://www.dirkkelly.com/post/592510233/monitor-heroku-apps"&gt;watchy&lt;/a&gt; and chuck it in a cron job.&lt;/p&gt;

&lt;hr&gt;
&lt;h2&gt;Heroku is read only&lt;/h2&gt;

&lt;p&gt;This will trip out new players, the general method of using a /public/assets folder is out of the question, with write access only granted to a temp directory.&lt;/p&gt;

&lt;p&gt;So a cms that needs to store its assets will need to use a remote service, for that we choose Amazon’s s3. Until recently we were running on EU servers, which was starting to cause headaches when paperclip moved to aws/s3.&lt;/p&gt;

&lt;hr&gt;
&lt;h2&gt;Heroku runs on US EC2&lt;/h2&gt;

&lt;p&gt;Deal with it, come to terms with it, and don’t go against the grain. The first thing we did was run off of EU, we’re in Australia so this was going to be faster right? I could never tell so I didn’t really think about it.&lt;/p&gt;

&lt;p&gt;Then amazon came out with Sinapore s3 and I instantly moved two clients over to it right before launch.&lt;/p&gt;

&lt;p&gt;Mistaaaaaaaaake….&lt;/p&gt;

&lt;p&gt;This prompted a week long investigation into the app hitting a 30 second time-out when they were uploading pictures. Then trying javascript hooks to reset the page, flash based uploads and cutting back on multiple styles.&lt;/p&gt;

&lt;p&gt;All for a speed improvement which was completely unnoticeable as the user had to hit Amazon’s US servers just to make the request to Singapore.&lt;/p&gt;

&lt;hr&gt;
&lt;h2&gt;Heroku will get expensive&lt;/h2&gt;

&lt;p&gt;They’re not around to provide a free ride, one of our options for avoiding app time-outs was to go to background workers. Firstly this would be a big pain in the ass as we’d need to rewrite a heap of scripts and interfaces, secondly it would cost either $37 a month, or require more code to call workers on and off as we required them.&lt;/p&gt;

&lt;p&gt;Also your database is going to start costing you as you grow beyond 15meg, so make sure you’re storing data smartly.&lt;/p&gt;

&lt;hr&gt;
&lt;h2&gt;Taps and Radiant is love&lt;/h2&gt;

&lt;p&gt;&lt;a href="http://www.dirkkelly.com/post/613170443/heroku-database-support"&gt;I wrote earlier&lt;/a&gt; about how taps can help you manage a local or alternative development database and a live version. It’s been working really well for a whole host of projects, and this has opened up an opportunity for us to move all data (stylesheets and javascripts) straight into the database.&lt;/p&gt;

&lt;p&gt;This will have great ramifications in the delivery model we use for the entire business, more to come on that over the next few months.&lt;/p&gt;

&lt;hr&gt;
&lt;h2&gt;Heroku and Radiant Caching&lt;/h2&gt;

&lt;p&gt;Radiant will override the cache headers sent by heroku, so if you’re making changes to a system on production you’ll be waiting for 5 minutes for the those changes to be reflected.&lt;/p&gt;

&lt;p&gt;This gets really annoying really quickly, and we are &lt;a href="https://github.com/squaretalent/radiant-cache"&gt;working on a fix for this&lt;/a&gt;, hoping that hooking the cache headers after Heroku gets a chance will sort this out for us.&lt;/p&gt;

&lt;hr&gt;
&lt;h2&gt;Other things we noticed&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strike&gt;Singapore redirects your cname hosts to some strange string&lt;/strike&gt; okay, it’s not doing that anymore.&lt;/li&gt;
&lt;li&gt;Processing file properties (such as changing permissions is painfully slow on Singapore.&lt;/li&gt;
&lt;li&gt;Again paperclip (well aws/s3) doesn’t play nice with Singapore and we needed to introduce a few monkey patches to get it working.&lt;/li&gt;
&lt;/ul&gt;</description><link>http://www.dirkkelly.com/post/637886267</link><guid>http://www.dirkkelly.com/post/637886267</guid><pubDate>Thu, 27 May 2010 23:41:00 +0800</pubDate><category>squaretalent</category><category>ruby</category><category>heroku</category></item><item><title>Heroku Database Support</title><description>&lt;p&gt;&lt;a href="http://blog.heroku.com/archives/2010/4/21/supporting_big_data_part_1/"&gt;Heroku has just introduced even better database support (through taps)&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For those of us living and breathing Radiant* and trying to maintain applications across development and production environments life has been &lt;strong&gt;&lt;abbr title="seriously not awesome"&gt;“totally fun and full of good times, yay”&lt;/abbr&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;* Any cms that blurs storing content and design within the database&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;It comes down to, “I made changes here but I don’t want to wipe the clients changes there”, wtf do I do?&lt;/p&gt;

&lt;hr&gt;
&lt;p&gt;These updates allow us to move the developer specific information over to production without interfering with anything the client is working on, and with a command as simple as&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;heroku db:push --filter '^(layouts|snippets|forms)'
&lt;/code&gt;&lt;/pre&gt;

&lt;hr&gt;
&lt;p&gt;If you’re not already using &lt;a href="http://heroku.com"&gt;Heroku&lt;/a&gt; to host your &lt;a href="http://radiantcms.org"&gt;Radiant&lt;/a&gt; sites then I suggest you come and join us in 2010, it’s really nice here and the drinks are ice cold.&lt;/p&gt;

&lt;hr&gt;
&lt;p&gt;Oh and if you’re backing up your database to git (which I know you would be, right?) then the same thing goes for pulling in the important data&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;heroku db:pull --tables pages,users,shop_products
&lt;/code&gt;&lt;/pre&gt;</description><link>http://www.dirkkelly.com/post/613170443</link><guid>http://www.dirkkelly.com/post/613170443</guid><pubDate>Wed, 19 May 2010 21:39:00 +0800</pubDate><category>squaretalent</category><category>ruby</category><category>heroku</category></item><item><title>Monitor Heroku Apps (or just heartbeat)</title><description>&lt;p&gt;A damn sight easier than a perl script and self maintain list of domains.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;# MIT &lt;2010&gt; &lt;Square Talent&gt;
require 'rubygems'
require 'open-uri'
require 'pp'
require 'heroku'

heroku = Heroku::Client.new 'user@email.com', 'password'

heroku.list.each do |domain,account|
  domain = open "http://#{domain}.heroku.com"
  unless domain.status[0] == "200"
    raise "domain is frackin' down"
  end
end
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;above&lt;/strong&gt; Just in case you didn’t have the 6 seconds to write it yourself.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;# MIT &lt;2010&gt; &lt;Square Talent&gt;
#!/usr/bin/perl -w

open(INP, "/var/watchy/sites.txt") || die "no file";

open(STDOUT, "&gt;/dev/null");

while ($curline = &lt;INP&gt;)
{
  system("curl -Is --compressed $curline");
}

close(STDOUT);
close(INP);
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;above&lt;/strong&gt; reference: the script &lt;a href="http://www.mariovisic.com"&gt;muz&lt;/a&gt; wrote us a few weeks back.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;I’m only adding a licence so that there is absolutely no confusion.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;Because I’m trying to be a non-douche I have to be a douche&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;</description><link>http://www.dirkkelly.com/post/592510233</link><guid>http://www.dirkkelly.com/post/592510233</guid><pubDate>Wed, 12 May 2010 22:11:00 +0800</pubDate><category>squaretalent</category><category>dirkkelly</category><category>mariovisic</category><category>ruby</category></item><item><title>Staff didn’t bat an eyelid when requesting “just...</title><description>&lt;img src="http://29.media.tumblr.com/tumblr_l23271tNiI1qa56g9o1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Staff didn’t bat an eyelid when requesting “just two” or when I left stating “didn’t fit”&lt;/p&gt;</description><link>http://www.dirkkelly.com/post/580394091</link><guid>http://www.dirkkelly.com/post/580394091</guid><pubDate>Sat, 08 May 2010 12:09:01 +0800</pubDate></item><item><title>Rails 3 Rack Passenger - Old News</title><description>&lt;p&gt;&lt;a href="http://blog.phusion.nl/2009/06/17/phusion-passenger-223-released-bug-fix-edition/"&gt;I missed this one&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;set_env/SetEnv so you won’t need a wrapper for your ruby executable.&lt;/p&gt;

&lt;p&gt;Found it necessary on apache when moving to 3 (1.8.7)&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;SetEnv GEM_HOME /opt/gems
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;After it couldn’t find rack.&lt;/p&gt;</description><link>http://www.dirkkelly.com/post/579875074</link><guid>http://www.dirkkelly.com/post/579875074</guid><pubDate>Sat, 08 May 2010 07:56:09 +0800</pubDate></item><item><title>Facebook Gone</title><description>&lt;p&gt;Just a heads up to everyone who wonders, I deleted my Facebook.&lt;/p&gt;

&lt;p&gt;You can always contact me on &lt;strong&gt;dk.hat.dirkkelly.dawt.com&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;No longer interested in my photos being all over the place and connections doesn’t make me smile.&lt;/p&gt;</description><link>http://www.dirkkelly.com/post/572959630</link><guid>http://www.dirkkelly.com/post/572959630</guid><pubDate>Wed, 05 May 2010 15:16:01 +0800</pubDate></item><item><title>Getting Fit</title><description>&lt;p&gt;Probably need to back this up with some figures, but here goes.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;~ 176cm&lt;/li&gt;
&lt;li&gt;~ 90kg&lt;/li&gt;
&lt;li&gt;- stomach&lt;/li&gt;
&lt;li&gt;- arms&lt;/li&gt;
&lt;li&gt;- tits &lt;strong&gt;edit&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;+ face&lt;/li&gt;
&lt;li&gt;+ legs &lt;/li&gt;
&lt;li&gt;+ beard &lt;strong&gt;edit&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;br/&gt;&lt;/p&gt;

&lt;h3&gt;Running&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.mariovisic.com"&gt;Mario Visic&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://bit.ly/equalon4"&gt;nike Equalon+ 4&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.apple.com/au/ipod/nike/"&gt;nike+&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.apple.com/au/ipodnano/"&gt;ipod nano&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;6km around &lt;a href="http://bit.ly/bibra-lake"&gt;Bibra Lake&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Run 1 &lt;strong&gt;7m/km&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Run 2 &lt;strong&gt;6m/km&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Goal &lt;strong&gt;&lt; 4m30s/km&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Monday and Thursday&lt;/p&gt;

&lt;p&gt;&lt;br/&gt;&lt;/p&gt;

&lt;h3&gt;Gym&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Kaylene and Mike&lt;/li&gt;
&lt;li&gt;Fremantle Warehouse&lt;/li&gt;
&lt;li&gt;All Female Classes&lt;/li&gt;
&lt;li&gt;Excellent Scenery&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Toning and Cardio classes&lt;/p&gt;

&lt;p&gt;Tuesday and ?Wednesday/Friday?&lt;/p&gt;

&lt;p&gt;&lt;br/&gt;&lt;/p&gt;

&lt;h3&gt;Reasons&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;History of family heart issues&lt;/li&gt;
&lt;li&gt;History of clot related death&lt;/li&gt;
&lt;li&gt;Single life calls for a nicer body&lt;/li&gt;
&lt;li&gt;I might be amazing, but that means nothing if I’m dead at 35&lt;/li&gt;
&lt;li&gt;&lt;a href="http://twitter.com/#search?q=%23twitfit"&gt;#twitfit&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;br/&gt;&lt;br/&gt;&lt;/p&gt;

&lt;h3&gt;I’m wishing myself luck&lt;/h3&gt;</description><link>http://www.dirkkelly.com/post/517640783</link><guid>http://www.dirkkelly.com/post/517640783</guid><pubDate>Tue, 13 Apr 2010 14:14:00 +0800</pubDate></item><item><title>Radiant GO .com</title><description>&lt;p&gt;I’ve been doing a bit of work for our squares lately, with the most requested feature being a Radiant installation that’s ready to go.&lt;/p&gt;

&lt;p&gt;With that I’m introducing &lt;a href="http://www.radiantgo.com"&gt;&lt;strong&gt;&lt;a href="http://www.radiantgo.com"&gt;www.radiantgo.com&lt;/a&gt;&lt;/strong&gt;&lt;/a&gt; which is an off the shelf edge installation, packed full of delicious extensions and some initial data.&lt;/p&gt;

&lt;p&gt;All you need to do is … well go to the site and see.&lt;/p&gt;

&lt;p&gt;sidenote: the webpage was deployed to &lt;a href="http://www.github.com"&gt;github&lt;/a&gt; pages, it’s restrictive and basic, but meant the process took all of 5 minutes. Eventually we’ll move to &lt;a href="http://www.heroku.com"&gt;Heroku&lt;/a&gt;&lt;/p&gt;</description><link>http://www.dirkkelly.com/post/485790311</link><guid>http://www.dirkkelly.com/post/485790311</guid><pubDate>Wed, 31 Mar 2010 11:52:34 +0800</pubDate><category>squaretalent</category></item><item><title>"If I’d listened to customers. I’d have given them a faster horse."</title><description>“If I’d listened to customers. I’d have given them a faster horse.”&lt;br/&gt;&lt;br/&gt; - &lt;em&gt;Henry Ford&lt;/em&gt;</description><link>http://www.dirkkelly.com/post/471804945</link><guid>http://www.dirkkelly.com/post/471804945</guid><pubDate>Thu, 25 Mar 2010 12:36:36 +0800</pubDate></item><item><title>Dirk</title><description>&lt;p&gt;Is an academic, yo&lt;/p&gt;</description><link>http://www.dirkkelly.com/post/456565981</link><guid>http://www.dirkkelly.com/post/456565981</guid><pubDate>Thu, 18 Mar 2010 20:50:10 +0800</pubDate></item><item><title>"&lt; Did Microsoft do anything Good?

&gt; Provided Apple with competition."</title><description>“&lt;p&gt;&lt; Did Microsoft do anything Good?&lt;/p&gt;

&lt;p&gt;&gt; Provided Apple with competition.&lt;/p&gt;”&lt;br/&gt;&lt;br/&gt; - &lt;em&gt;&lt;p&gt;Chat window with a Talent&lt;/p&gt;

&lt;p&gt;&lt;small&gt;Apart from Minesweeper, Minesweeper is good&lt;small&gt;&lt;/small&gt;&lt;/small&gt;&lt;/p&gt;&lt;/em&gt;</description><link>http://www.dirkkelly.com/post/451776984</link><guid>http://www.dirkkelly.com/post/451776984</guid><pubDate>Tue, 16 Mar 2010 14:55:34 +0800</pubDate></item><item><title>"Are you a jack of all trades, or a master of one?

DoWhatYouDo.net Square Talent"</title><description>“&lt;p&gt;Are you a jack of all trades, or a master of one?&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.dowhatyoudo.net"&gt;DoWhatYouDo.net&lt;/a&gt; Square Talent&lt;/p&gt;”</description><link>http://www.dirkkelly.com/post/419350842</link><guid>http://www.dirkkelly.com/post/419350842</guid><pubDate>Mon, 01 Mar 2010 14:11:22 +0800</pubDate><category>squaretalent</category></item><item><title>"I started playing Basketball today.

Ow."</title><description>“&lt;p&gt;I started playing Basketball today.&lt;/p&gt;

&lt;p&gt;Ow.&lt;/p&gt;”</description><link>http://www.dirkkelly.com/post/406852829</link><guid>http://www.dirkkelly.com/post/406852829</guid><pubDate>Tue, 23 Feb 2010 19:40:13 +0800</pubDate></item><item><title>"I’m looking for designers who are interested in making money, not writing code. www.squaretalent.com"</title><description>“I’m looking for designers who are interested in making money, not writing code. &lt;a href="http://squaretalent.com/"&gt;&lt;a href="http://www.squaretalent.com"&gt;www.squaretalent.com&lt;/a&gt;&lt;/a&gt;”</description><link>http://www.dirkkelly.com/post/405185969</link><guid>http://www.dirkkelly.com/post/405185969</guid><pubDate>Tue, 23 Feb 2010 01:33:00 +0800</pubDate><category>squaretalent</category></item><item><title>I need to spend more time just discovering things, and yeah,...</title><description>&lt;img src="http://29.media.tumblr.com/tumblr_ky4qd1GkQh1qa56g9o1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;I need to spend more time just discovering things, and yeah, they’ll still probably be coding related.&lt;/p&gt;</description><link>http://www.dirkkelly.com/post/400150506</link><guid>http://www.dirkkelly.com/post/400150506</guid><pubDate>Sat, 20 Feb 2010 15:34:13 +0800</pubDate></item><item><title>SSL and Tomcat 6</title><description>&lt;p&gt;&lt;a href="http://blog.datajelly.com/company/blog/34-adding-ssl-to-tomcat.html"&gt;original and far too long article I followed&lt;/a&gt;&lt;/p&gt;

&lt;hr&gt;
&lt;h3&gt;Standard Certificate Stuff&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Go to your apache ssl folder&lt;/strong&gt;&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;# cd /etc/apache2/ssl
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Just like you would do with apache or any other server&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Generete a server key&lt;/strong&gt;&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;# openssl genrsa -des3 -out server.key 1024
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;this will create → &lt;strong&gt;/etc/apache2/ssl/server.key&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Generate a CSR&lt;/strong&gt;&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;# openssl req -new -key server.key -out server.csr
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;this will create → &lt;strong&gt;/etc/apache2/ssl/server.csr&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Send the csr to your certificate provider&lt;/strong&gt; 
&lt;a href="http://rapidssl.com"&gt;example&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;name the file your receive → &lt;strong&gt;/etc/apache2/ssl/server.crt&lt;/strong&gt;&lt;/p&gt;

&lt;hr&gt;
&lt;h3&gt;Tomcat stuff&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Source your root providers certificate&lt;/strong&gt; 
&lt;a href="http://www.rapidssl.com/ssl-certificate-support/install-ssl-certificate/"&gt;example&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;name the file you receive → &lt;strong&gt;/etc/apache2/ssl/root.crt&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Create a new file comprising of the contents of the following&lt;/strong&gt; (just copy and paste)&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;root.crt
server.crt
server.key
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;name the file → &lt;strong&gt;/etc/apache2/ssl/server.pem&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Generate a p12 file based on the pem&lt;/strong&gt;&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;# openssl pkcs12 -export -in server.pem \ 
-out server.p12 -name tomcat
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;em&gt;you will be asked for a password&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;this will create → &lt;strong&gt;/etc/apache2/ssl/server.p12&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Enable ssl within the Tomcat environment.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;edit the file &lt;strong&gt;/etc/tomcat6/server.xml&lt;/strong&gt;&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&lt;Connector 
  port="8443" protocol="HTTP/1.1" maxThreads="150"
  keystoreFile="/etc/apache2/ssl/server.p12" 
  keystorePass="password" keystoreType="PKCS12" 
  SSLEnabled="true" scheme="https" secure="true"
  clientAuth="false" sslProtocol="TLS" /&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;restart your tomcat installation&lt;/strong&gt;&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;/etc/init.d/tomcat6 restart
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;check it’s working, when it isn’t analyse your logs&lt;/strong&gt;&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;cat /var/log/tomcat6/catalina.year-month-day.log
&lt;/code&gt;&lt;/pre&gt;

&lt;hr&gt;
&lt;h3&gt;Errors I know of&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Invalid keystore format&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The certificate definition is for a keystore other than the PKCS12 you created, ensure you’re defining that in the connector within your server.xml&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Still invalid format&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is a great command for checking whether a keystore is valid&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;keytool -v -list -keystore server.p12 -storetype pkcs12
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;you’re looking for the following&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Keystore type: PKCS12&lt;/li&gt;
&lt;li&gt;Your keystore contains 1 entry&lt;/li&gt;
&lt;li&gt;Certificate chain length: 2&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Page hangs accessing anything secure&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;At one point the server was starting up, with absolutely no errors. However it would just sit there requesting the secure pages.&lt;/p&gt;

&lt;p&gt;We ended up rebuilding Tomcat from scratch and it worked fine.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;There was absolutely zero surprisement regarding this&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Server dies in the ass&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;There was a non secure link on one of the pages, this would literally destroy the server every time the page rendered. Primarily that was the fault of bad coding, but really the server shouldn’t be failing as a result.&lt;/p&gt;

&lt;hr&gt;
&lt;h3&gt;Don’t Use Tomcat&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;I hate you past Dirk&lt;/strong&gt;&lt;/p&gt;</description><link>http://www.dirkkelly.com/post/397863500</link><guid>http://www.dirkkelly.com/post/397863500</guid><pubDate>Fri, 19 Feb 2010 12:04:00 +0800</pubDate></item><item><title>"I’m trying to be happy that I have finally gotten SSL working on Tomcat… Instead I just..."</title><description>“I’m trying to be happy that I have finally gotten SSL working on Tomcat… Instead I just keep asking myself why I’m using Tomcat.”</description><link>http://www.dirkkelly.com/post/397796287</link><guid>http://www.dirkkelly.com/post/397796287</guid><pubDate>Fri, 19 Feb 2010 11:30:38 +0800</pubDate></item></channel></rss>
