Chef-zero with vagrant and 127.0.0.1:8889/clients

I am working with chef-zero and all is well when I run the playground commands from GitHub - chef/chef-zero: Simple, easy-run, fast-start in-memory Chef server for testing and solo purposes

However when I try a simple vagrant run, vagrant throws

[2013-09-04T16:14:46+00:00] ERROR: Connection refused connecting to 127.0.0.1:8889 for /clients, retry 1/5
[2013-09-04T16:14:51+00:00] ERROR: Connection refused connecting to 127.0.0.1:8889 for /clients, retry 2/5
[2013-09-04T16:14:56+00:00] ERROR: Connection refused connecting to 127.0.0.1:8889 for /clients, retry 3/5
[2013-09-04T16:15:01+00:00] ERROR: Connection refused connecting to 127.0.0.1:8889 for /clients, retry 4/5
[2013-09-04T16:15:06+00:00] ERROR: Connection refused connecting to 127.0.0.1:8889 for /clients, retry 5/5

I have fiddled to the best of skills with the vagrant chef options from Chef Client - Provisioning | Vagrant | HashiCorp Developer

Here is the snipped from my Vagrant file:

If you have your own Chef Server, use the appropriate URL, which may be

HTTP instead of HTTPS depending on your configuration. Also change the

validation key to validation.pem.

config.vm.provision :chef_client do |chef|
chef.chef_server_url = "http://127.0.0.1:8889"
chef.validation_key_path = "path_to_any_pem_file.pem"

 # these are "other configuration options" http://docs.vagrantup.com/v2/provisioning/chef_client.html
 # none of them seem to really do anything?
 chef.client_key_path = "mahpath"
 chef.node_name = "plswork"
 chef.validation_client_name = "whyunowork"

end

How do I get the vagrant/chef-client to stop trying to use /clients ?

vagrant --version
Vagrant version 1.2.7

chef-client --version
Chef: 11.4.0

chef-zero

Starting Chef Zero (v1.5.5)...

Are you running chef-zero from your workstation or from the vm? The problem is it can't access chef-zero (the /clients endpoint is perfectly valid). I suspect you either need to run chef-zero from within the VM, or that you need to point the vm's chef_server_url at the IP of your workstation.

--John


From: Kyle Sloan ksloan@2dialog.com
Sent: Wednesday, September 04, 2013 9:25 AM
To: chef@lists.opscode.com
Subject: [chef] chef-zero with vagrant and 127.0.0.1:8889/clients

I am working with chef-zero and all is well when I run the playground commands from GitHub - chef/chef-zero: Simple, easy-run, fast-start in-memory Chef server for testing and solo purposes

However when I try a simple vagrant run, vagrant throws

[2013-09-04T16:14:46+00:00] ERROR: Connection refused connecting to 127.0.0.1:8889 for /clients, retry 1/5
[2013-09-04T16:14:51+00:00] ERROR: Connection refused connecting to 127.0.0.1:8889 for /clients, retry 2/5
[2013-09-04T16:14:56+00:00] ERROR: Connection refused connecting to 127.0.0.1:8889 for /clients, retry 3/5
[2013-09-04T16:15:01+00:00] ERROR: Connection refused connecting to 127.0.0.1:8889 for /clients, retry 4/5
[2013-09-04T16:15:06+00:00] ERROR: Connection refused connecting to 127.0.0.1:8889 for /clients, retry 5/5

I have fiddled to the best of skills with the vagrant chef options from Chef Client - Provisioning | Vagrant | HashiCorp Developer

Here is the snipped from my Vagrant file:

If you have your own Chef Server, use the appropriate URL, which may be

HTTP instead of HTTPS depending on your configuration. Also change the

validation key to validation.pem.

config.vm.provision :chef_client do |chef|
chef.chef_server_url = "http://127.0.0.1:8889"
chef.validation_key_path = "path_to_any_pem_file.pem"

 # these are "other configuration options" http://docs.vagrantup.com/v2/provisioning/chef_client.html
 # none of them seem to really do anything?
 chef.client_key_path = "mahpath"
 chef.node_name = "plswork"
 chef.validation_client_name = "whyunowork"

end

How do I get the vagrant/chef-client to stop trying to use /clients ?

vagrant --version
Vagrant version 1.2.7

chef-client --version
Chef: 11.4.0

chef-zero

Starting Chef Zero (v1.5.5)...

Thanks… that makes perfect sense and I feel really dumb now heh.

On Sep 4, 2013, at 11:30 AM, John Keiser jkeiser@opscode.com wrote:

Are you running chef-zero from your workstation or from the vm? The problem is it can't access chef-zero (the /clients endpoint is perfectly valid). I suspect you either need to run chef-zero from within the VM, or that you need to point the vm's chef_server_url at the IP of your workstation.

--John


From: Kyle Sloan ksloan@2dialog.com
Sent: Wednesday, September 04, 2013 9:25 AM
To: chef@lists.opscode.com
Subject: [chef] chef-zero with vagrant and 127.0.0.1:8889/clients

I am working with chef-zero and all is well when I run the playground commands from GitHub - chef/chef-zero: Simple, easy-run, fast-start in-memory Chef server for testing and solo purposes

However when I try a simple vagrant run, vagrant throws

