0

I have a situation where I want to test AWS EC2 sever using the Kitchen test framework. We are using cloudformation for our infrastructure creation and not the Chef. I want to use Kitchen Verify functionality by writing the test cases, but can't use Chef recipes for infrastructure creation.

Is there any way, I can just use Kitchen Verify command against existing EC2 infrastructure created by CloudFormation? How do I specify address on existing server which is not created using Kitchen Converge command.

Appreciate your help!

Atul
  • 125
  • 1
  • 2
  • 6

2 Answers2

1

KitchenCI is only a tool (a powerful one, no doubt! :-)) which connect other tools/drivers (provisioners, verifiers, etc).

Since you do not use it for provisioning your test infrastructure it makes a little to no sense to use it for verification. Instead, I would suggest a research if your preferred verifier (you didn't mention which one you are using) can be used standalone. For example, you can run inspec without Kitchen (look for backend/host flags).

Szymon
  • 1,525
  • 1
  • 11
  • 12
  • I was planning to use ServerSpec; but wanted to keep it flexible the way Kitchen offers it. Being new to the infra testing, I wasn't sure of best utilising the Kitchen harness. I guess for now I will go with using it standalone. Thanks! – Atul Jul 03 '18 at 04:27
  • 1
    InSpec is a lot easier to use standalone than Serverspec. – coderanger Jul 03 '18 at 06:42
0

There is a drive plugin for Cloudformation, which includes its own pass through provisioner. But I’ve never used it and using standalone InSpec or Serverspec is probably easier :)

coderanger
  • 52,400
  • 4
  • 52
  • 75
  • I will check this plugin which you mentioned here. For now I guess standalone ServerSpec is the option. Thanks for your input! – Atul Jul 03 '18 at 04:29