Bootstrapping Chef server fails with "no valid gem 'chef-server-api' (= 11.0.0)"

I would appreciate any suggestions for troubleshooting my failed
Chef server bootstrap process.

I installed chef-solo by running the Omnibus installer script,
then, as described on the Installing Chef Server using Chef Solo
page
, I ran chef-solo with a JSON attributes file referencing
the rubygems-install recipe of the chef-server cookbook. I'm using
version 1.1.1 of that cookbook.

The output from chef-solo includes the following:

Recipe: chef-server::rubygems-install

  • gem_package[chef-server-api] action install
    ================================================================================
    Error executing action install on resource 'gem_package[chef-server-api]'
    ================================================================================

Mixlib::ShellOut::ShellCommandFailed

Expected process to exit with [0], but received '2'
---- Begin output of /opt/chef/embedded/bin/gem install chef-server-api -q --no-rdoc --no-ri -v "11.0.0" ----
STDOUT:
STDERR: ERROR: Could not find a valid gem 'chef-server-api' (= 11.0.0) in any repository
ERROR: Possible alternatives: chef-server-api
---- End output of /opt/chef/embedded/bin/gem install chef-server-api -q --no-rdoc --no-ri -v "11.0.0" ----
Ran /opt/chef/embedded/bin/gem install chef-server-api -q --no-rdoc --no-ri -v "11.0.0" returned 2

Resource Declaration:

In /tmp/chef-solo/cookbooks/chef-server/recipes/rubygems-install.rb

83: gem_package gem do
84: version node['chef_packages']['chef']['version']
85: end
86: end

Compiled Resource:

Declared in /tmp/chef-solo/cookbooks/chef-server/recipes/rubygems-install.rb:83:in `block in from_file'

gem_package("chef-server-api") do
provider Chef::Provider::package::Rubygems
action :install
retries 0
retry_delay 2
package_name "chef-server-api"
version "11.0.0"
cookbook_name :"chef-server"
recipe_name "rubygems-install"
gem_binary "/opt/chef/embedded/bin/gem"
end

I'm running chef-solo 11.0.0:

root@chef:~# chef-solo --version
Chef: 11.0.0
root@chef:~# which chef-solo
/usr/bin/chef-solo
root@chef:~# ll /usr/bin/chef-solo
lrwxrwxrwx 1 root root 23 Feb 4 22:03 /usr/bin/chef-solo -> /opt/chef/bin/chef-solo*

Thanks in advance for any guidance. I'll follow up here with
resolution.

References:

--
Phil Mocek
http://mocek.org/

Hi Phil,

We haven't released to the community site the chef-server cookbook version for chef 11.

You can get it from the GitHub repository. We will release the new version (2.0.0) later today.

Cheers!

--
Joshua Timberman

On Monday, February 4, 2013 at 15:59, Phil Mocek wrote:

I would appreciate any suggestions for troubleshooting my failed
Chef server bootstrap process.

I installed chef-solo by running the Omnibus installer script,
then, as described on the Installing Chef Server using Chef Solo
page
, I ran chef-solo with a JSON attributes file referencing
the rubygems-install recipe of the chef-server cookbook. I'm using
version 1.1.1 of that cookbook.

The output from chef-solo includes the following:

Recipe: chef-server::rubygems-install

  • gem_package[chef-server-api] action install
    ================================================================================
    Error executing action install on resource 'gem_package[chef-server-api]'
    ================================================================================

Mixlib::ShellOut::ShellCommandFailed

Expected process to exit with [0], but received '2'
---- Begin output of /opt/chef/embedded/bin/gem install chef-server-api -q --no-rdoc --no-ri -v "11.0.0" ----
STDOUT:
STDERR: ERROR: Could not find a valid gem 'chef-server-api' (= 11.0.0) in any repository
ERROR: Possible alternatives: chef-server-api
---- End output of /opt/chef/embedded/bin/gem install chef-server-api -q --no-rdoc --no-ri -v "11.0.0" ----
Ran /opt/chef/embedded/bin/gem install chef-server-api -q --no-rdoc --no-ri -v "11.0.0" returned 2

Resource Declaration:

In /tmp/chef-solo/cookbooks/chef-server/recipes/rubygems-install.rb

83: gem_package gem do
84: version node['chef_packages']['chef']['version']
85: end
86: end

Compiled Resource:

Declared in /tmp/chef-solo/cookbooks/chef-server/recipes/rubygems-install.rb:83:in `block in from_file'

gem_package("chef-server-api") do
provider Chef::Provider::package::Rubygems
action :install
retries 0
retry_delay 2
package_name "chef-server-api"
version "11.0.0"
cookbook_name :"chef-server"
recipe_name "rubygems-install"
gem_binary "/opt/chef/embedded/bin/gem"
end

