Small Mosaic


Categories:

books
career
codinghorrors
comics
events
geekstuff
justdont
languages
languages/bash
linkshot
magazines
meta
misctech
movies
nottech
operatingsystems
operatingsystems/linux
operatingsystems/linux/debian
operatingsystems/solaris
paranoidadmin
perl
presentations
programming
python
ruby
security
security/apache
security/tools
serversmells
services
services/dns
sites
specifications
sysadmin
tools
tools/commandline
tools/firefox
tools/gui
tools/network
tools/online
tools/online/greasemonkey
tools/puppet
unixdaemon

Archives:

February 20101
January 20102
October 20092
September 200910
August 200910
July 20094
June 20091
April 20093
March 20097
February 20094
January 200917
December 20081
November 20084
October 20085
September 20084
August 200812
July 20089
April 20084
March 20081
February 20081
January 200815
August 20072
June 20079
May 20076
April 20078
March 200731
February 20073
January 200721
December 20061
November 20064
October 20066
September 200632
August 200617
July 200614
June 20069
May 200613
March 200611
February 200616
January 200611
December 20051
November 20056
October 200519
September 200525
August 200516
July 200516
June 200513
May 20052
April 200519
March 200531
February 200520
January 200531
December 200421
November 200430
October 200432
September 200418
August 20047
July 200414
June 20045

Wed, 08 Apr 2009

New Laptop? New job?
Is it just me or does everybody seem to go and buy a new laptop just before they leave their current job? Is it the techie version of buying new work shoes?

Like this post? - Digg Me! | Add to del.icio.us! | reddit this!

Posted: 2009/04/08 11:37 | /geekstuff | Permanent link to this entry | This entry + same date


2009 Q2 PiP
I've been quiet on the PiP front for a while now. While the day to day stuff has kept me busy it hasn't exactly helped move my career along, I spend most of my time doing things I already know how to do but with a little twist on them.

In an attempt to stop myself from further stagnation I've put a short list of goals below that should be my bare minimum for the next three months.

I'll do a follow up post at the end of the quarter so see how far I got.

Like this post? - Digg Me! | Add to del.icio.us! | reddit this!

Posted: 2009/04/08 10:20 | /geekstuff | Permanent link to this entry | This entry + same date


Mon, 06 Apr 2009

Ruby DNS Testing - First Glance
DNS is one of those 'small config change here, errors a long way over there later' technologies that always leaves me a little worried about the knock on effect of my changes. As a simple, coarse, safeguard at work we use Nagios to check that a canary record in each zone can be resolved from each DNS server. It's far from a perfect solution but it does catch some of the bigger errors and typos.

In order to beef up this safety net (and encourage me to spend time using a language other than Perl) I've been investigating some of the testing options available in ruby, namely RSpec and Cucumber. I have to say the testing libraries themselves are actually nice to use and easy to pick up even for a non-rubyists like me. On the other hand I quickly developed a strong dislike of the ruby resolv library that actually does the DNS queries. The lack of decent tutorials or documentation for anything beyond the very basic uses and the (to me) very awkward API nearly had me running back to the safety of Net::DNS , a mature and widely used perl module. There is a ruby port that I'll have a look at in the future

For the testing itself I started writing RSpec stories against my own DNS and found the API easy to use. Testing existing configs against local policies is simple - for example all our domains should list at least three name servers -


it "should have at least 3 NS records" do
  @resolver = Resolv::DNS.new
  @nameservers = @resolver.getresources( domain, Resolv::DNS::Resource::IN::NS)
  @nameservers.should have_at_least(3).items
end

After doing some more scut work and testing other record types I moved onwards and upwards to Cucumber. I'm not sure I'd be able to gift someone else with writing the scenarios but they'll be easier to show business people than raw rspec stories. They'll also be very handy in migration meetings (an executable todo list), if it's not on the page it's not getting done.


Feature: Mass DNS Resolution
  In order to present a consistent brand image
  As a System Administrator
  I want to ensure no domains point away from our main IP

  Scenario Outline: Resolve a name to a number
    Given a hostname of <hostname>
    Then I should see the IP address 266.266.266.266

    Examples:
     | hostname        |
     | example.org     |
     | www.example.org |

Next time I work somewhere with ISO 27xxx compliance requirements I'll see if the controls can be written like this and have automatic verification run from them. Cucumber is a little wordy for my tastes but I can see where that could be a strength when presenting to the right audience (such as compliance auditors).

Next time we have a set of DNS migrations I'll be using at least one of these tools to write before and after test cases to ensure nothing gets missed or slips through the cracks. Once I've been through a couple I'll write up in more detail what we end up with.

Like this post? - Digg Me! | Add to del.icio.us! | reddit this!

Posted: 2009/04/06 15:46 | /ruby | Permanent link to this entry | This entry + same date


books career codinghorrors events geekstuff justdont languages/bash magazines meta misctech movies nottech operatingsystems/linux operatingsystems/linux/debian operatingsystems/solaris perl presentations programming python ruby security security/apache security/tools serversmells services/dns sites sysadmin tools/commandline tools/firefox tools/gui tools/network tools/online tools/online/greasemonkey tools/puppet unixdaemon

Copyright © 2000-2005 Dean Wilson XML feed logo