2

So say you're using puppet. Initially you might use the puppet server to set it up with a puppet agent to setup your server (you might, then again you might use images, but I'm using puppet).

Let's say that the initial provisioning goes well and then you decide you need to add some more settings to your server; but you don't want to re-provision it completely; wipe out the database on the system and start from scratch; instead you'd rather add the settings, perhaps remove some old ones, and then restart your daemon (which to be fair, may already be done by puppet)

Do you:

a. Comment out the initial provisioning code before running puppet apply?
b. Set a variable that can used by the code to prevent it from being re-provisioned?

How is this situation properly handled? Because handling it wrong seems likely to lead to disaster (recovery).

leeand00
  • 4,615

1 Answers1

2

Puppet is declarative and functional - it ensures your system is in a consistent state based on the code you write.

In your case, there's no re-provisioning happening - that's how some of the procedural systems work, but not Puppet.

So if you originally told puppet you want conditions A, B, and C to be true for your server, and now you want D and E, the Puppet agent will look - find A, B, and C to be the existing state, do nothing, and then add D and E.

On the next run it would find nothing to do (until you add F or something breaks A-E on the system and then it would restore their configuration to a known good state).