Changes between Initial Version and Version 1 of how-to/puppet/freepuppet-helper

May 31, 2011, 10:12:17 AM (8 years ago)
Jamie McClelland



  • how-to/puppet/freepuppet-helper

    v1 v1  
     2= freepuppet-helper =
     4freepuppet-helper is a python script for executing commands either locally or on a series of remote hosts.
     6Our [wiki:puppet puppet repo] contains a helper directory with and freepuppet-helper.
     8== Why do we need a python script if we have puppet? ==
     10Puppet allows us to easily ensure that a set of commands and files are executed and copied to our servers (and will execute/copy the commands/files over and over again if necessary).
     12The freepuppet-helper script allows us to execute/copy a command/file to one or more servers once and witness the output. Also, it allows us to perform operations locally, like list available servers or automate setting up a git remote for each server's puppet repository.
     14== How do I install it? ==
     16It's already there with the git repo. For convenience, you should take a couple extra steps:
     18 * Add a symlink to your freepuppet-helper in your ~/bin directory (or another directory in your $PATH)
     19 * Add this line to your ~/.bashrc file, changing the path to the appropriate value:
     21export FREEPUPPET_REPO_PATH=/home/jamie/projects/mfpl/puppet/confdir
     24== How do I use it? ==
     26Run freepuppet-helper followed by one or more sub-commands.
     28For example:
     31freepuppet-helper ls
     34Will generate a list of servers located in our manifests/nodes/production directory.
     36You can limit the list by adding a colon separted argument to the command, by either specifying a specific server:
     390 jamie@chicken:~$ freepuppet-helper ls:mandela
     410 jamie@chicken:~$
     44Or, by specifying a phrase to grep all server manifests for:
     470 jamie@chicken:~$ freepuppet-helper ls:mosh
     710 jamie@chicken:~$
     74ls is a local command, meaning it is executed on your computer.
     77== What other commands are available? ==
     82fab -l
     85To see a list of all available commands (and their aliases)
     87== How can I add new commands? ==
     89Simply edit the script and commit and push your changes.