I have a self-hosted Chef server. I can knife upload
to that server, and otherwise interact with it. Therefore, my knife.rb
works fine. I have recently parameterized a cookbook in order to make it the basis for a family of related cookbooks.
The problem is that I want this cookbook to be private, so it only exists on my private Chef server. Unfortunately, I can't then do berks install
on my other cookbooks. I've pointed my Berksfile
at my Chef server:
source https://chef.myhost.com
This does not work. I think this is because that URL is for Chef Manage, not Chef Server API. However, I am at a loss for how to get Berkshelf to recognize my Chef Server and use its API.
The full error:
> berks install
Resolving cookbook dependencies...
Fetching 'blog_role' from source at .
Fetching cookbook index from chef.myhost.com...
Error retrieving universe from source: chef.myhost.com * [Berkshelf::APIClient::BadResponse] bad response #<Faraday::Response:0x36ae618 @on_complete_callbacks=[], @env=#<Faraday::Env @method=:get @body="<html><body>You are being <a href=\"chef.myhost.com:443/signup\">redirected</a>.</body></html>" @url=#<URI::HTTPS:0x36891f0 URL:chef.myhost.com/universe> @request=#<Faraday::RequestOptions timeout=30, open_timeout=30> @request_headers={"User-Agent"=>"Faraday v0.9.1"} @ssl=#<Faraday::SSLOptions (empty)> @response_headers={"server"=>"ngx_openresty/1.4.3.6", "date"=>"Sun, 08 Feb 2015 19:49:10 GMT", "content-type"=>"text/html; charset=utf-8", "transfer-encoding"=>"chunked", "connection"=>"close", "status"=>"302 Found", "strict-transport-security"=>"max-age=631138519", "x-frame-options"=>"DENY", "x-webkit-csp"=>"default-src 'self' chrome-extension:; connect-src 'self' chrome-extension:; font-src 'self' themes.googleusercontent.com chrome-extension:; frame-src 'none' chrome-extension:; img-src 'self' ssl.google-analytics.com chrome-extension: data:; media-src 'none' chrome-extension:; object-src 'none' chrome-extension:; script-src 'self' ssl.google-analytics.com 'unsafe-inline' chrome-extension:; style-src 'self' 'unsafe-inline' fonts.googleapis.com chrome-extension:; script-nonce REDACTED;", "x-xss-protection"=>"1", "location"=>"chef.myhost.com:443/signup", "x-ua-compatible"=>"IE=Edge,chrome=1", "cache-control"=>"no-cache", "set-cookie"=>"chef-manage=REDACTED; path=/; secure; HttpOnly", "x-request-id"=>"REDACTED", "x-runtime"=>"0.034395"} @status=302>>
Unable to satisfy constraints on package source_deploy, which does not exist, due to solution constraint (app_role = 0.9.1). Solution constraints that may result in a constraint on source_deploy: [(app_role = 0.9.1) -> (source_deploy >= 0.0.0)]
Missing artifacts: source_deploy
Demand that cannot be met: (app_role = 0.9.1)
Unable to find a solution for demands: app_role (0.9.1)
So, it tries to access https://chef.myhost.com/universe, but it is bounced to the /signup page, because this is Chef Manage, not Chef Server API... But I have no idea where the API is accessible from by default, if at all. I've read for the past hour various docs, and turned up nothing...