Are there any examples of using cloud-init offline (or without cloud hosting)

cloudcloud-init

Note: This is NOT a Raspberry Pi specific question. It is a Linux System Administration question. Please do not try to have it removed from Server Fault.

I see many "Hello, World" level demos that are specific to [insert cloud hosting platform here], but none that are geared to being used on a single local machine. I was encouraged to see that Raspbian has cloud-init in its repository. That is exactly what I want to do. However, I cannot find any information on how to do it without a AWS, OpenStack, etc.

So, I guess what I really want to know is after you apt-get install cloud-init, where do you put your config/userdata?


Update: I found some info on the NoCloud datasource, but I cannot add a volume labeled cidata. So, that is out for me. (The volume that will hold my user-data is labeled boot.)

Best Answer

With the current version of cloud-init you can use smbios options to provide user-data and meta-data. There is also an example for the case you have a local HTTP Server providing these files:

-smbios type=1,serial=ds=nocloud-net;s=http://10.10.0.1:8000/
Related Topic