Tharmini
Tharmini

Reputation: 103

how to test a recipe from virtualbox in chef?

I created a chef server and upload a cookbook into the server.i already testing the recipe in my work station.it is working.How do i test my recipe through virtualbox((bootstrap by external node)?can anyone tell me the steps to testing the recipe from server through virtual box?

Upvotes: 1

Views: 302

Answers (2)

slashpai
slashpai

Reputation: 1169

If you are trying out chef for first time to get a feel of it, you can use hosted chef server instead of creating a chef server of your own. You can also create a vagrant or a virtualbox machine and bootstrap to this hosted chef server. If you like rhel look at the tutorial here to see how to manage a node.

If you are a regular developer it is not a productive way to upload your cookbook to your chef server, set the runlist on a node bootstrapped or create a new node to test your recipe and run chef-client on it. That is where kitchen test comes to help.

With Test Kitchen, you continue to write your Chef code from your workstation, but instead of uploading your code to the Chef server and applying it to a node, Test Kitchen applies your code to a temporary environment, such as a virtual machine on your workstation or a cloud or container instance. Check this tutorial on how to do kitchen tests in virtual machine from your workstation.

Hope this helps

Upvotes: 0

ywainberg
ywainberg

Reputation: 15

Check out test kitchen

for step by step instruction you should follow this links: kitchen with ubunto,kitchen with centos

Upvotes: 1

Related Questions