Dec 22, 2011

Simple EC2 Configuration

Over the last few years I've used different approaches to scripting the configuration of my EC2 servers. Recently I discarded a more sophisticated approach for a very simple system.  This is all pretty obvious and I'm sure you'll notice that I stole this directly from RVM but it's working out so well for me I feel compelled to share anyway.

I created a public repository of scripts on Github.  Then, like RVM, I take advantage of the fact that Github allows access to the raw content of the master branch through a fixed url.  This allows me to execute commands like the one below which will run my script for installing the Passenger gem and Apache module:

sudo su -c "bash < <(curl -s https://raw.github.com/mgreenly/aws/master/shared/passenger.sh)" -

Then I combine that with a strict set of conventions; for example I always use Ubuntu so all of my scripts assume they are being executed as the ubuntu user.  This can make some of the scripts a bit tougher to write, for example when you have to sudo su to become postgres to execute database commands, but it makes it easy to execute one script after another in a chain right from your initial login.

This approach may not compare to using tools like Chef or Puppet but I'm finding I really like the simplicity of it.

Dec 17, 2011

EC2 Friendly SSH Config

If you spend lots of time in EC2 or any other cloud service your going to collect tons of junk in your $HOME/.ssh/known_hosts file. If you're remapping domain names to cloud based servers and those IPs change SSH's default settings will prevent you from connecting until the conflict is fixed. Instead of constantly having to edit known_hosts a better approach is to have SSH ignore known_hosts while you work in the cloud.

Here's my $HOME/.ssh/config. In addition to ignoring known_hosts I also set the identiy key file and the default user.

Host *compute-1.amazonaws.com
User ubuntu
StrictHostKeyChecking no
UserKnownHostsFile /dev/null
IdentityFile ~/.ssh/your-ec2-key
ServerAliveInterval 30
ServerAliveCountMax 120


With these settings I can copy the DNS name straight from the AWS console, type 'ssh ' at the command line, paste the DNS name and then connect; example:

ssh ec2-107-100-123-99.compute-1.amazonaws.com

Nov 23, 2011

Unity fucking blows! Gnome Shell has potential.

The title may be flame bait but hopefully this will help some fence sitters in their evaluation of Unity and Gnome Shell.

The most significant factor in my statement above is that I think the Gnome Shell developers realized there needed to be a stronger context switch between using applications and managing them. In Gnome Shell when you bring up the launcher or the desktop switcher all of the applications fall away from focus and tile in the center of the screen so that the launcher and desktop switcher can be exposed. At first I found this behavior a bit distracting and figured it was all eye candy but after a while I realized just how brilliant it was.

In Unity the context switch isn't as significant. The launcher comes into view when you need it and hides when you don't. In theory anyway. In reality it's a frustrating game of whack-o-mole. The launcher is never there when you want it and it's always in the way when you don't.

It seems the Gnome developers had a much better grasp of the basic user experience issue at hand. By design or intuition they better understood that you manage applications in a different context than you use them and there was benefit in making that separation more distinct not less.

Gnome Shell certainly has room for improvement but the amount of change required to make it great is significantly less than Unity will need.

Aug 28, 2011

Almost a full year no posts!

I'm not at all sure what I'm going to do with this space.

Tomorrow would have been an entire year with no posts if it hadn't been for this one.

I have been posting on Google+ quite a bit but that's certainly no substitute for a blog.

I'm also a bit conflicted about how to focus my energy. Do I post here in a personal space? Or on a blog for my business under my name?

Oh well, when I get it figured out I'll definitely share here.






a lot but I really should blog it and link it there since the Google+ posts fade with time. On the other hand I've consideree

Aug 29, 2010

Basic Git Configuration

I recently purchased a new machine and had to configure Git again. The email/user setup it reminds you of but I couldn't remember how to configure color output without some digging. So I decided to share it here just in case anyone else may find it useful.

Jul 10, 2010

Browser Profile Backup

While I was trying to configure a specific user profile for a Selenium testing today I accidentally deleted my Firefox profile. At first I thought no big deal, my lap top (the machine I was using), is regularly backed up to an external USB drive attached to the docking station. Unfortunately for some strange reason I chose to exclude the $HOME/.mozilla/ directory that contains the profile.

I use Delicious for bookmarks so it mostly just means re-populating my tools bars and resetting passwords on rarely used sites if I can't remember them, not all that big of a deal really.

Still, I couldn't help but notice how much more I depend on the browser than desktop applications these days.

Apr 24, 2010

Ruby On Rails and Selenium wait_for_page

I'm moving my current project's cucumber+webrat testing over to cucumber+webrat+selenium. The biggest issue as I expected was timing problems but a fairly liberal sprinkingling of wait_for_page commands through the relevant methods in web_steps.rb file seems to have fixed most of the issues.

Apr 11, 2010

User Centric Design

Everyone fails if the cat's not satisfied!

Mar 23, 2010

Command Line Ubuntu Upgrades

I've tried to track this info down a few times in the past and failed. Now that I've found it I figured I'd leave myself a bread crumb trail to find it next time.

http://www.ubuntusolutions.org/2009/04/upgrading-ubuntu-from-the-command-line.html

Dec 25, 2009

Google, Go, and Native Client

I may have been a bit slow getting to the party but the obviousness of it really hit me this morning. Google has exposed a few early stage projects that could work together to provide some really interesting options in the future.

Specifically I'm looking at Native Client and Go. Initially I really didn't get Native Client, but when you combine it with a language like Go which is specifically designed to be sand-boxable and have fast compile times you start to get some interesting options.

Google could choose to incorporate the Go language tool chain inside the browser along with Native Client. This would mean that developers wouldn't need to build binaries for every CPU they wanted to target. Instead users could simply visit a web page that would pull down the source and compile it on the fly.

It'll be interesting to see where all of this goes.