ported compliance generator functionality into chef-load#37
ported compliance generator functionality into chef-load#37
Conversation
| @@ -435,14 +466,16 @@ func randomChefClientRun(config *Config, chefClient chef.Client, nodeName string | |||
| } | |||
|
|
|||
| // TODO: (@afiune) Notify Data Collector of compliance report | |||
There was a problem hiding this comment.
This PR doesn't cover this section of the code? Are we going to use it at all? if not, can we remove it?
There was a problem hiding this comment.
I did not take it out for now because what i'd really like to do with this generator is to harmonize it better with the rest of the way the generation stuff works with chef_runs. When we do complete that, then this commented out section of code will be useful once again. This pr just adds in generator, exactly as it works in our current ruby version, just so that we could stop using the ruby version of generator and get all things generation into chef_load (where they all belong).
| platform string | ||
| } | ||
|
|
||
| func GenerateComplianceData(config *Config, requests chan *request) error { |
There was a problem hiding this comment.
How do we prevent compliance data to be generated? Meaning that if I only wanna generate a number of nodes, or just a number of actions, how can I disable compliance?
There was a problem hiding this comment.
in the toml, just set matrix.simulation.nodes = 0
| # Matrix settings for Compliance Generation | ||
| [matrix] | ||
|
|
||
| [matrix.samples] |
There was a problem hiding this comment.
This looks like a very complete matrix, not a sample one. Could we make it a bit shorter? otherwise the config generator will create a very long "sample" config that might be overwhelming.
An idea could be to generate another file with this data called /path/to/compliance-matrix.toml and then in the sample config add a line like you did with compliance_sample_reports_dir , for example:
# Explain explain explain what is this file for, muchas gracias!
# compliance_matrix = "/path/to/compliance-matrix.toml"| // TODO catch error | ||
| GenerateChefActions(config, requests) | ||
| GenerateCCRs(config, requests) | ||
| var wg sync.WaitGroup |

Ported the Compliance Generator into chef-load.
This works exactly as it did in our original implementation which was written in ruby.
This piece supports generating data back a configurable amount of days.
A new configuration section has been added to the chef-load.toml which is needed in order for this functionality to work properly.