Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there really no easy way to test puppet scripts on a remote machine?

Tags:

puppet

I'm experimenting with Puppet scripts for deployment.

I find the hardest part about the process of writing those scripts is iteratively testing them.

I don't want to puppet apply on my local development machine, that liable to screw stuff up. I have a clean-slate remote box where I want to apply. I also don't see how a puppetmaster can help me; I might be using a puppetmaster at a later point for production deployments, but for now, I just want to get my code working.

So I put together a quick shell script that would rsync the different directories from my local puppet module path to /tmp on the remote machine, and then run puppet apply. This is terribly inconvenient. It's slow, especially if we're talking about a syntax error.

I think what I want really is something like a puppetd <-> puppetmaster connection, where puppetd on the remote machine receives an already compiled manifest. Just an adhoc-one over a SSH connection, without having to actual setup an Puppetmaster, dealing with certificates etc. puppet apply user@host.

There seems to be nothing of the sort, but how do other people deal with this? I experience of working on a Puppet script is incredibly frustrating to me, as is.

like image 406
miracle2k Avatar asked Jul 04 '12 15:07

miracle2k


People also ask

How long does puppet take to run?

Puppet automatically attempts to run on each of your nodes every 30 minutes. To trigger a Puppet run outside of the default 30-minute interval, you can manually run Puppet.


1 Answers

I'd recommend using Vagrant. If you're not testing the puppet master setup you can use the built in provisioner integration.

Once you have everything setup you can run vagrant provision or just run puppet apply on the vagrant vm.

Here's a related article you may find helpful as well.

like image 103
Mark Roggenkamp Avatar answered Oct 21 '22 03:10

Mark Roggenkamp