简体   繁体   中英

Enable softlayer ohai plugin

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 ?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM