O
O
OnYourLips2015-05-27 14:22:02
linux
OnYourLips, 2015-05-27 14:22:02

What is the correct way to use Chef solo + vagrant?

I would like to look at an example of deploying a normal nginx environment + language (preferably PHP) + subd using chef solo as an example.
I'm confused by a couple of points that I looked at in the instructions:
1. The system repositories are not used. At the same time, the ansible analog has a native apt module.
2. Too many dependencies on the host OS instead of the usual vagrant up.
Using the example leopard.in.ua/2013/01/04/chef-solo-getting-started... on a windows host knife solo init ., errors already appear on the line.
Given that half of the developers cannot use Linux (managers, analysts, designers), Windows support as a host OS is mandatory. And you need to deploy the project with one command: vagrant up.
So far, I'm using vagrant with shell scripts and everything works great. But it has already become necessary to deploy about 5 roles, and I want to choose a more professional tool.
The choice of chef is due to the presence of projects in ruby ​​and php. I don't like the idea of ​​using ansible for ruby ​​projects.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
kevit, 2015-06-04
@kevit

Do you mean the host OS that vagrant is running on?
Here is a simple example of part of the Vagrant config

config.vm.define :server do |server|
server.vm.host_name = "server"
config.omnibus.chef_version = 'latest'
# config.berkshelf.enabled = true
server.vm.box = 'opscode_ubuntu-14.04_provisionerless'
server.vm.network :private_network, ip: "192.168 .33.10"
server.vm.provision :chef_solo do |chef|
chef.cookbooks_path = ["..","berks-cookbooks"]
chef.json = {
}
chef.run_list = [
'recipe[cookbook::run]'
]
end

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question