Archive for August, 2009

The Life and Times of Martha Washington in the Twenty-First Century

August 30th, 2009

I am a big fan of Frank Miller‘s work (Sin City, Hardboiled, 300, Batman (the Dark Knight era), and Ronin).  My favourite of his works though the Martha Washington series – which was drawn by the equally magnificent Dave Gibbons.

The series started with the “Give Me Liberty” (the title taken from the Patrick Henry – “I know not what course others may take but — as for me — give me liberty or give me death.”) mini-series and continued through another couple of series and several one-shots.

Now they’ve finally been collected in one place - The Life and Times of Martha Washington in the Twenty-First Century.  I strongly recommend the collection to anyone who likes Miller’s later work.

Creating a new GPG key and revoking the old one

August 21st, 2009

So every couple of years I need to recreate my GPG key and the old one.  This is a fairly annoying as it is a whole set of commands that I seem to mentally blank immediately after use – the same with SSL certificates – thank dog for cacert.org and automation. :)

So this time when I needed my new key I thought I’d see if someone else had instructions.  And lo and behold Google found a really good HOWTO at Ana’s blog » Blog Archive » Creating a new GPG key.

Even if you don’t have a good grasp of what you’re doing the HOWTO steps through the process of creating a new key and subkeys and the other associated cross-signing etc guff that I can never remember. The only thing it doesn’t do is explain how to the old key but Google came through again and you can find a simple set of instructions on how to do too.

So you can find my new key here.

P.S. Of course I did forget to sign the new key with the old key before I revoked it …. idiot. :)

Hot Library Smut

August 15th, 2009

I love books and libraries so when I saw a post entitled - Hot Library Smut – well I had to re-post it.  It’s completely NSFW … nah I lie .. you might drool on the keyboard though. :)

P.S. One of the libraries is Trinity College Library where the Book of Kells lives – interesting trivia fact – several pieces of the text are of the Gospels are wrong in the Book – this error I particularly like. In Matthew 10:34 the text should read “I came not to send peace, but the sword,” but the Book has gaudium (“joy”) where it should read gladium (“sword”) and reads as “I came not [only] to send peace, but joy.”  Whilst not a Christian I much prefer the latter version of this fairly controversial passage.

Pro Git

August 7th, 2009

Congratulations to Scott Chacon on his new book Pro Git. I am highly jealous – this was one of the things I’ve really wanted to write about and was on my list of things to pitch to my publisher. As is the nature of these things I am not as smart as I think I am and someone else also had the idea. :)

It’s a great little title and Scott being one of the GitHub guys is well positioned to right the definitive book on Git.  You can find the whole book under a CC license at the Pro Git site but if you love the book then buy a copy so Scott gets some royalties and can afford to eat and all… :)

Practical Puppet – the beginning

August 5th, 2009

So I’ve been promising that I’ll do a 2nd edition of the Pulling Strings with Puppet book.  So I am.  I’ve just started to map out a table of contents and done a little writing – just two chapters so far – too. It’ll either be called Practical or Pro .  Not sure which or even which I like.  We’ll see.

Puppet 0.25.0 Release Candidate 1 released!

August 4th, 2009

After a lot of work, a small mountain of commits, and a lot of testing and wrangling we’ve got the first 0.25.0 release candidate out. You can read all about 0.25.0RC1 here and you can see what else is new and changed below:

What’s Changed?

There are substantial changes in 0.25.0 and more changes to come in the future.  Most of the changes in 0.25.0 are internal refactoring rather than behavioural.  The 0.25.0 release should be fully backwards compatible behaviourally with the 0.24.x branch.

This means a 0.25.0 master will be able to manage 0.24.x clients.  You will need, however, to upgrade both your master and your clients to take advantage of all the new features and the substantial gains in performance offered by 0.25.0.

The principal change is the introduction of Indirected REST to  replace XML-RPC as the underlying communications mechanism.

This is a staged change with some functions migrated in this release and some in the next release.  In the first stage of the Indirected REST implementation the following functions have been migrated:

- Certificates
- Catalogue
- Reports
- Files

In 0.26.0 (the next release) the following remaining functions will  be migrated:

- Filebucket
- Resource handler
- Runner handler
- Status handler

The new REST implementation also comes with authorisation configuration in a similar style to the namespaceauth used for XML-RPC.  This new authorisation is managed through the auth.conf file (there is an example file in the conf directory of the tarball). This does not yet fully replace the namespaceauth.conf file but will when the remaining handlers are migrated to REST. It  works in a similar way to the namespaceauth.conf file and the example file contains additional documentation.

