Small Mosaic


Categories:

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

Archives:

July 20111
June 20112
May 20113
April 20112
March 20117
January 20111
December 20103
November 20103
August 20101
July 20101
June 20104
May 20102
April 20101
March 20108
February 20101
January 20102
Full Archives

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 and 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 and 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 and same date


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

Copyright © 2000-2010 Dean Wilson XML feed logo