Sunday, January 20, 2008

Taking the Wordpress Plunge

I've been running on blogger for awhile without a real domain name. A lot of people I know are running wordpress and seem to like it. I set up a hosted wordpress for Alexa a while back. It definitely looks nicer than blogger and has a lot more features. It's a little easier to add plugins, too.

It's not worth switching unless I get a new domain name. So, I'm now proud to present my new blog: The Cult of Gary.

I've imported all of my blogger articles. There's a new Feedburner feed too, so make sure you update your clients if you're following me! I'll leave the blogger site up for a bit, but I will be shutting it down.

I decided to host my own instead of the hosted option. I wanted to be able to have cookies (for google analytics) and patch any bugs. In particular, there's a nasty Safari one.

I have an EC2 host up that's not doing too much, so my blog is running on an EC2!

Friday, January 18, 2008

facter -- where to find puppet variables

I'm really loving puppet. I was able to build an application server from scratch in about 20 minutes. 19 of them were watching progress bars and syslog output. I can magically reconfigure the systems as I go and any work on do for one system can be applied to all of them.

I was hunting around for what variables are available when writing puppet configuration. I found a page that points out puppet uses something called 'facter'. I think facter is packaged with puppet. It's on my systems anyway.

If you call 'facter' you get some nice output about your system. All of those variables are available in your puppet configs.

Thursday, January 17, 2008

Timecapsule: every Mac house should have one

About two weeks ago, Alexa's parents were ready to take the Mac plunge. Of course, I offered my help. We decided the 20" iMac was the right fit for them. My brothers in law that are still at home both now have laptops, one of them is a MacBook.


They have had a string of hard drive failures and have almost lost their pictures a couple of times, so I suggested they get a USB hard drive for Time Machine backups. 

They also wanted to put the computer in a more central location, but didn't want all the clutter of having the printer hooked up to it. I suggested that they should also get a wireless print server so they could hide the printer. Their Linksys Wireless-B router was getting a bit dated as well, and I like WRT54GL's, so we were going to get one of those. 

All said and done, we were looking at about $350 in accessories. I suggested that we waited until after Steve Jobs' keynote to order. I figured there may be some iMac upgrades coming. Now I look like a genius because they announced Timecapsule. It's cheaper and less of a pain in the butt than what I was looking to set up for them.

We ordered a Timecapsule and an iMac last night. There's no ETA on Timecapsule yet. I can't wait till it arrives so that I can see how well it works. If it's as good as it seems, I think every multi-mac household should have one. 

Of course, Timecapsule backups don't stop you from losing everything in a fire or theft. I think we're going to set up a smugmug account to get all their pictures 'off site' as well.

Wednesday, January 16, 2008

Puppet just made me about 3000% more efficient

I've spent the afternoon playing with puppet. It's brilliant and I wish I would have set it up sooner.


My test setup does the following:
  • creates a file called /tmp/hello_world
  • makes sure that screen and vim-enhanced
  • makes sure ntp is installed, running and configured to start (using the default config)
  • makes sure the perforce cli is installed
  • make sure snmp is configured the way I like it
  • /etc/resolv.conf is configured as I expect it
I can create classes that map to my different server rolls. I can make sure key configuration files are up to date -- if I had to change nameservers in /etc/resolv.conf due to IP changes, I'd have to log into every one of my boxes and manually change it. With puppet, it's a variable change and all my systems update.

The following configures your snmp server for you. Stick the following into a pp file:

define snmp_server($community = "public",
$location = "Unknown (edit /etc/snmp/snmpd.conf)",
$contact = "Root (configure /etc/snmp/snmp.local.conf)"
) {

file { "/etc/snmp/snmpd.conf":
ensure => present,
mode => "0644",
owner => "root",
group => "root",
content => template("snmpd.conf.erb"),
}

include snmp_apps
}

class snmp_apps {
package { net-snmp: ensure => installed, }
package { net-snmp-devel: ensure => installed, }
package { net-snmp-utils: ensure => installed, }

service { snmpd:
ensure => true,
enable => true,
subscribe => File["/etc/snmp/snmpd.conf"]
}
}

And this into a snmpd.conf.erb template file in your template directory:

com2sec notConfigUser default
group notConfigGroup v1 notConfigUser
group notConfigGroup v2c notConfigUser
view systemview included .1 <%= community %>
access notConfigGroup "" any noauth exact systemview none none
syslocation <%= location %>
syscontact <%= contact %>

Then configure your systems with:

snmp_server { "not used" : community => 'your_commnity', location => 'Springfield', contact => 'root@apple.com' }

Keep in mind that my configs are for Redhat/CentOS systems only -- but you could easily make these cross-unix compatible.

MySQL Meetup Last Night

It's a strange world. Last night, I attended my first Vancouver MySQL meetup. This morning, my google reader is filled with news that Sun is buying MySQL.


We met at the Milestone's on Robson. At the peak of the evening, there were 8 people out. I think the goal of the meetup was to talk about clustering, but we never got around to it. People were mostly introducing themselves, talking about their backgrounds and what they were working on. 

I suppose that's the problem when you do something like this at a restaurant. This was my second meetup, the first was the Ruby meetup on in December. I think that if you want to have a specific technical discussion you should start with a presentation in a meeting room, then move elsewhere for food. 

That being said, I was happy with how the meetup went, and plan to attend the February meeting. It's a good group with a wide range of experience.

Sunday, January 13, 2008

So this is it

Friday was my last day at the old job. It was a very bitter-sweet day. Eight years, two months is a long time to be anywhere in the IT world, especially since it has been my only real day job.


The weirdest part was handing in my key, swipe card and garage door clicker. My keychain is very light now. 

I've been working in that space for 5 years. Where will I park down town? Will I ever see my servers again? What do I do with my guitar?

The IT team gave me a touching card and $100 give certificate. I'm going to miss working with those guys the most. Solving problems with them always gave me endorphin rushes. It will be strange not having a dozen other people within 30 feet to discuss ideas with.

We headed to a pub after work. I was surprised when 25-30 people showed up. A bunch of ex-employees from throughout the ages came out. 

I officially start the new gig Monday. I'll have a few infrastructure things to work on (email, backups, etc). That will be easier than doing it at the old gig, considering there is only a handful of people to deal with it. Then, I think I'm going to be working on build automation and architecture design. 

My plan is to experiment with Puppet and cfengine. I've been making complex kickstart files for a long time. The problem with those is that you only get one shot -- if you change your NTP servers, add an SNMP community or any other global config change you need to log into every system and update them. From what I understand, using puppet or cfengine, this is all automated for you.

It's going to be cool..

Thursday, January 10, 2008

My Last EC2 Availability Post

Tomorrow is my last day at the current gig, so this will be my last EC2 uptime report. I won't have access to these graphs/machines any longer.

So far, 100% availability of this EC2 dating back to November 27.

Unfortunately, there have been two other incidences with different EC2 hosted machines in the past couple of weeks. One machine rebooted itself. I'm not sure if it crashed or if there was another issue. It came back up fine, other than a few services that weren't configured to start at boot (that's mostly how we knew it rebooted).

Another machine disappeared for about an hour. It wasn't reachable at all -- ping, ssh, etc. When it came back to life, everything was fine. No change in uptime, so it didn't reboot. It was clustered with another EC2, which was fine during the outage, though it also couldn't access the down machine.

We're still in development, so at any one time, we're currently running 6-8 EC2's. With that rate of failure, be sure to back up your data and keep tabs on them with some sort of remote monitoring.