mardi 21 mars 2017

Testing in CHEF Automate CI/CD an InSpec

I have few questions regarding testing in CI/CD pipeline.

For a background, I have a chef-automate setup and in-spec..

In the acceptance stage, we perform T(SMOKE) and T(FUNCTIONAL). I believe these scripts run in the runner node, so tests such as curl can be done.

  1. What about the tests that I want to perform inside the node itself, that might require sudo access?

  2. "http://ift.tt/2mMYMaK" says that "InSpec is a framework that allows you to run infrastructure testing as well as compliance testing. The compliance features are always optional and provide customers a way to use InSpec for both use-cases." So in the delivery/build_cookbook/recipes/smoke.rb, how can I leverage inspec to test my infrastructure part? Will this mean establishing an ssh session as root from runner to the infrastructure node?

  3. Philosophically what is the use of the cookbook/test dir and how does that blend with chef automate? Can Inspec be used here to do certain infrastructure test during chef-client convergence phase? If we are performing tests here what type of tests are we doing in the smoke test in automate?

  4. Is it possible for the smoke test to pick and execute a test script of /test in the infrastructure node itself with root privileges? If yes is it a good idea to do so?

Aucun commentaire:

Enregistrer un commentaire