Oc-id on chef server 11.1.x? for private Supermarket


#1

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:

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:infrom_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:infrom_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:ininstance_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:inload_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:inblock 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:incompile_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:inload’
/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:insetup_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:inblock 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:inrun’
/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:inblock 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:inrun_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


#2

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, kallen@groknaut.net 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:infrom_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:infrom_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:ininstance_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:inload_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:inblock 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:incompile_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:inload’
/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:insetup_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:inblock 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:inrun’
/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:inblock 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:inrun_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


Nathan L Smith
smith@chef.io


#3

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, kallen@groknaut.net 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:infrom_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:infrom_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:ininstance_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:inload_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:inblock 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:incompile_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:inload’
/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:insetup_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:inblock 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:inrun’
/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:inblock 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:inrun_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


Nathan L Smith
smith@chef.io


#4

Before Chef server 12, there was an open source Chef server (Open Source
Chef Server 11) and Enterprise Chef server (which included ACLs, multiple
organizations, LDAP support, and other “enterprise” features.) With Chef
server 12 there is only one Chef server (see


for the announcement.)

You can upgrade from the latest 11.x release of either open source or
enterprise Chef to Chef server 12. The docs are here:
https://docs.chef.io/upgrade_server.html

On Mon, Oct 5, 2015 at 5:54 PM, kallen@groknaut.net 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, kallen@groknaut.net 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:infrom_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:inload’
/opt/chef-server/embedded/bin/chef-solo:23:in `’


Nathan L Smith
smith@chef.io


Nathan L Smith
smith@chef.io
(319) 339-0466


#5

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, kallen@groknaut.net 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, kallen@groknaut.net 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:infrom_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:infrom_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:ininstance_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:inload_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:inblock 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:incompile_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:inload’
/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:insetup_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:inblock 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:inrun’
/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:inblock 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:inrun_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


Nathan L Smith
smith@chef.io


#6

Hi
I was wondering , which rpm_package property would allow me to install rpm to a custom location?
Any example would be appreciated?


#7

As I just did feel the pain doing this migration, here’s[1] my notes on
sanitizing the cookbooks directory. This is still a work in progress,
but may help fix things working in 11.0.8 and not working in 12 (a step
to 11.1.X is to be done before the 12)

[1] https://github.com/Tensibai/chef-server-migration [6]

Le 2015-10-06 01:03, Nathan L Smith a écrit :

Before Chef server 12, there was an open source Chef server (Open Source Chef Server 11) and Enterprise Chef server (which included ACLs, multiple organizations, LDAP support, and other “enterprise” features.) With Chef server 12 there is only one Chef server (see https://www.chef.io/blog/2014/09/08/there-is-one-chef-server-and-it-is-open-source/ [4] for the announcement.)

You can upgrade from the latest 11.x release of either open source or enterprise Chef to Chef server 12. The docs are here: https://docs.chef.io/upgrade_server.html [5]

On Mon, Oct 5, 2015 at 5:54 PM, kallen@groknaut.net 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, kallen@groknaut.net 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/ [1]

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

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 [3]’
}
}

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:infrom_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:infrom_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:ininstance_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:inload_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:inblock 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:incompile_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:inload’
/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:insetup_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:inblock 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:inrun’
/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:inblock 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:inrun_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


Nathan L Smith
smith@chef.io

Nathan L Smith
smith@chef.io
(319) 339-0466

Links:

[1]


[2] https://github.com/chef/oc-id
[3] https://supermarket.redacted.internal/auth/chef_oauth2/callback
[4]
https://www.chef.io/blog/2014/09/08/there-is-one-chef-server-and-it-is-open-source/
[5] https://docs.chef.io/upgrade_server.html
[6] https://github.com/Tensibai/chef-server-migration


#8

Probably options with the command line arguments you would use to specify
the custom location.

https://docs.chef.io/resource_rpm_package.html

On Tue, Oct 6, 2015 at 8:23 AM, M G meher03@hotmail.com wrote:

Hi

I was wondering , which rpm_package property would allow me to install rpm
to a custom location?

Any example would be appreciated?


#9

Beware of dragons here, some chef libs are statically linked to /opt/opscode and so things may crash if installed in another location. (Didn’t check for latests versions, but I think this has not changed)