New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why is the yml file required? #414
Comments
@mhedgpeth you describe inspec design. Therefore perfect match 👍 Double-check that you have the latest version installed
Step 1:
Step 2:Adapt the test and re-run it with inspec
|
Step 3
Now you are able to upload the profile to Chef Compliance. |
Is that what you are thinking of? I would love to understand what went wrong, because that should not happen. |
Chris, it was a pathing problem. I was using the ChefDK version but within the path of the code I pulled from master and made that mistake. Sorry about that. The steps above is exactly what I'm looking for and what Dominic and I were talking about at CfgMgmtCamp on Tuesday. I'm really excited about this tool. |
anything we can do to improve the situation with ChefDK? |
Oh you're fine, it was just a noob move on my part. |
@mhedgpeth Thanks for reporting, if you experience any further issues, please keep us posted. |
Btw: I find the whole requirement on Thank you @chris-rock for that awesome help! 👍 |
See my attempts here: https://github.com/mhedgpeth/inspec/tree/better_noob_documentation I think the problem is that you really have 3 main things happening and the flow isn't easy and it's packed into one executable.
I think in the documentation it might be nice to see something like this: In Chef --- this equivilent exists in inspec |
I'm learning the code and the tool and wanted to start out with a hello_world_spec.rb. When I did that, I got an error that the metadata.rb is not there. Looking at the code, it's really looking for a yml file. I suggest that this should be changed.
This exposes what I see to be a major architectural question: is inspec a testing framework that can be cataloged within a compliance language or is inspec a compliance framework that uses tests? I believe (from my recent conversation with Dominic) that it's the former.
If that's the case, then the workflow of learning inspec should start with the test. Start out with a hello world test that make sure 80 isn't running on one's laptop. That should be: create a file and write the test in four lines, then run inspec against that folder. It should run the tests!
Then step 2 is I want to add some compliance decorators to the tests. Doing that should work, with no other work!
Then step 3 is to package those tests into a policy. That should require the yml file so it can be catalogued correctly.
This way you get a really nice learning workflow and start people at the natural center of inspec as I see it: test -> control -> compliance policy
What do you think?
The text was updated successfully, but these errors were encountered: