I am using hosted Chef for quite some time. Wanted to explore the opensource chef server. hence I am trying to setup my Chef-Server 11 on EC2 instance.
I have Chef-server running and I can access the web GUI for the same. I have the chef-workstation configured on another ec2 instance that is also working fine.
Problem: I am not able to upload any cookbook. I get below error when I try uploading the cookbook:
# knife cookbook upload getting-started
Uploading getting-started [0.4.0]
/opt/chef/embedded/lib/ruby/1.9.1/net/http.rb:763:in `initialize': Connection refused - connect(2) (Errno::ECONNREFUSED)
However, other list
commands of knife
are working fine.
I did my home work and bumped on below links:
http://www.opscode.com/blog/2013/03/11/chef-11-server-up-and-running/
So,
It is mentioned that the chef-server
needs a working FQDN to work. I set the my public ec2 host name as the hostname of the server as well as set it up in /etc/hosts
. Rebooted the instance. Ran chef-server-ctl reconfigure
again. And still facing the same error.
QUESTION: How to figure out the FQDN part of the EC2 instance for chef-server to work? if anyone has set up chef-server successfully on EC2 and was able to upload the cookbooks, then please share your steps for FQDN workout.
This is how i got it working. updated the public DNS name of my ec2 instance (chef-server) in /etc/sysconfig/network
and service network restart
. Now I am able to upload the cookbooks fine.
Need to think about elastic IP as potential option for my chef-server.