0

I wanted to enable the softlayer ohai plugin so that the softlayer metadata will be collected.

I have included the ohai recipe in the chef node's run list. I can see it when I run

knife node show NODE_ID

The softlayer.rb file seems to be missing on the chef node at /opt/chef/embedded/apps/ohai/lib/ohai/plugins. Lots of plugins are missing at that location. What might be wrong? What do I need to do to collect the softlayer metadata ?

4

1 回答 1

1

You need to give ohai a hint. Therefore, create a file called /etc/chef/ohai/hints/softlayer.json with content {}.

Then, this check should trigger calls to the metadata service, which finally populates the automatic attributes.

For debugging purpose, try on the node:

ohai softlayer

After the chef run, these automatic attributes can be read from the chef server with:

knife node show <nodename> -a softlayer
于 2016-02-23T16:40:43.513 回答