opensatck 在启动的时候注入额外的信息
在配置ceph的时候建议使用metadata/cloud-init来注入额外的信息。
因此深入的了解了一下openstack的额外信息注入的细节。
1. 在最新的nova配置手册中,
http://docs.openstack.org/draft/config-reference/content/list-of-compute-config-options.html
(搜索关键字inject_partition
= -2
)
我们可以选择采用什么方式注入额外信息。
inject_partition
= -2
(IntOpt) The partition to inject to : -2 => disable, -1 => inspect (libguestfs only), 0 => not partitioned, >0 => partition number
除了 libguestfs 之外,其实还可以通过cloud-init, 或者在config-drive启动一个脚本。
搜索关键字(Image requirements)
Image requirements
An image that has been built with a recent version of the
cloud-init
package will be able to automatically access metadata passed via config drive. The current version of cloud-init
has been confirmed to work with Red Hat Enterprise Linux images.If an image does not have the
cloud-init
package installed, the image must be customized to run a script that mounts the config drive on boot, reads the data from the drive, and takes appropriate action such as adding the public key to an account. See below for details on how data is organized on the config drive.具体可以注入什么内容,可以参考:
发现张冬 分析的挺好:
此外张冬还分析了很多: