1

Currrently, we are setting up development environment using Vagrant. All software (php, mysql, apache, memcached..) are installed using Vagrant Chef solo provisioner.

Now we want to create a test environment using a physical machine (it has same OS to the Vagrant virtual machine).

I don't want to install all required softwares on the test server manually, instead of that I want to setup test server automatically using same Vagrant provisioner. Is it posible and how can I do that?

truongnguyen1912
  • 1,195
  • 8
  • 7

1 Answers1

1
  1. You can use/run chef-client in local mode on that server see https://docs.chef.io/ctl_chef_client.html#run-in-local-mode
  2. Chef solo https://docs.chef.io/chef_solo.html is also an option but I think chef-client local mode is preferred now.
  3. Another option is to create a free hosted Chef account, upload your cookbooks to hosted Chef, bootstrap your server and run the chef-client.

The best approach I think is to use an actual Chef server. Use hosted Chef or setup your own Chef server. Assuming you will want to also easily update the configuration of the test server as you make changes to your recipes, using an actual Chef server is the best approach.

onknows
  • 6,151
  • 12
  • 65
  • 109