niusmallnan 929bb5abce Fix golint check error | 7 年之前 | |
---|---|---|
.. | ||
Documentation | 7 年之前 | |
config | 7 年之前 | |
datasource | 7 年之前 | |
initialize | 6 年之前 | |
network | 7 年之前 | |
pkg | 7 年之前 | |
system | 7 年之前 | |
units | 7 年之前 | |
.gitignore | 7 年之前 | |
.travis.yml | 7 年之前 | |
CONTRIBUTING.md | 7 年之前 | |
DCO | 7 年之前 | |
LICENSE | 7 年之前 | |
MAINTAINERS | 7 年之前 | |
NOTICE | 7 年之前 | |
README.md | 7 年之前 | |
build | 7 年之前 | |
cover | 7 年之前 | |
test | 7 年之前 | |
vendor.manifest | 7 年之前 |
NOTE: This project has been superseded by Ignition and is no longer under active development. Please direct all development efforts to Ignition.
coreos-cloudinit enables a user to customize CoreOS machines by providing either a cloud-config document or an executable script through user-data.
A subset of the official cloud-config spec is implemented by coreos-cloudinit. Additionally, several CoreOS-specific options have been implemented to support interacting with unit files, bootstrapping etcd clusters, and more. All supported cloud-config parameters are documented here.
The following is an example cloud-config document:
#cloud-config
coreos:
units:
- name: etcd.service
command: start
users:
- name: core
passwd: $1$allJZawX$00S5T756I5PGdQga5qhqv1
write_files:
- path: /etc/resolv.conf
content: |
nameserver 192.0.2.2
nameserver 192.0.2.3
coreos-cloudinit supports executing user-data as a script instead of parsing it as a cloud-config document. Make sure the first line of your user-data is a shebang and coreos-cloudinit will attempt to execute it:
#!/bin/bash
echo 'Hello, world!'
coreos-cloudinit will replace the following set of tokens in your user-data with system-generated values.
Token | Description |
---|---|
$public_ipv4 | Public IPv4 address of machine |
$private_ipv4 | Private IPv4 address of machine |
These values are determined by CoreOS based on the given provider on which your machine is running. Read more about provider-specific functionality in the CoreOS OEM documentation.
For example, submitting the following user-data...
#cloud-config
coreos:
etcd:
addr: $public_ipv4:4001
peer-addr: $private_ipv4:7001
...will result in this cloud-config document being executed:
#cloud-config
coreos:
etcd:
addr: 203.0.113.29:4001
peer-addr: 192.0.2.13:7001
Please use the CoreOS issue tracker to report all bugs, issues, and feature requests.