As a result of the introduction of REST and other changes you should see substantial performance improvements in this release.

These particularly include improvements in:

- File serving
- The performance of large graphs with lots of edges
- Stored configuration (see also Queuing below)

Other new features include (this is not a complete list – please see the Roadmap for all tickets closed in this release):

New Language Features

Regular expression matching is now possible in node definitions.

node /web|db/ {
include blah
}

node /^(foo|bar)\.example\.com$/ {
include blah
}

now also allows regular expressions in if statements with the use of the =~ (match) and !~ (not match) operators.

if $uname =~ /Linux|Debian/ {
...
}

Also available are ephemeral variables ($0 to $9) in the current scope
which contain regex captures:

if $uname =~ /(Linux|Debian)/ {
notice("this is a $1 system")
}

Similar functionality is available in case and selector statements:

$var = "foobar"
case $var {
"foo": {
notify { "got a foo": }
}
/(.*)bar$/: {
notify{ "hey we got a $1": }
}
}

val = $test ? {
/^match.*$/ => "matched",
default => "default"
}

New functions

There are three new functions:

require – Similar to the include function but creates a dependency on the required class in the current class.  This means the required class will be loaded before the current class is processed.

split – allows you to split strings and arrays

versioncmp – allows you to compare versions

Command Line Compile & Apply

now has the capability to compile a catalogue and output it in JSON from the master.  You can do this via the –compile command line option.

# puppetmasterd –compile nodename

Corresponding with this feature is the ability to apply a JSON configuration from the binary using the –apply option.

# --apply cataloguefile

Or you can use – to read the JSON in from standard input.   will then compile and apply the configuration.


Thin Stored Configuration

0.25.0 also introduces the concept of “thin” stored configurations. This is a version of stored configuration that only stores the facts and exported resources in the database.  This will perform better than full stored configuration but because not all resources are available this may not suit all purposes.

Thin stored configurations are initiated by setting the thin_storeconfigs option on the master or on the
puppetmasterd command line using –thin_storedconfigs.

Queuing

There is a new binary called puppetqd that supports queuing for stored configurations.  You can read about how it works and how to implement it on the Puppet Wiki.

Further documentation is in the README.queuing file in the tarball.

Application Controller

All the logic has been moved out of the binary commands and added to an Application Controller.  You can see the controller code at lib//application.rb and the logic for each application at lib//application/binaryname.rb.

Binary Location Move

To bring more in line with general packaging standards the puppetd, puppetca, puppetrun, puppetmasterd, and puppetqd binaries now reside in the sbin directory rather than the bin directory when installed from the source package.

Other features

You can find a full list of the tickets closed thus far for version 0.25.0 is here.

Planet Puppet!

August 3rd, 2009

Brice Figureau (aka masterzen on IRC and elsewhere)  has started up PlanetPuppet.  This is a devoted to discussing and I’m pleased to say he’s added my incoherent ramblings on the topic to it. Thanks to Brice for registering the domain and installing moonmoon and doing all the hard yards!  Another drink owed to you from the community! :)

Stashing with Git

August 2nd, 2009

I use fairly extensively and one of the features I use and love is . The command allows you to take point-in-time snapshots of development and “” them away. The source tree is then returned to the current commit.

So let’s take a quick example. Stashing is something I particularly do when I want to pull changes into a dirty tree.  I am working on a problem and someone over there has committed something that changes the environment. I don’t want to commit my half-done work but I do want to keep it whilst I add the other commits into my tree.  So I type:

$

This will “” away the changes in my dirty tree and leave it clean at the last commit.

I can then, for example, cherry-pick in a commit and then use pop to add back in my changes.

$ cherry-pick 9cc0589
$ pop

This will re-apply my stashed changes on top of the new commit and remove the . If this causes conflicts then you need to edit them by hand.

You can store more than one too – the last operations will just pluck the last from the list – but you can store a collection. You can see what stashes are available by using:

$ list
@{0}: WIP on features/master/dailytask: 2d74623... Added daily build task to Rakefile
@{1}: WIP on features/master/dailytask: 2d74623... Added daily build task to Rakefile
@{2}: WIP on master: f13f08d... Minor fix to URL for LDAP nodes documentation

You could then apply a particular by specifying the ’s ID.

$ pop @{2}

You can see more features and options at the git-stash man page.