nginx - berks-api will not run on ubuntu in azure - get Permission denied @ rb_sysopen - /etc/chef/client.pem -
as part of our chef infrastructure i'm trying set , configure berks-api server. have created ubuntu server in azure , have bootstrapped , appears node in chef-server.
i have followed instructions @ github - bekshelf-api installation install berks-api via cookbook. have run
sudo chef-client
on node , cookbook appears have been run successfully.
the problem berks-api doesn't appear run. linux terminology isn't great sorry if i'm making mistakes in appears if berks-api service isn't able run. if navigate /etc/service/berks-api , run command
sudo berks-api
i error
i, [2015-07-23t11:56:37.490075 #16643] info -- : cache manager starting... i, [2015-07-23t11:56:37.491006 #16643] info -- : cache builder starting... e, [2015-07-23t11:56:37.493137 #16643] error -- : actor crashed! errno::eacces: permission denied @ rb_sysopen - /etc/chef/client.pem /opt/berkshelf-api/v2.1.1/vendor/bundle/ruby/2.1.0/gems/ridley-4.1.2/lib/ridley/client.rb:144:in `read' /opt/berkshelf-api/v2.1.1/vendor/bundle/ruby/2.1.0/gems/ridley-4.1.2/lib/ridley/client.rb:144:in `initialize'
if me figure out going on, i'd appreciate it. if need explain setup more let me know.
it turns out misunderstood configuration of berks-api. needed new private key client (berkshelf) manage.chef.io our organization. needed upload new key (berkshelf.pem) /etc/berkshelf/api-server , reconfigure berks-api use new key. config berks-api looks below:
{ "home_path":"/etc/berkshelf/api-server", "endpoints":[ { "type":"chef_server", "options": { "url":"https://api.opscode.com/organizations/my-organization", "client_key":"/etc/berkshelf/api-server/berkshelf.pem", "client_name":"berkshelf" } } ], "build_interval":5.0 }
i couldn't upload berkshelf.pem directly target location, had upload home location, copy within linux.
having done this, service starts , works perfectly.
Comments
Post a Comment