Updated cloudconfig docs

* Fixed openstack config-drive link
* Added cloud-config-locations.md
This commit is contained in:
kayrus 2015-07-28 14:56:44 +02:00
parent fc4efb086b
commit 0a46b32c88
3 changed files with 28 additions and 1 deletions

View File

@ -0,0 +1,19 @@
# Cloud-Config Locations
Every CoreOS boot Cloud-Config tool 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]({{site.baseurl}}/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]({{site.baseurl}}/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]({{site.baseurl}}/os/docs/latest/booting-with-pxe.html) or [iPXE]({{site.baseurl}}/os/docs/latest/booting-with-ipxe.html) boots.
* `/var/lib/coreos-install/user_data` when you install CoreOS manually using the [coreos-install]({{site.baseurl}}/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.

View File

@ -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.

View File

@ -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