[chef] Re: Re: Re: oc-id on chef server 11.1.x? for private Supermarket


Chronological Thread 
  • From: Lamont Granquist < >
  • To:
  • Subject: [chef] Re: Re: Re: oc-id on chef server 11.1.x? for private Supermarket
  • Date: Mon, 05 Oct 2015 16:40:29 -0700


Initially Chef was available as the "Hosted" product and the an "Open Source" variant that was difficult to install and wasn't omnibus-ized and installed from O/S packages. The "Open Source" variant has always been the one that did not have any multi-org support, while Hosted always had multi-org support (obviously).

Private Chef was the first branding of shipping "Hosted Chef" with multi-org support to paying customers. It also led to omnibus-izing everything. That server installed to /opt/opscode and /var/opscode and used private-chef-ctl

With 11.x came the rebranding where "Private Chef" became "Enterprise Chef". In 11.x we also omnibus-ized the open source server. The Open Source variant (without auth) installed to /opt/chef-server and used chef-server-ctl. I believe that the paid "Enterprise Chef 11.x/EC11" still installed to /opt/opscode, i'm not certain when the ctl command for Private/Enterprise Chef changed to chef-server-ctl.

With 12.x it got a lot simpler. Now there's just the Chef Server and there's no distinction between Open Source and Private/Enterprise, there's just additional features (webui, analytics, etc) that require licensing, but the basic server is free (with auth and organizations). It looks like it still installs to "/opt/opscode".

So, I think the TL;DR is that if you've got /opt/opscode that you've got multi-org with auth. If you've got /opt/chef-server you've got Open Source 11.x. If you are just running out of the system directories then you have very old open source 10.x server.

Sorta like:

Open Source 10 Server (Packages) -> Open Source 11 Server (Omnibus) -> [ Abandoned ]

Hosted Chef -> Private Chef 1.x/10.x -> Enterprise Chef 11.x -> Chef Server 12.x

On 10/05/2015 03:54 PM, 

 wrote:
Forgive my ignorance, but, is "Enterprise" chef "hosted" chef? We run our own
chef servers. So I don't know if that means we run the "open source" version 
of
chef server.

If I upgrade our own chef servers from 11 to 12, will oc-id be supported?

On Mon, 05 Oct 2015, Nathan L Smith wrote:

I believe we started shipping oc-id with Enterprise Chef server 11.2. 11.1
probably won't work. Open Source Chef Server 11 definitely will not work,
since the authentication API is different.

You can run oc-id as a standalone Rails app with it's own Postgres
database, but that is strongly discouraged.

Hope that helps.


On Mon, Oct 5, 2015 at 5:37 PM, 
< >
 wrote:

Hi. I'm exploring running a private Supermarket. tl;dr -- can I run oc-id
on our
chef 11.1.x server and point Supermarket at it? Or do I need to spend my
time
upgrading to chef server 12?

Thanks!
kallen

This doc suggests chef server 12 for oc-id, but doesn't say 11.x is out of
the
question:
https://www.chef.io/blog/2015/04/21/setting-up-your-private-supermarket-server/

This deprecated repo mentions chef server >= chef server 11.2:
https://github.com/chef/oc-id

I tried following the instructions in the doc, and added the config bit to
chef-server.rb:

chef-server]# tail -5 chef-server.rb
oc_id['applications'] = {
   'supermarket' => {
     'redirect_uri' => '
https://supermarket.redacted.internal/auth/chef_oauth2/callback'
   }
}

But, fail:

chef-server]# /opt/chef-server/bin/chef-server-ctl reconfigure


================================================================================
Recipe Compile Error in
/opt/chef-server/embedded/cookbooks/chef-server/recipes/default.rb

================================================================================


NoMethodError
-------------
undefined method `[]=' for nil:NilClass


Cookbook Trace:
---------------
   /opt/chef-server/embedded/cookbooks/chef-server/recipes/default.rb:34:in
`from_file'


