husband, dad, steelers fan and software engineer

Mar 22, 2013

Yesterday I talked about running composer on Amazon's Elastic Beanstalk.  There it is builtin and works out of the box for you.  If you are on OpenShift (my preferred PaaS) composer does not come out of the box.  Matthew Weier O'Phinney has posted an article on the steps he took to get composer installing his project's dependencies, and that's definitely a worthy read.  However, my deployment hook for OpenShift is a little bit different and I wanted to share that.

There were two things I wanted to accomplish.  First, I did not want composer.phar in source control.  Second, I wanted to take advantage of composer's ability to cache dependencies to speedup my deployment process up.  So here is what I use in my ./.openshift/action_hooks/deploy script:


As a bonus here's a tip about markers... OpenShift will restart Apache and Zend Server with every deployment. You may not want or need to do this. If you don't, simply touch a file to ./.openshift/markers/hot_deply and then next time you push your changes up OpenShift will leave all those services running when it deploys.

Amazon's Elastic Beanstalk is another git-driven deployment service, this time directly to EC2 and RDS instances on Amazon Web Services.  It's similar to what Red Hat is doing with OpenShift conceptually.

If you are a PHP developer like myself your first question is probably, will it install my composer dependencies for me?  The answer is YES.

Here's the kicker, and quite frankly this does not make any sense to me...  If you have stubbed your vendor folder in place, so you've either touched ./vendor/empty or ./vendor/.gitkeep, you are going to have to removed it.  Elastic Beanstalk will use composer based upon the presence of a composer.json or composer.lock file, but if it sees the vendor folder it bails out and doesn't execute the install command. Again, I really don't know why this is and I could not find any documentation about it.  Yet this exactly what I needed to do to get my dependencies installed.

Mar 20, 2013

When we first started house hunting in Indiana I was grateful that MLS listed the total square footage of homes. Back in Pittsburgh MLS didn't do this and we always found that a bit puzzling.  In our (original) assessment it was easier to see if a house had the mass we needed for our family based upon this number.

Fast forward and I now realize why it's probably more advantageous to not have square footage on MLS. Having it seems to lessen the requirement for a complete set of room dimensions.  Worse yet, there is no consistent way of doing square footage.

We've seen a lot of places that use the footprint of the house, then multiply it by the number of finished floors.  We've seen places that appear to have legitimate footage values for livable space, but these are few and far between.  We actually saw one place where the sellers had taken the foot print, added that same amount to the total for an unfinished half-basement and then added the same for the second floor that was smaller then the base and then they added the total footage of the garage to it for the size of the bonus room above the garage which turned out to have knee walls and be smaller then the garage. That house's total footage was probably half of what was listed and made for a horrible misrepresentation of the house. It was misleading and confusing.  When livable space is actually the metric being used you often also have to wonder which rooms are being counted or not. Taking a list of houses and comparing them based upon square footage just does not give you an accurate representation of what space is available.

All in all there is just no better trade off then a decent set of room measurements for every livable space in the house.

I've become a pretty big fan of Red Hat's OpenShift platform.  I love the idea of doing deployments based off of DVCS operations. Almost two years ago when I was working for Wizzard Software we came up with a deployment process not to far off from this concept.  We were a Mercurial based team so the DVCS system was different, but we basically issuing pull's from repositories on the effected systems and out rolled new software that way.  OpenShift is a whole lot better then that though, because it's push triggered and deploys to the cloud and Red Hat has a bunch of awesome hooks tied in to make it even more powerful.  Did I mention it's FREE?  Yes, free hosting driven by git in the cloud - it doesn't get much better then this!

But what happens if you want to add a custom domain name to OpenShift?  In order to do this you have to do two things, first add the appropriate aliases to your OpenShift application, see here for more information. Second is to edit your DNS records and add CNAME records to point to the OpenShift subdomain for your application.  As with many things in the cloud, IP addresses are ever-changing so you cannot count on them when setting up your domain.  If you're lucky enough to have NameCheap as your registrar this isn't a problem, because they let you add a CNAME record as your apex (not sure how they do this, but just go with it... it works!). If you are on GoDaddy or a similar DNS service (like Route 53) you aren't so lucky.

Fortunately, Satoru systems has a naked domain redirect service over at wwwizer that fills this need.  They basically give you an IP address to use for your A record and their system automatically redirects it to "www.domain.com" where "domain.com" is the apex entry. It's dead simple to use. Best of all, this too is FREE.

As with all cloud systems, you never know how long you can get these services before they are bought out, shutdown or just run out of money, so don't use them with mission critical systems. But if you're a hobbyist or have a pet-project this is a great way to get it out on the web without incurring a lot of costs.

Check out wwwizer's naked domain redirect service.

Mailbox has garnered a lot of attention since it rolled out.  My concern from day 1, as has been with many a similar service, is how is it being paid for?  These startup services rollout free with no plan in place to make money.  Some of these startups are gunning to be bought out or "funded" by venture capitalists, and others are hoping for bright lights and a revelation on high to show them the secret to success (here's looking at you Twitter).  The truth is they lack a plan to become financially solvent and while cloud computing is cheaper then the alternative, it's still expensive.  It's no wonder then that these startups belly-up or disappear into the annals of the world wide web. I've been particularly upset about two as of late, Posterous a year ago and more recently Sparrow. In both of these cases the buyouts were about grabbing talent and had nothing to do with building the product.  In the end the consumers got screwed by dreams too big to pay be paid for.

So I can't help but wonder what will happen with Mailbox.  An announcement was just recently made that cloud-sync kingpin Dropbox has bought them. I should disclose that I do have a Mailbox account and that I have not completely bought into their way of doing Email just yet.  I'm not trying to knock it, it's just a dramatic change from the way I've managed my inbox and I am still adjusting.  I'm giving it a shot though.  I should also disclose that I am huge fan of Dropbox.  Nonetheless I can't help but wonder what Dropbox's purpose is in buying Mailbox.  To the best of my knowledge there is no income stream for Mailbox, only what I am speculating is an ever-growing EC2 bill.  The product models are completely different too.  So is it a talent grab?  It doesn't seem so, at least Dropbox's post does not give that indication.  Nonetheless I am skeptical...

I wouldn't count on Mailbox being eternally available. I hope I'm wrong, but I feel like we've learned all too recently not to depend on free cloud services for the kitchen sink.  Our data needs to be portable and we as consumers need to be startup-proof.  That means go ahead and use a service like Posterous, but make sure you can walk away from it when they shut it down.  And if they don't offer data portability, don't sign up.  With services like Mailbox that augment the way you do things, just make sure you can still function when they are gone.  In short:  Don't put all your eggs in one basket, be startup-proof.