From 5383bd1f07a665ef6ec47b6576934f503fedaf3f Mon Sep 17 00:00:00 2001 From: kayrus Date: Mon, 27 Jul 2015 17:38:11 +0200 Subject: [PATCH 1/3] Fixed Cloud-Config examples --- Documentation/cloud-config.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/cloud-config.md b/Documentation/cloud-config.md index ffce8fc..c9ab531 100644 --- a/Documentation/cloud-config.md +++ b/Documentation/cloud-config.md @@ -182,14 +182,14 @@ for locksmith. For example, the following cloud-config... coreos: locksmith: - endpoint: example.com:4001 + endpoint: http://example.com:2379 ``` ...will generate a systemd unit drop-in like so: ``` [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]. From 0a46b32c889732874a6cec918629f9bbd88a9c54 Mon Sep 17 00:00:00 2001 From: kayrus Date: Tue, 28 Jul 2015 14:56:44 +0200 Subject: [PATCH 2/3] Updated cloudconfig docs * Fixed openstack config-drive link * Added cloud-config-locations.md --- Documentation/cloud-config-locations.md | 19 +++++++++++++++++++ Documentation/cloud-config.md | 8 ++++++++ Documentation/config-drive.md | 2 +- 3 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 Documentation/cloud-config-locations.md diff --git a/Documentation/cloud-config-locations.md b/Documentation/cloud-config-locations.md new file mode 100644 index 0000000..b23225a --- /dev/null +++ b/Documentation/cloud-config-locations.md @@ -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. diff --git a/Documentation/cloud-config.md b/Documentation/cloud-config.md index 21d4aa3..9defaa9 100644 --- a/Documentation/cloud-config.md +++ b/Documentation/cloud-config.md @@ -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`. +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 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. diff --git a/Documentation/config-drive.md b/Documentation/config-drive.md index b3bc884..e83a51c 100644 --- a/Documentation/config-drive.md +++ b/Documentation/config-drive.md @@ -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 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 From 8c804a1124704bea62f1ce8164cf7acf00047942 Mon Sep 17 00:00:00 2001 From: kayrus Date: Tue, 18 Aug 2015 11:31:52 +0200 Subject: [PATCH 3/3] Removed {{site.baseurl}} --- Documentation/cloud-config-locations.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Documentation/cloud-config-locations.md b/Documentation/cloud-config-locations.md index b23225a..b1c5036 100644 --- a/Documentation/cloud-config-locations.md +++ b/Documentation/cloud-config-locations.md @@ -1,11 +1,11 @@ # 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: +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]({{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. +* 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.