{"id":8270,"date":"2020-07-18T20:52:08","date_gmt":"2020-07-18T12:52:08","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=8270"},"modified":"2020-07-18T20:52:08","modified_gmt":"2020-07-18T12:52:08","slug":"cloud-init","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/cloud-init","title":{"rendered":"cloud-init\u547d\u4ee4 – \u8de8\u5e73\u53f0\u4e91\u5b9e\u4f8b\u521d\u59cb\u5316\u5de5\u5177"},"content":{"rendered":"\n

cloud-init\u547d\u4ee4\u662f\u7528\u4e8e\u8de8\u5e73\u53f0\u4e91\u5b9e\u4f8b\u521d\u59cb\u5316\u7684\u884c\u4e1a\u6807\u51c6\u591a\u5206\u5e03\u5f0f\u65b9\u6cd5\uff0c\u6240\u6709\u4e3b\u8981\u7684\u516c\u5171\u4e91\u63d0\u4f9b\u5546\u3001\u79c1\u6709\u4e91\u57fa\u7840\u8bbe\u65bd\u7684\u4f9b\u5e94\u7cfb\u7edf\u548c\u88f8\u673a\u5b89\u88c5\u90fd\u652f\u6301\u8be5\u65b9\u6cd5\u3002<\/p>\n\n\n\n

\u8bed\u6cd5\u683c\u5f0f\uff1a<\/strong>cloud-init [\u53c2\u6570]<\/p>\n\n\n\n

\u5e38\u7528\u53c2\u6570\uff1a<\/strong><\/p>\n\n\n\n

init<\/td>\u521d\u59cb\u5316cloud-init\u5e76\u6267\u884c\u521d\u59cb\u5316\u6a21\u5757<\/td><\/tr>
modules<\/td>\u4f7f\u7528\u7ed9\u5b9a\u7684\u914d\u7f6e\u952e\u6fc0\u6d3b\u6a21\u5757<\/td><\/tr>
single<\/td>\u5355\u673a\u8fd0\u884c<\/td><\/tr>
status<\/td>\u62a5\u544a\u4e91\u542f\u52a8\u72b6\u6001\u6216\u7b49\u5f85\u5b8c\u6210<\/td><\/tr>
clean<\/td>\u5220\u9664\u65e5\u5fd7\u548c\u5de5\u4ef6\uff0c\u4ee5\u4fbf\u91cd\u65b0\u8fd0\u884ccloud-init<\/td><\/tr>
collect-logs<\/td>\u6536\u96c6\u5e76\u6253\u5305\u6240\u6709\u4e91\u8ba1\u7b97\u8c03\u8bd5\u4fe1\u606f<\/td><\/tr>
devel<\/td>\u8fd0\u884c\u5f00\u53d1\u5de5\u5177<\/td><\/tr>
dhclient-hook<\/td>\u8fd0\u884cdhclient\u94a9\u5b50\u8bb0\u5f55\u7f51\u7edc\u4fe1\u606f<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n

\u53c2\u8003\u5b9e\u4f8b<\/strong><\/p>\n\n\n\n

\u521d\u59cb\u5316cloud-init\u5e76\u6267\u884c\u521d\u59cb\u5316\u6a21\u5757\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# cloud-init init<\/pre>\n\n\n\n

\u4f7f\u7528\u7ed9\u5b9a\u7684\u914d\u7f6e\u952e\u6fc0\u6d3b\u6a21\u5757\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# cloud-init modules<\/pre>\n\n\n\n

\u62a5\u544a\u4e91\u542f\u52a8\u72b6\u6001\u6216\u7b49\u5f85\u5b8c\u6210\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# cloud-init status<\/pre>\n\n\n\n

\u5220\u9664\u65e5\u5fd7\u548c\u5de5\u4ef6\uff0c\u4ee5\u4fbf\u91cd\u65b0\u8fd0\u884ccloud-init\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# cloud-init clean<\/pre>\n","protected":false},"excerpt":{"rendered":"

cloud-init\u547d\u4ee4\u662f\u7528\u4e8e\u8de8\u5e73\u53f0\u4e91\u5b9e\u4f8b\u521d\u59cb\u5316\u7684\u884c\u4e1a\u6807\u51c6\u591a\u5206\u5e03\u5f0f\u65b9\u6cd5\uff0c\u6240\u6709\u4e3b\u8981\u7684\u516c\u5171\u4e91\u63d0\u4f9b\u5546\u3001\u79c1\u6709\u4e91\u57fa\u7840\u8bbe\u65bd […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[7],"tags":[],"_links":{"self":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/8270"}],"collection":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/comments?post=8270"}],"version-history":[{"count":3,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/8270\/revisions"}],"predecessor-version":[{"id":8273,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/8270\/revisions\/8273"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=8270"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=8270"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=8270"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}