I wish to create a developer environment of a web based application which will have an application server and database server installed on a VM using vagrant. I am using open source chef server and vagrant with chef_client provisioner. However each time a developer node is provisioned, chef_client provisioner creates a client node on chef server. This is not desirable because this setup will be used by a lot of developers. Such nodes might get created and destroyed several times. So maintaining the list of such nodes on chef server is not required.
chef_solo is another option but it requires the cookbook to be present in the system. We are using chef server as a repository for cookbooks as well. So a developer need not have the specific cookbook in his/her system. I have looked at berkshelf as well where I can configure chef_api path to the chef server. But that too requires a node. Following is my vagrant file:
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "precise64-chef"
config.vm.network :private_network, ip: "33.33.33.10"
config.omnibus.chef_version = '11.8.2'
config.vm.provision "chef_client" do |chef|
chef.log_level = :debug
chef.environment = "development"
chef.delete_node = true
chef.delete_client = true
chef.node_name = "sample_app"
chef.chef_server_url = "https://chef-server-url"
chef.validation_key_path = "chef-validator.pem"
chef.add_role "base"
chef.add_role "pg_client"
chef.add_role "application_server"
chef.add_role "db_server"
chef.add_recipe "deploy_application"
end
end
I wish to not create sample_app node on chef server. Otherwise this serves my purpose. Any other strategies to provision developer environment using chef server are welcome.