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启动一个脚本。

https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux_OpenStack_Platform/4/html/End_User_Guide/config-drive.html

搜索关键字(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.
 
具体可以注入什么内容,可以参考:
https://kimizhang.wordpress.com/2014/03/18/how-to-inject-filemetassh-keyroot-passworduserdataconfig-drive-to-a-vm-during-nova-boot/
 
 
发现张冬 分析的挺好:
http://blog.csdn.net/gaoxingnengjisuan/article/month/2013/10
此外张冬还分析了很多:
http://blog.csdn.net/gaoxingnengjisuan/article/category/1461395

你可能感兴趣的:(opensatck 在启动的时候注入额外的信息)