- From:
- To: chef <
>
- Subject: [chef] oc-id on chef server 11.1.x? for private Supermarket
- Date: Mon, 5 Oct 2015 22:37:28 +0000
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>'
- [chef] oc-id on chef server 11.1.x? for private Supermarket, kallen, 10/05/2015
Archive powered by MHonArc 2.6.16.