Relevant File Content:
----------------------
/opt/chef-server/embedded/cookbooks/chef-server/recipes/default.rb:

  27:  end.run_action(:create)
  28:
  29:  if File.exists?("/etc/chef-server/chef-server.json")
  30:    Chef::Log.warn("Please move to /etc/chef-server/chef-server.rb for
configuration - /etc/chef-server/chef-server.json is deprecated.")
  31:  else
  32:    ChefServer[:node] = node
  33:    if File.exists?("/etc/chef-server/chef-server.rb")
  34>>     ChefServer.from_file("/etc/chef-server/chef-server.rb")
  35:    end
  36:    node.consume_attributes(ChefServer.generate_config(node['fqdn']))
  37:  end
  38:
  39:  if File.exists?("/var/opt/chef-server/bootstrapped")
  40:    node.set['chef_server']['bootstrap']['enable'] = false
  41:  end
  42:
  43:  # Create the Chef User



chef-server]# cat
/opt/chef-server/embedded/cookbooks/cache/chef-stacktrace.out
Generated at 2015-10-05 22:35:04 +0000
NoMethodError: undefined method `[]=' for nil:NilClass
/etc/chef-server/chef-server.rb:10:in `from_file'
/opt/chef-server/embedded/lib/ruby/gems/1.9.1/gems/mixlib-config-2.1.0/lib/mixlib/config.rb:47:in
`instance_eval'
/opt/chef-server/embedded/lib/ruby/gems/1.9.1/gems/mixlib-config-2.1.0/lib/mixlib/config.rb:47:in
`from_file'
/opt/chef-server/embedded/cookbooks/chef-server/recipes/default.rb:34:in
`from_file'
/opt/chef-server/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.2/lib/chef/mixin/from_file.rb:30:in
`instance_eval'
/opt/chef-server/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.2/lib/chef/mixin/from_file.rb:30:in
`from_file'
/opt/chef-server/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.2/lib/chef/cookbook_version.rb:237:in
`load_recipe'
/opt/chef-server/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.2/lib/chef/run_context.rb:165:in
`load_recipe'
/opt/chef-server/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.2/lib/chef/run_context/cookbook_compiler.rb:140:in
`block in compile_recipes'
/opt/chef-server/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.2/lib/chef/run_context/cookbook_compiler.rb:138:in
`each'
/opt/chef-server/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.2/lib/chef/run_context/cookbook_compiler.rb:138:in
`compile_recipes'
/opt/chef-server/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.2/lib/chef/run_context/cookbook_compiler.rb:75:in
`compile'
/opt/chef-server/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.2/lib/chef/run_context.rb:88:in
`load'
/opt/chef-server/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.2/lib/chef/policy_builder/expand_node_object.rb:73:in
`setup_run_context'
/opt/chef-server/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.2/lib/chef/client.rb:265:in
`setup_run_context'
/opt/chef-server/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.2/lib/chef/client.rb:429:in
`do_run'
/opt/chef-server/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.2/lib/chef/client.rb:213:in
`block in run'
/opt/chef-server/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.2/lib/chef/client.rb:207:in
`fork'
/opt/chef-server/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.2/lib/chef/client.rb:207:in
`run'
/opt/chef-server/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.2/lib/chef/application.rb:217:in
`run_chef_client'
/opt/chef-server/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.2/lib/chef/application/solo.rb:221:in
`block in run_application'
/opt/chef-server/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.2/lib/chef/application/solo.rb:213:in
`loop'
/opt/chef-server/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.2/lib/chef/application/solo.rb:213:in
`run_application'
/opt/chef-server/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.2/lib/chef/application.rb:67:in
`run'
/opt/chef-server/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.2/bin/chef-solo:25:in
`<top (required)>'
/opt/chef-server/embedded/bin/chef-solo:23:in `load'
/opt/chef-server/embedded/bin/chef-solo:23:in `<main>'



--
Nathan L Smith





Archive powered by MHonArc 2.6.16.

§