[colug-432] configuration management tools

Steve Potter spp at unixsa.net
Mon Sep 23 22:57:12 EDT 2019


Pretty much all of the CM tools can handle connecting to a database and 
using it as a backend for variable expansion.  Puppet can use 
hiera-mysql <https://forge.puppet.com/crayfishx/hiera_mysql> or 
hiera-mysql-backend <https://github.com/Telmo/hiera-mysql-backend> or 
hiera-mysql2 <https://forge.puppet.com/nvitaterna/hiera_mysql2> for 
examples.

-spp

On 9/23/2019 1:08 PM, Jeff Frontz wrote:
> Oooh, salt can query sqlite3 (and mysql) natively: 
> https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.sqlite3.html
> Does that do what I think it does (namely, return info in a tuple and 
> allow iteration internally)?
>
> On Mon, Sep 23, 2019 at 12:55 PM Jeff Frontz <jeff.frontz at gmail.com 
> <mailto:jeff.frontz at gmail.com>> wrote:
>
>     [I'm skipping the delivery/enforcement stuff since that's being
>     solved in Other Ways; I'm focused on the data population problem.]
>
>     On Mon, Sep 23, 2019 at 12:12 PM Rick Hornsby
>     <richardjhornsby at gmail.com <mailto:richardjhornsby at gmail.com>> wrote:
>
>
>         On September 23, 2019 at 9:20:16 AM, Jeff Frontz
>         (jeff.frontz at gmail.com <mailto:jeff.frontz at gmail.com>) wrote:
>
>>         I have a need to generate configuration files for a bunch of
>>         different (some open-source, some semi-proprietary)
>>         applications that run on a bunch of different systems.
>
>         For configuration files, (this is just one way to do it) I can
>         create a template file that looks like the final config format
>         - be that JSON, TOML, yaml, whatever. I put placeholders
>         (variable) where I want to dynamically set a value. Then in
>         the Chef/Puppet code, I say something like
>
>         template ‘/opt/someapp/config/urmom.json’
>         source ‘template_source.json.erb'
>         variables( pancakes: ‘yes’ )
>
>
>
>     OK, so the problem space is more like
>
>               template '/CI/src/***SPECIFIC-NODE-NAME***/BFT.json'
>                        source `BFT-template.json`
>                        variables(iterator:serviceTuple: 'select
>     peerID, service-identifier-node, service identifier-port from
>     mondo-table where node != ***SPECIFIC-NODE-NAME***')
>
>     where BFT-template.json might be something like (please pardon my
>     JSON ignorance):
>
>                 ...yada yada yada...
>               CommonItems {
>     "lotsa":"stuff",
>                    },
>                 PeerItems {
>                        [foreach:serviceTuple]
>                             {
>      "peerName":"**peerID**",
>      "peerNode":"**service-identifier-node**",
>      "peerPort":"**peer-service-1-field**",
>                             },
>                        [endfor]
>
>                    ... yada yada yada...
>
>
>     Do any of these tools/solutions support complex operations like
>     "run a select from a table and iterate over the results to
>     add/populate fields to the template"?
>
>
>
>
>>         I need to configure the applications on the other hosts to
>>         use the each of the destination hosts' services.
>
>         One thing you may be looking for is service discovery.
>
>      For more Reasons, it needs to be deterministic/stable at config
>     distribution time (and beyond) so having peers advertise (and be
>     dynamically discovered) isn't in the cards.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.colug.net/pipermail/colug-432/attachments/20190923/332e17f9/attachment.html 


More information about the colug-432 mailing list