Author Archive
Swingpal at the PGA Merchandise Show
Tuesday, February 1st, 2011Life on Emacs
Friday, January 14th, 2011I have been an Emacs user off and on nearly as long as I have had a
computer, and yet I am constantly finding new things I can do from
within Emacs.
For instance, I have used Tramp to edit remote files. But our
current infrastructure setup makes use of a bastion host to separate
our production environment from the rest of the world. I thought that
meant I would not be able to access those hosts from Tramp, but I was
wrong. Tramp supports a half dozen proxy methods including an ssh
bastion host. Learn how to set this up in the Tramp manual:
Tramp Proxy.
Emacs doesn’t stop there, you can chat on IRC, create blog posts
(and publish them), send and receive email, organize your life.
That is just the start, I love being able do nearly every computer
related task with a single interface that is nearly identical on every
platform I use. At this point I don’t think I could live without my
Emacs keybindings.
Adding to the fun I have started using Emacs to help me manage my
productivity. You might have heard of the Pomodoro technique.
I have setup a mode-line timer that counts off my Pomodoro time. I
manage all my tasks in org-mode. I know that any messages I receive
while focusing are being faithfully recorded by Emacs, and are only a
keystroke away. Having everything integrated makes it easy for me to
switch between focus time and relax time.
I know this post was a bit of a rambling mess, but sometimes Emacs
just makes me so happy I can’t help myself.
Chef + RVM + Capistrano + Bundler
Friday, October 22nd, 2010So I have spent some time this past week getting some server automation setup. We’re deploying our new app in the cloud (on EC2) and I wanted to make sure that we could bring new servers online quickly are reliably, I also like knowing that all of my server configuration is kept safely in source control.
Here is what I setup:
Chef: Configuration management and server deployment.
RVM: Install and manage multiple versions of Ruby.
Capistrano: Ruby on Rails app deployment.
Bundler: Manage Ruby gem dependancies.
And some extras: Nagios to monitor everything, rsyslog for a central log store, and a Hudson CI server (I’ll get more into that in a later post).
All to run a Ruby on Rails app, on Apache HTTP with REE and Passenger.
The first step for me was installing a Chef server. I turned up a new EC2 small instance with a base Ubuntu 10.04LTS image and followed the directions found here: http://wiki.opscode.com/display/chef/Package+Installation+on+Debian+and+Ubuntu.
Once the Chef server was up and running and I had setup my laptop with knife, it was time to start cooking.
Opscode has a good selection of cookbooks ready for you to use and adapt to your needs, but my first cookbook,for RVM, actually came from http://www.agileweboperations.com/chef-rvm-ruby-enterprise-edition-as-default-ruby/. Matthias did a great job documenting his RVM with REE cookbook, the only thing I added was ‘–passenger’ to the ‘rvm install ree’ line.
bash "install REE in RVM" do
user "root"
code "rvm install ree --passenger"
not_if "rvm list | grep ree"
end
Now that I had my first cookbook I was eager to try a knife EC2 cloud deployment. First, I setup a new role so that I would have something to place in the servers run list.
#roles/web.rb
#Chef Role for web servers
name "web"
description "Swingpal Web Server Role"
run_list("recipe[rvm]")
Then to save this role to your Chef server:
knife role from file roles/web.rb
Now my Chef server had a role, and it was time to make sure that it also had the cookbooks it needed. You might have noticed that the RVM cookbook required ‘build-essential’. In order to get those cookbooks I needed to:
knife cookbook site download build-essential
Now you I had the build-essential cookbook added to my Chef repository. Next I uploaded my cookbooks to the Chef server.
knife cookbook upload build-essential rvm
Now it was time to launch and configure a new EC2 instance. This is where the magic happens, a base Ubuntu install becomes a server with Chef client, registers with the Chef server and receives instruction on how to configure itself.
knife ec2 server create -G web,production,monitoring --flavor m1.small -i ami-6c06f305 -x ubuntu 'role[production]' 'role[web]' 'role[monitored]' -Z us-east-1c -S mykey
I’ll walk through the various pieces of the knife EC2 server create:
- knife ec2 server create – the command to create a new EC2 instance
- -G web,produciton, monitoring – these are the EC2 security groups that the instance will belong to, they need to exist already on your EC2 account or the launch will fail
- –flavor m1.small – this is the type of EC2 server instance, in my case m1.small which costs $0.085/hour
- -i ami-6c06f305 – this tells EC2 which AMI (Amazon Machine Image) you would like to start with, in this case it is an Ubuntu 32bit image – you can find all of the available Ubuntu AMIs http://uec-images.ubuntu.com/releases/lucid/release/
This is a good stopping point, I’ll continue my description of our setup in the next post.
Android on my Tilt2
Saturday, May 8th, 2010I just installed Android on my Tilt2. So far I’m loving it. There are a few drawbacks: camera doesn’t work, phone doesn’t ring, etc… Nothing I’m not able to live with. Now I just need to write some apps.
Springtime gardening
Friday, April 2nd, 2010
Our container garden. We’ve got cucumbers, tomatoes, peppers, basil, strawberries, peas, beans, sage and lettuce. Everything, but the strawberries, we started from seed. We plan to get broccoli going in the fall, and more lettuce.
This year we started most of our seeds in coffee filters. It was a great way to get started without messing with dirt, or purchasing starter pods. Once they’d germinated we moved them into starter pots. We made some of our starter pots out of newspaper this time. Saved money and peat by not purchasing as many peat pots.
We’re also going to vermicompost. We’ve started building our worm bin, but I’ll save those details for another post. (more…)
Juice…
Saturday, January 16th, 2010Found some grapefruit on sale at Publix, so we brought them home and made grapefruit-carrot juice. I had to dust off the juicer, it has been too long since we had fresh juice. I’m not sure why we ever stopped making juice before.
So, if you don’t have a juicer – get one, and if you do – make some juice. Juice tastes good, and it makes you feel great.

















