Merge pull request #366 from endocode/master
docs: add cloud-config locations
This commit is contained in:
commit
9c4aca6c9a
19
Documentation/cloud-config-locations.md
Normal file
19
Documentation/cloud-config-locations.md
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
# Cloud-Config Locations
|
||||||
|
|
||||||
|
On every boot, coreos-cloudinit looks for a config file to configure your host. Here is a list of locations which are used by the Cloud-Config utility, depending on your CoreOS platform:
|
||||||
|
|
||||||
|
* Mount point with [config-2](/os/docs/latest/config-drive.html#contents-and-format) label. It should contain a `openstack/latest/user_data` relative path. An absolute path inside CoreOS should look like `/media/configvirtfs/openstack/latest/user_data`. Usually used by cloud providers or in VM installations.
|
||||||
|
* FAT or ISO9660 filesystem with [config-2](/os/docs/latest/config-drive.html#qemu-virtfs) label. A `/media/configdrive/` mount point should contain a `/media/configdrive/openstack/latest/user_data` absolute path to the config file. Usually used in VM installations.
|
||||||
|
* Kernel command line: `cloud-config-url=http://example.com/user_data`. You can find this string using this command `cat /proc/cmdline`. Usually used in [PXE](/os/docs/latest/booting-with-pxe.html) or [iPXE](/os/docs/latest/booting-with-ipxe.html) boots.
|
||||||
|
* `/var/lib/coreos-install/user_data` when you install CoreOS manually using the [coreos-install](/os/docs/latest/installing-to-disk.html) tool. Usually used in bare metal installations.
|
||||||
|
* OEM images use `/usr/share/oem/cloud-config.yml` path.
|
||||||
|
* Azure platform uses OEM path for first Cloud-Config initialization and then `/var/lib/waagent/CustomData` to apply your settings.
|
||||||
|
* DigitalOcean and EC2 use URLs to download Cloud-Config.
|
||||||
|
|
||||||
|
You can also run the `coreos-cloudinit` tool manually and provide a path to your custom Cloud-Config file:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
sudo coreos-cloudinit --from-file=/home/core/cloud-config.yaml
|
||||||
|
```
|
||||||
|
|
||||||
|
This command will apply your custom cloud-config.
|
@ -4,6 +4,14 @@ CoreOS allows you to declaratively customize various OS-level items, such as net
|
|||||||
|
|
||||||
Your cloud-config is processed during each boot. Invalid cloud-config won't be processed but will be logged in the journal. You can validate your cloud-config with the [CoreOS validator]({{site.url}}/validate) or by running `coreos-cloudinit -validate`.
|
Your cloud-config is processed during each boot. Invalid cloud-config won't be processed but will be logged in the journal. You can validate your cloud-config with the [CoreOS validator]({{site.url}}/validate) or by running `coreos-cloudinit -validate`.
|
||||||
|
|
||||||
|
In addition to `coreos-cloudinit -validate` command and https://coreos.com/validate/ online service you can debug `coreos-cloudinit` system output through the `journalctl` tool:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
journalctl _EXE=/usr/bin/coreos-cloudinit
|
||||||
|
```
|
||||||
|
|
||||||
|
It will show `coreos-cloudinit` run output which was triggered by system boot.
|
||||||
|
|
||||||
## Configuration File
|
## Configuration File
|
||||||
|
|
||||||
The file used by this system initialization program is called a "cloud-config" file. It is inspired by the [cloud-init][cloud-init] project's [cloud-config][cloud-config] file, which is "the defacto multi-distribution package that handles early initialization of a cloud instance" ([cloud-init docs][cloud-init-docs]). Because the cloud-init project includes tools which aren't used by CoreOS, only the relevant subset of its configuration items will be implemented in our cloud-config file. In addition to those, we added a few CoreOS-specific items, such as etcd configuration, OEM definition, and systemd units.
|
The file used by this system initialization program is called a "cloud-config" file. It is inspired by the [cloud-init][cloud-init] project's [cloud-config][cloud-config] file, which is "the defacto multi-distribution package that handles early initialization of a cloud instance" ([cloud-init docs][cloud-init-docs]). Because the cloud-init project includes tools which aren't used by CoreOS, only the relevant subset of its configuration items will be implemented in our cloud-config file. In addition to those, we added a few CoreOS-specific items, such as etcd configuration, OEM definition, and systemd units.
|
||||||
@ -183,14 +191,14 @@ for locksmith. For example, the following cloud-config...
|
|||||||
|
|
||||||
coreos:
|
coreos:
|
||||||
locksmith:
|
locksmith:
|
||||||
endpoint: example.com:4001
|
endpoint: http://example.com:2379
|
||||||
```
|
```
|
||||||
|
|
||||||
...will generate a systemd unit drop-in like so:
|
...will generate a systemd unit drop-in like so:
|
||||||
|
|
||||||
```
|
```
|
||||||
[Service]
|
[Service]
|
||||||
Environment="LOCKSMITHD_ENDPOINT=example.com:4001"
|
Environment="LOCKSMITHD_ENDPOINT=http://example.com:2379"
|
||||||
```
|
```
|
||||||
|
|
||||||
For the complete list of locksmith configuration parameters, see the [locksmith documentation][locksmith-readme].
|
For the complete list of locksmith configuration parameters, see the [locksmith documentation][locksmith-readme].
|
||||||
|
@ -4,7 +4,7 @@ CoreOS supports providing configuration data via [config drive][config-drive]
|
|||||||
disk images. Currently only providing a single script or cloud config file is
|
disk images. Currently only providing a single script or cloud config file is
|
||||||
supported.
|
supported.
|
||||||
|
|
||||||
[config-drive]: http://docs.openstack.org/user-guide/content/enable_config_drive.html#config_drive_contents
|
[config-drive]: http://docs.openstack.org/user-guide/cli_config_drive.html
|
||||||
|
|
||||||
## Contents and Format
|
## Contents and Format
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user