Hello Puppet – on Ubuntu 12.04 LTS

Read new, revisited version of Hello Puppet World. Now with one-liner & module!
Old version below. >> Move to new version >>>



Learn “Hello Puppet World” in 5 minutes. Meet the configuration management system used by Google and Wikipedia.
Prequisites: command line, sudo and apt. You need Xubuntu 12.04 live CD (burn image). To use non-US keyboard: ‘setxkbmap fi’.
IIRQ: I wrote this article from memory. It’s based on my tests on Ubuntu 12.04 LTS beta1 and 12.04 LTS beta2.

Install Puppet Agent

$ sudo apt-get update
$ sudo apt-get -y install puppet

Create Site Manifest (the Program)

$ mkdir puppet
$ cd puppet
$ mkdir manifests
$ nano manifests/site.pp
class helloworld {
        file { '/tmp/helloPuppet':
                content => "See you at TeroKarvinen.com! "
        }
}

Run Puppet

$ puppet   --modulepath modules/   apply manifests/site.pp

First time, it shows you a log how it created the file. The second time, it doesn’t do anything – all is well already.

Verify Your Success

$ ls /tmp/helloPuppet
/tmp/helloPuppet
$ cat /tmp/helloPuppet
See you at TeroKarvinen.com!

Congratulations!
Next, you can have a look at  PuppetMaster on Ubuntu 12.04 and Puppet Reading List. Have fun with your puppet!

Posted in Uncategorized | Tagged , , , , , , , | 1 Comment

One Response to Hello Puppet – on Ubuntu 12.04 LTS

  1. Update for Ubuntu 12.04, puppet 2.7.11-1ubuntu2.2
    Don’t use class, instead:

    file { '/tmp/helloPuppet':
    content => "See you at TeroKarvinen.com! "
    }

    Invoke puppet like this

    $ puppet apply --modulepath modules/ manifests/site.pp