Terence Kent writes:
> From that understanding, I would expect SLS files to be named as
> adjectives. For example...
>
> The later description matches ansible playbooks, but isn't what I
> thought the state system was all about. Before we go down the path of
> possibly mis-using the state system, I wanted to check with the
> community. What's the "right way" to look at this? Or, is there no
> "right way"?
You described a really well thought out naming convention here. If it makes sense to your colleagues, then it's "right".
I'm not going to claim that I am an expert, but my approach is probably best characterized as a deconstruction of ITIL service level packages. My top-level SLS IDs are very narrowly scoped as a result and get named after the services or resources they manage, with an emphasis on reuse across service offerings. The different Salt file server environments (== Git branches) represent the development/testing/acceptance/production (DTAP) phases of our enterprise life cycle. Together these Salt states plus the file server environments and the accompanying service-specific customization in Pillar implement large-scale service level packages, e.g., a production Shibboleth identity provider, a development mail relay, or a testing Minecraft server. All of this is influenced by my thinking on things like how to apply object oriented programming techniques to system administration and how to use a GitHub flow-like change model in a configuration management system.
You can find examples here:
https://github.com/irtnog/salt-states
https://github.com/irtnog/salt-pillar-example
I've written a bunch of my own formulas, too:
https://github.com/irtnog/openssh-formula
https://github.com/irtnog/shibboleth-formula
https://github.com/irtnog/tomcat-formula
Note SLS IDs like `sshd`, `aws.lambda`, or `tomcat.shibboleth-idp`, or Pillar SLS IDs like `
login.example.com`.
Best wishes,
Matthew
--
"The lyf so short, the craft so longe to lerne."