I'm running chef-solo 11.0.0:

root@chef:~# chef-solo --version
Chef: 11.0.0
root@chef:~# which chef-solo
/usr/bin/chef-solo
root@chef:~# ll /usr/bin/chef-solo
lrwxrwxrwx 1 root root 23 Feb 4 22:03 /usr/bin/chef-solo -> /opt/chef/bin/chef-solo*

Thanks in advance for any guidance. I'll follow up here with
resolution.

References:

--
Phil Mocek
http://mocek.org/

On Mon, Feb 04, 2013 at 04:13:37PM -0700, Joshua Timberman wrote:

We haven't released to the community site the chef-server
cookbook version for chef 11.

You can get it from the GitHub repository. We will release the
new version (2.0.0) later today.Â

Thanks for the tip.

Unfortunately, it seems the problem is that
http://s3.amazonaws.com/chef-solo/bootstrap-latest.tar.gz still
contains the obsolete cookbook. I put a copy of chef-server
cookbook 2.0.0 in the location where chef-solo is configured to
expect cookbooks:

root@chef:~# grep ^cookbook /etc/chef/solo.rb
cookbook_path "/tmp/chef-solo/cookbooks"
root@chef:~# grep ^version /tmp/chef-solo/cookbooks/chef-server/metadata.rb
version "1.1.1"
root@chef:~# cd /tmp/chef-solo/cookbooks/
root@chef:/tmp/chef-solo/cookbooks# rm -rf chef-server
root@chef:/tmp/chef-solo/cookbooks# git clone git://github.com/opscode-cookbooks/chef-server.git
Cloning into 'chef-server'...
remote: Counting objects: 460, done.
remote: Compressing objects: 100% (240/240), done.
remote: Total 460 (delta 233), reused 407 (delta 188)
Receiving objects: 100% (460/460), 87.39 KiB, done.
Resolving deltas: 100% (233/233), done.
root@chef:/tmp/chef-solo/cookbooks# cd -
root@chef:~# grep ^version /tmp/chef-solo/cookbooks/chef-server/metadata.rb
version "2.0.0"

I again ran:

chef-solo -c /etc/chef/solo.rb -j /etc/chef/chef.json -r http://s3.amazonaws.com/chef-solo/bootstrap-latest.tar.gz

And I observed the same failure.

Is there a more reliable method of bootstrapping a Chef server?
Alternatively, what would I need to modify in order to install a
version of Chef server that is compatible with the chef-server
cookbook in the bootstrap-latest archive?

Again: I'm following directions on the Opscode wiki. I
don't see any server installation documentation on the docs
site
.

References:

--
Phil Mocek
http://mocek.org/

If you pass the '-r' remote cookbook URL flag to chef-solo it will
download the bootstrap-latest.tar.gz and extract it to the cookbook
path, effectively clobbering your work of deploying a copy of the Git
cookbook; reverting you back to 1.1.1.

This will not work.

You need to use the chef-server v2.0.0 cookbook to deploy erchef11.
The opscode chef-server v2.0.0 cookbook has been very reliable in all
of my testing across all of the platforms we have under management.

Cheers,

AJ

On 5 February 2013 13:10, Phil Mocek phil-lists@mocek.org wrote:

On Mon, Feb 04, 2013 at 04:13:37PM -0700, Joshua Timberman wrote:

We haven't released to the community site the chef-server
cookbook version for chef 11.

You can get it from the GitHub repository. We will release the
new version (2.0.0) later today.

Thanks for the tip.

Unfortunately, it seems the problem is that
http://s3.amazonaws.com/chef-solo/bootstrap-latest.tar.gz still
contains the obsolete cookbook. I put a copy of chef-server
cookbook 2.0.0 in the location where chef-solo is configured to
expect cookbooks:

root@chef:~# grep ^cookbook /etc/chef/solo.rb
cookbook_path "/tmp/chef-solo/cookbooks"
root@chef:~# grep ^version /tmp/chef-solo/cookbooks/chef-server/metadata.rb
version "1.1.1"
root@chef:~# cd /tmp/chef-solo/cookbooks/
root@chef:/tmp/chef-solo/cookbooks# rm -rf chef-server
root@chef:/tmp/chef-solo/cookbooks# git clone git://github.com/opscode-cookbooks/chef-server.git
Cloning into 'chef-server'...
remote: Counting objects: 460, done.
remote: Compressing objects: 100% (240/240), done.
remote: Total 460 (delta 233), reused 407 (delta 188)
Receiving objects: 100% (460/460), 87.39 KiB, done.
Resolving deltas: 100% (233/233), done.
root@chef:/tmp/chef-solo/cookbooks# cd -
root@chef:~# grep ^version /tmp/chef-solo/cookbooks/chef-server/metadata.rb
version "2.0.0"

