简体   繁体   English

启用softlayer ohai插件

[英]Enable softlayer ohai plugin

I wanted to enable the softlayer ohai plugin so that the softlayer metadata will be collected. 我想启用softlayer ohai插件,以便收集softlayer元数据。

I have included the ohai recipe in the chef node's run list. 我已经在厨师节点的运行列表中包括了ohai食谱。 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 . /opt/chef/embedded/apps/ohai/lib/ohai/plugins的Chef节点上似乎缺少softlayer.rb文件。 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 . 您需要给ohai一个提示 Therefore, create a file called /etc/chef/ohai/hints/softlayer.json with content {} . 因此,创建一个名为/etc/chef/ohai/hints/softlayer.json的文件,其内容为{}

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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