Manual verification for config in x-shellscript#111
Conversation
| echo -e 'The userdata-mime file was generated by running the command: | ||
| tools/make-mime.py --attach userdata:x-shellscript > userdata-mime | ||
|
|
||
| where userdata is defined as the following file: | ||
| #cloud-config | ||
| final_message: The system is finally up, after seconds $UPTIME seconds' |
There was a problem hiding this comment.
This is a good example @lucasmoura I think it would be nice to add this little mime example to the lxd FAQ section about some use-cases https://cloudinit.readthedocs.io/en/latest/topics/faq.html#lxd
There was a problem hiding this comment.
I know we have a part of those docs here https://cloudinit.readthedocs.io/en/latest/topics/format.html?highlight=make-mime#helper-script-to-generate-mime-messages
maybe it is worth cross referencing those docs too in the faq
There was a problem hiding this comment.
I think it is a good idea to add an example to the FAQ, but I don't know if this one is the best one, since it seems I little bit confusing at first, because the script is not shellscript per se, but the instance is passing this information with this type. Maybe the example should be one where the mime type is consistent with the content of the message. But I don't have much knowledge about MIME, so I don't know if my assumptions are correct
| lxc launch ubuntu-daily:$series $name_recreate -c user.user-data="$(cat userdata-mime)" | ||
|
|
||
| lxc exec $name_recreate -- cloud-init status --wait --long | ||
| lxc exec $name_recreate -- cat /var/lib/cloud/seed/nocloud-net/user-data |
There was a problem hiding this comment.
A note that you can dump userdata with the following command: cloud-init query userdata which will work on all clouds
There was a problem hiding this comment.
Got ir, I will update the code
Manual verification for #234