6

Is there any way to use puppet or chef recipes without launching daemons and such? I'd like to be able to interpret files and apply them without all of the heavy lifting.

If not, is there an alternate product that can be used to setup arbitrary things like lamp stacks without a footprint?

8 Answers 8

4

You can run puppet <file>.pp if you just want to apply a single manifest locally. This said, if you've got a small number of servers to manage, a single puppetmasterd isn't going to be a huge inconvenience.

3

As rodjek notes, you can execute single manifests using the command puppet. But by not having puppetmasterd take care of the compile process you're cutting out a whole bunch of the good magic associated with module organisation and autoloading. Not to mention having to manually distribute your manifests.

From your question, it sounds like you may be more worried about the footprint of the client than the server. It is worth noting you don't have to run puppetd in daemon mode and some people, myself included, prefer to call it periodically from cron with the options --onetime --no-daemonize. You could choose to call this as often or not as you wish.

3

Chef can be used with 'solo' mode, which doesn't require a running daemon process, or a server. You can point it at a remote URI of cookbooks, so you don't have to distribute files all over just to configure things.

If you are installing/configuring software programs that don't require root access (ie, install in home dir, ports over 1024), you don't even need root access to use chef-solo. This is also the easiest way to get started using Chef, because the recipes you write to use with solo are usable with Chef client/server environments too, so you can scale up easily.

For more information see the Chef Solo page on the chef wiki.

3

Use git: You'll need git on the servers though. Not the server, but the client.

Create your manifests with puppet.

Push the manifests to a git repo on the target.

Use a hook to run the puppet command on your manifest. ( you'll run it when the manifest is pushed , on the target host )

Repeat.

The secret sauce here is that you can, as said above, run a manifest with the command line tool. Hey, run it from your laptop, or from several, why not? No daemons, but you will need access initially to install puppets' command line clients and git.

1

If you mean not running the puppetd (client daemon) but don't mind having a puppetmaster, then it is something i do :

Just connect on the client and run puppetd in --test mode on each client. Test mode is said to be faster than --onetime --no-daemonize. You can also configure options in your /etc/puppet/puppet.conf

# aofficelinux2 is the puppetmaster server name
sudo /usr/sbin/puppetd --server aofficelinux2.visionten.locala --waitforcert 60 --test –-verbose

I also do it remotely, when i need, with a script that rsync my repo to the puppetmaster and launch the puppet client remotely

# aofficelinux5 is the puppet client servername
rsync_puppet_to_aofficelinux2
ssh -t aofficelinux5 sudo /usr/sbin/puppetd --server aofficelinux2.visionten.locala --waitforcert 60 --test –-verbose
1

Yes! You run sh# puppet apply yourmanifest.pp

0

The simplest way to run Chef Solo is to use littlechef: https://github.com/tobami/littlechef

0

It seems to me that Ansible was built with exactly this philosophy in mind:

  • No server or client daemons; use existing SSHd
  • No additional software required on client boxes

Basically, manage your configuration description locally (e.g. in a git repo) and push out the commands necessary to reconfigure your servers via ssh. My cup of tea, exactly :)

You must log in to answer this question.