[2013-09-04T16:14:46+00:00] ERROR: Connection refused connecting to 127.0.0.1:8889 for /clients, retry 1/5
[2013-09-04T16:14:51+00:00] ERROR: Connection refused connecting to 127.0.0.1:8889 for /clients, retry 2/5
[2013-09-04T16:14:56+00:00] ERROR: Connection refused connecting to 127.0.0.1:8889 for /clients, retry 3/5
[2013-09-04T16:15:01+00:00] ERROR: Connection refused connecting to 127.0.0.1:8889 for /clients, retry 4/5
[2013-09-04T16:15:06+00:00] ERROR: Connection refused connecting to 127.0.0.1:8889 for /clients, retry 5/5

I have fiddled to the best of skills with the vagrant chef options from Chef Client - Provisioning | Vagrant | HashiCorp Developer

Here is the snipped from my Vagrant file:

If you have your own Chef Server, use the appropriate URL, which may be

HTTP instead of HTTPS depending on your configuration. Also change the

validation key to validation.pem.

config.vm.provision :chef_client do |chef|
chef.chef_server_url = "http://127.0.0.1:8889"
chef.validation_key_path = "path_to_any_pem_file.pem"

# these are "other configuration options" http://docs.vagrantup.com/v2/provisioning/chef_client.html
# none of them seem to really do anything?
chef.client_key_path = "mahpath"
chef.node_name = "plswork"
chef.validation_client_name = "whyunowork"

end

How do I get the vagrant/chef-client to stop trying to use /clients ?

vagrant --version
Vagrant version 1.2.7

chef-client --version
Chef: 11.4.0

chef-zero

Starting Chef Zero (v1.5.5)...

If you use the vagrant-chef-zero plugin for vagrant and do not start up
chef-zero separately, it all seems to work -- "vagrant up" starts chef
zero, berkshelf can upload cookbooks to it, the plugin will upload all JSON
roles/environments/databags in the path, et cetera.

Can do something like this in Vagrantfile:

case provisioner
when 'chef', 'chef_zero'
  config.vm.provision :chef_client do |chef|
    if provisioner == 'chef'
      chef.chef_server_url = "https://#{chef_server}/organizations/#{org}"
      chef.validation_key_path =
        "#{chef_dir}/validation/#{org}-validator.pem"
      chef.validation_client_name = "#{org}-validator"
      chef.client_key_path = "/etc/chef/client.pem"
    else
      config.chef_zero.enabled = true
      config.chef_zero.chef_repo_path = dataroot
    end
    chef.provisioning_path = "/etc/chef"
    chef.log_level = :debug
    chef.run_list = run_list
  end

Regards,
Carlton

On Wed, Sep 4, 2013 at 1:59 PM, Kyle Sloan ksloan@2dialog.com wrote:

Thanks… that makes perfect sense and I feel really dumb now heh.

On Sep 4, 2013, at 11:30 AM, John Keiser jkeiser@opscode.com wrote:

Are you running chef-zero from your workstation or from the vm? The
problem is it can't access chef-zero (the /clients endpoint is perfectly
valid). I suspect you either need to run chef-zero from within the VM, or
that you need to point the vm's chef_server_url at the IP of your
workstation.

--John


From: Kyle Sloan ksloan@2dialog.com
Sent: Wednesday, September 04, 2013 9:25 AM
To: chef@lists.opscode.com
Subject: [chef] chef-zero with vagrant and 127.0.0.1:8889/clients

I am working with chef-zero and all is well when I run the playground
commands from GitHub - chef/chef-zero: Simple, easy-run, fast-start in-memory Chef server for testing and solo purposes

However when I try a simple vagrant run, vagrant throws

[2013-09-04T16:14:46+00:00] ERROR: Connection refused connecting to
127.0.0.1:8889 for /clients, retry 1/5
[2013-09-04T16:14:51+00:00] ERROR: Connection refused connecting to
127.0.0.1:8889 for /clients, retry 2/5
[2013-09-04T16:14:56+00:00] ERROR: Connection refused connecting to
127.0.0.1:8889 for /clients, retry 3/5
[2013-09-04T16:15:01+00:00] ERROR: Connection refused connecting to
127.0.0.1:8889 for /clients, retry 4/5
[2013-09-04T16:15:06+00:00] ERROR: Connection refused connecting to
127.0.0.1:8889 for /clients, retry 5/5

I have fiddled to the best of skills with the vagrant chef options from
Chef Client - Provisioning | Vagrant | HashiCorp Developer

Here is the snipped from my Vagrant file:

If you have your own Chef Server, use the appropriate URL, which may

be

HTTP instead of HTTPS depending on your configuration. Also change the

validation key to validation.pem.

config.vm.provision :chef_client do |chef|
chef.chef_server_url = "http://127.0.0.1:8889"
chef.validation_key_path = "path_to_any_pem_file.pem"

# these are "other configuration options"

Chef Client - Provisioning | Vagrant | HashiCorp Developer

# none of them seem to really do anything?
chef.client_key_path = "mahpath"
chef.node_name = "plswork"
chef.validation_client_name = "whyunowork"

end

How do I get the vagrant/chef-client to stop trying to use /clients ?

vagrant --version
Vagrant version 1.2.7

chef-client --version
Chef: 11.4.0

chef-zero

Starting Chef Zero (v1.5.5)...