0

I have a Vagrant (1.7.2) set up with 2 vms. I want to use chef (latest version now 12?) to provision them. I am trying to get one to be a nagios server and the other to be a machine monitored with nagios.

When using the built in chef-zero vagrant provisioner, each node can be configured fine. But the community nagios cookbook searches for nodes to monitor. Since each vagrant vm gets a fresh, local chef-zero, it doesn't know about the other hosts and so it isn't a real test of "chef-powered nagios".

This blog post (Multi-node topologies using Vagrant and chef-zero) seems to cover what I want to do, and advises that I run a chef-zero server on my local machine, and set that as the chef_server_url in teh Vagrantfile.

However when I do that, I get an error from the chef_client provisioner:

==> nagiosserver: [2015-01-23T15:59:09+00:00] INFO: *** Chef 12.0.3 ***
==> nagiosserver: [2015-01-23T15:59:09+00:00] INFO: Chef-client pid: 6916
==> nagiosserver: [2015-01-23T15:59:12+00:00] INFO: Setting the run_list to ["role[rorytestvm1]"] from CLI options
==> nagiosserver: [2015-01-23T15:59:12+00:00] INFO: HTTP Request Returned 404 Not Found : Object not found: http://192.168.33.1:8889/roles/rorytestvm1

What's the solution?

(There is a vagrant chef-zero plugin, but it hasn't been updated in ~8 months and I, like others, experience bugs)

1
  • Removed the devops tag. It's essentially a meta tag, and given the way the community feels about devops, it probably isn't a good idea anyway. Jan 24, 2015 at 23:52

1 Answer 1

0

I have solved this. The problem was that I was starting chef-zero and leaving it there. I wasn't uploading any cookbooks/nodes/etc to it with knife. It was an empty server. I thought that chef-zero would use the nodes/cookbooks/etc in the current directory, but that is not the case.

I made a new knife.rb file, which had localhost as the server URL and did a knife upload . -c /path/to/new/knife.rb and it worked fine.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .