The main motivation for my setup is:
- if something happens to puppet upgrade and puppet fails to work, I do not want to ssh into nodes to manually fix the problem.
- Even "mcollective" is not proper solution here (usable for quickfix, yes), as some nodes might be down and will have to catch up eventually
To achieve this, I have two puppets (installed in dedicated separate dirs under /usr/local/puppet-1 and /usr/local/puppet-2). If, for the sake of argument, we forget that puppet-1 manages the whole system except itself, you can see the redundancy here (puppet-2 is served a special config catalog that only includes puppet-1 installation/upgrades). Each puppet definition is in own puppet module, so nothing is shared there.
Up to this point it is all nice, and works, if you presume you use separate manifests for each puppet, for the same node. The annoying thing becomes when I have to manage manifests in separate git repos, at least partially.
If all above seems overcomplicated and overengineered, there might be something about me being more lazy than others and thus putting in more work upfront so I do not have to do it later (fixing broken puppet installations manually). If so, please tell me:)
I can understand that.
I believe we are talking about two contradicting concepts here:
a) directory environments assume all environment-related content is under main environment directory, except for common modules (basemodulepath)
b) power users know what they are doing and would like to interpolate variables to optimize their workflow
I already work around that when installing puppet, as it gets patched with mentioned changes automagically. And these changes are only needed on master, though.
ALTERNATE SOLUTION
Since I posted original message, I have come up with a better solution actually. Forget the interpolation patch. I've introduced new puppet configuration variable, called "environment_conf_filename", which enables customization of "environment.conf" filename.
One puppet master now uses environment.conf-1, the other environment.conf-2, from the same directory (and same git repo).
Content of these files now looks like this:
### environment.conf-1
manifest = manifests-1 <-- full node definitions, including module for puppet-2
modulepath = modules/
### environment.conf-2
manifest = manifests-2 <- separate manifest, that only includes definition of puppet-1 installation for all nodes
modulepath = modules/
Now all content can reside in the same git repository, and puppet masters still do not interfere with each other, which is splendid.
Since solution is already done (works for me), I am moving this thread to "comment/criticise my setup", ok? If you have opinion about this, please speak up.
And thanks for responses,
b.