I again ran:

chef-solo -c /etc/chef/solo.rb -j /etc/chef/chef.json -r http://s3.amazonaws.com/chef-solo/bootstrap-latest.tar.gz

And I observed the same failure.

Is there a more reliable method of bootstrapping a Chef server?
Alternatively, what would I need to modify in order to install a
version of Chef server that is compatible with the chef-server
cookbook in the bootstrap-latest archive?

Again: I'm following directions on the Opscode wiki. I
don't see any server installation documentation on the docs
site
.

References:

--
Phil Mocek
http://mocek.org/

Hi Phil,

On 2/4/13 5:10 PM, "Phil Mocek" phil-lists@mocek.org wrote:

Unfortunately, it seems the problem is that
http://s3.amazonaws.com/chef-solo/bootstrap-latest.tar.gz still
contains the obsolete cookbook. I put a copy of chef-server
cookbook 2.0.0 in the location where chef-solo is configured to
expect cookbooks:

Is there a more reliable method of bootstrapping a Chef server?
Alternatively, what would I need to modify in order to install a
version of Chef server that is compatible with the chef-server
cookbook in the bootstrap-latest archive?

I'm sorry I wasn't clearer earlier, I was using a mobile device to reply.
It was perhaps too terse.

You actually just need to retrieve the correct package for your platform:

From the "Chef Server" tab.

Then, install the package on the system, and when it's done, run:

sudo chef-server-ctl reconfigure

You can optionally run this to perform all the tests in the "pedant" test
suite.

sudo chef-server-ctl test

Again: I'm following [directions on the Opscode wiki][1]. I
don't see any server installation documentation on the [docs
site][2].

Yeah, the installation pages in the wiki aren't yet updated for Chef 11.
I'm sorry it isn't obvious how to go about installing Chef 11 server.
We're working on getting that updated.

Cheers,
Joshua

with chef-client, we can install on a unix platform by running this:
curl -L https://www.opscode.com/chef/install.sh | bash

is there an analogue for chef-server?

On Mon, Feb 4, 2013 at 10:33 PM, Joshua Timberman joshua@opscode.comwrote:

Hi Phil,

On 2/4/13 5:10 PM, "Phil Mocek" phil-lists@mocek.org wrote:

Unfortunately, it seems the problem is that
http://s3.amazonaws.com/chef-solo/bootstrap-latest.tar.gz still
contains the obsolete cookbook. I put a copy of chef-server
cookbook 2.0.0 in the location where chef-solo is configured to
expect cookbooks:

Is there a more reliable method of bootstrapping a Chef server?
Alternatively, what would I need to modify in order to install a
version of Chef server that is compatible with the chef-server
cookbook in the bootstrap-latest archive?

I'm sorry I wasn't clearer earlier, I was using a mobile device to reply.
It was perhaps too terse.

You actually just need to retrieve the correct package for your platform:

http://www.opscode.com/chef/install/

From the "Chef Server" tab.

Then, install the package on the system, and when it's done, run:

sudo chef-server-ctl reconfigure

You can optionally run this to perform all the tests in the "pedant" test
suite.

sudo chef-server-ctl test

Again: I'm following [directions on the Opscode wiki][1]. I
don't see any server installation documentation on the [docs
site][2].

Yeah, the installation pages in the wiki aren't yet updated for Chef 11.
I'm sorry it isn't obvious how to go about installing Chef 11 server.
We're working on getting that updated.

Cheers,
Joshua

On Wednesday, February 6, 2013 at 10:16 AM, Jesse Campbell wrote:

with chef-client, we can install on a unix platform by running this:
curl -L https://www.opscode.com/chef/install.sh | bash

is there an analogue for chef-server?
No. Since the server install is usually less frequent, we chose not to have an installer script to maintain. Also, we wanted to funnel new users through the https://www.opscode.com/chef/install page so we can link to docs, troubleshooting tips, etc. If you're standing up a lot of Chef servers, you can either use the Omnitruck GET API or distribute the server package via scp/repo/etc.

--
Daniel DeLeo

On Tue, Feb 05, 2013 at 03:33:36AM +0000, Joshua Timberman wrote:

the installation pages in the wiki aren't yet updated for Chef 11.

I updated the Bootstrap Chef Server section of the
"Installing Chef Server using Chef Solo" page with a warning that
it may be obsolete and a reference to this discussion.

References:

--
Phil Mocek
http://mocek.org/