1

I currently have a build farm setup using Jenkins 2.46.3 LTS. I have a Jenkins Master installed on a physical server with 4 - 5 virtual machine build nodes running on VirtualBox.

I am thinking about managing the configuration of the virtual machines using Chef, however much of the software I need installed on these build nodes does not have a corresponding Chef Supermarket Cookbook. I do not feel confident enough with Chef to create my own cookbooks for managing these nodes.

I do have some experience writing Inspec tests in order to test a few wrapper cookbooks I have for some Chef Supermarket cookbooks. My question is; even if I do not have cookbooks that run to install this software initially on the nodes, is there a way to run a suite of inspec tests against the actual nodes (as oppose to using them to test a cookbook in a sandbox environment)?

My goal is to automate all the manual checks we would do to verify the build nodes are setup correctly. Ohai seems like it may be good for this as it diffs the configuration Chef has and what's on the managed node anyways.

If there is a better approach to completing this goal I would be happy to consider it as a solution.

Thanks to anybody with any experience with this! Any help or advice is welcome :)

J0991
  • 977
  • 2
  • 9
  • 16

1 Answers1

0

I think you might be confusing InSpec with kitchen-inspec. The two are related, but independent (well, kitchen-inspec uses InSpec but you know what I mean). The Test Kitchen verifier runs some kind of test code against the test instances (usually VMs), but InSpec itself runs test code against whatever (real) servers you point it at.

coderanger
  • 52,400
  • 4
  • 52
  • 75
  • You are correct I was using the two interchangeably. So outside of kitchen-inspec, is it possible to use chef to run a suite of Inspec tests against a managed node, or does that generally fall outside of the scope of Chef's abilities? If that is the case, what technology stack should I bet looking into? – J0991 Jul 10 '17 at 20:35
  • @J0991 you can use kitchen-inspec and specify the target node's hostname/IP and the port to connect on and it can still do it's InSpec thing. Kitchen doesn't require you to provision a node to run tests, if you don't supply recipes it will skip the `kitchen converge` and move on to `kitchen verify` if you have supplied tests to run and set your verifier block to `name: inspec`. – dragon788 Sep 19 '18 at 17:19