You are currently browsing the Erik Mitchell blog archives for December, 2011


Playing around with Puppet

I had a great night last night playing around with Puppet, an open-source enterprise systems management tool. Puppet is a tool that allows you to write “manifests” for how to set up a server, or a part of a server, automatically. Using Puppet you can deploy ready-to-go systems into the cloud with a single command (after you’ve written all of your manifests). It allows for rapid scaling of an environment and also the ability to create multiple environments that are nearly if not completely identical to each other.

Another tool similar to Puppet is Chef. From what I can tell, both are equally well regarded. I will be using Chef at work, so I’m playing with Puppet at home for now so I can get an introduction to both tools.

Having had lots of experience supporting various sites and applications, it’s really fun to start using a tool that would drastically make that job easier. There’s always a desire to go back and do something you’ve done in the past, but to do it better with the benefit of one’s experience. If I were to start an IT operation from scratch, either Chef or Puppet would be a central part of my strategy.

Also, a note — I’ve gotten to the point in my life when a great Friday night is one spent at home, up late, playing with stuff on the computer. No apologies for that!

Starting a group of EC2 instances with a single command

I’m working on a project that involves a number of Amazon EC2 instances. To keep costs under control, I decided it would be worthwhile to write a script to start and stop my instances in bulk.

I started with the online documentation for AWS:

http://docs.amazonwebservices.com/AWSEC2/latest/UserGuide/index.html?SettingUp_CommandLine.html

I found it’s pretty easy to do. Once you install the Amazon command line tools and get your environment variables set up, it’s pretty simple to start and stop your instances. Here’s a quick and dirty shell script I wrote:


#!/bin/bash

ec_suite_start() {
echo "Starting ec_suite instances"

# Magento 01
ec2-start-instances i-7fe7e71c

# DB01
ec2-start-instances i-73e8e810
}

ec_suite_stop() {
echo "Stopping ec_suite instances"

# Magento 01
ec2-stop-instances i-7fe7e71c

# DB01
ec2-stop-instances i-73e8e810
}

case $1 in
start)
ec_suite_start
;;
stop)
ec_suite_stop
;;
*)
echo "Usage: control.sh {start|stop}"
;;
esac

Next up, I’m going to try to launch and configure a web server with Chef. Exciting!

Goal for the week: Build a LAMP stack with Chef

I’ve got a few projects that are going to involve building and configuring servers for different purposes. I’m excited to start using Chef to enable infrastructure build automation.

Here’s a screencast I just watched on building a load balanced LAMP stack on EC2 with Chef (courtesy Opscode).

Update after a busy year

2011 is coming to a close, and I’m beginning to start end of year activities for EK Mitchell, LLC.

The year began with an exciting new contract position at Best Buy, and things were looking up. I was busy through the spring and took on additional clients, working in the evenings and weekends. My job at Best Buy continued to go well, and in July they offered me a permanent position as a Senior Lead Developer. After careful consideration, I accepted the offer, and began the process of winding down my fledgling consulting business.

This fall I wrapped up my final work as an independent contractor and I am now putting 100% of my efforts toward my job at Best Buy, which has changed from Senior Lead Developer to Web Development Manager. I’m excited about the work that needs to be done in the year ahead.

When I’m not spending time with my wonderful wife and son I’m working on preparing my old house to become a rental property in South Minneapolis. My goal is to have that rented out in April or May.

Beyond that, I’m always coming up with ideas, as usual. I’ll take one thing at a time, and I have no plans to quit my day job, but who knows what the future holds.