There's no single convention, both are being used, and even worse, for the same option we could find the underscore and hyphen available and both doing different stuff, ie: follow this bug.
Note: there are some useful guides on the internet that use the hyphen variant, ie: this guide which prove being very useful, however one has to be careful to take the final syntax from the docs itself.
We always have to begin with #cloud-config
adding any extra #
or anything else to the begnning of the document will result in Silent failure, keep debugging folks :/
One way to check for this error is by using cloud-init devel schema --config-file user-data-file
.
It's meaningful to manually check the logs as the first resort for debugging, but luckily cloud-init
has it's own way of parsing and capturing info from the logs, the full guide is here.
examples are,
cloud-init analyze show -i my-cloud-init.log
: for a summary of succeeding events with the duration of each
cloud-init analyze dump -i my-cloud-init.log
: event formatted details
cloud-init analyze blame -i my-cloud-init.log
: event formatted details, ordered by duration
cloud-init analyze boot
: get timings alongside with kernel booting time
Both the following spacings work!
users:
- blabla
and
users:
- blabla
Avoid re-flashing the sd-cards or hdds until you're ok with the cloud-init configurations, use Tomkin
's guide for a how to
Even if Vagrant could be useful generally in debugging, some issues may show in Vagrant setups that won't show in real world setup, ie: existence of only one logical network device by default, or more importantly, configuring rsyslog breaks the vm virtualbox some how, when it works correctly with the sd card AFAIK.
The cloud-init docs has a solution for testing user-data with a kvm machine, I didn't try it yet, as I've reached vagrant first =D