cloud-init將用戶數據注入到VM實例中功能強大,其現有模塊提供了很多可能性。如何在cloud-init中編寫自己的cloud-config?
雖然以使其更易於使用,我想在running coreos in openstack
#cloud-config
coreos:
etcd:
# generate a new token for each unique cluster from https://discovery.etcd.io/new
discovery: https://discovery.etcd.io/<token>
# multi-region and multi-cloud deployments need to use $public_ipv4
addr: $private_ipv4:4001
peer-addr: $private_ipv4:7001
units:
- name: etcd.service
command: start
- name: fleet.service
command: start
定義我自己的標籤像下面coreos,看到的細節,這樣我可以有類似下面用我自己定義的標記/ config myapp
#cloud-config
myapp:
admin: admin
database: 192.168.2.3
我是新來的cloud-init,是不是叫做模塊?它在文檔中爲空http://cloudinit.readthedocs.org/en/latest/topics/modules.html
您能否提供一些信息來描述我如何編寫自己的模塊?
這是一個英語社區 – Nabin 2014-10-23 15:36:14
我澄清了這個問題,我的目標是找到一種方法來定製cloud-config中的標記 – 2014-10-24 00:28:04
@Nabin:它已更新爲英語 – 2014-10-24 00:28:35