/srv/irclogs.ubuntu.com/2018/07/16/#cloud-init.txt

=== r-daneel_ is now known as r-daneel
=== r-daneel_ is now known as r-daneel
Guest78Cheers to the maintainers for making such a great tool.  I'm trying to find documentation on starting from the cloud-init package in the case there is no image available.  In my case, I'm working on a non-major cloud that has the concept of user-data, which is just a string not backed by cloud-init.  Installing the package seems easy enough, but how can I tell cloud-init to look at my custom metadata / user data field?18:44
Guest78apologies if I am totally missing the complexity of such a request18:45
rharperGuest78: If your cloud does is one of the cloud-init datasources it knows how to read then you may want to look at using the NoCloud datasource which can read information from an ISO, floppy, or a directory within the image19:59
rharperhttp://cloudinit.readthedocs.io/en/latest/topics/datasources.html20:00
rharperhttp://cloudinit.readthedocs.io/en/latest/topics/datasources/nocloud.html20:00
Guest78thank you @rharper it is not, but there is a metadata URL so hopefully that can be a source without much hassle20:07
rharperGuest78: maybe;   do you know if it 's similar to any of the existing datasources?  like an OpenStack variant ?20:09
rharperthe quickest way is likely to write a shell program which uses curl/wget to pull the metadata and then you can parse out what you need from it.   Is it only meta-data or does it include user-data as well ?20:10
Guest78@rharper the metadata endpoint is different and I'm honestly not sure what is similar.  it seems like I may be able to use nocloud-net in the docs you sent me "With ds=nocloud-net, the seedfrom value must start with http://, https:// or ftp://"20:11
Guest78there is user_data in the meta-data, yes, it's a 16K max string20:12
rharpercan you dump the output from the URL  somewhere ?20:12
rharpertypically a cloud needs to provide a unique id (instance-id) ; and then user-data would include yaml in cloud-config format which can be processed;   if it's in NoCloud's format (one file for meta-data and one file for user-data)20:13
rharperit's possible that the seedfrom=url could work20:13
Guest78very cool, you mean the output from the metadata service?20:14
rharperyeah20:14
Guest78Ok20:15
Guest78@rharper excuse the delay that info is a little too revealing, but it's a large json response where user_data is: curl http://<gateway_ip>/skytap/ | jq .user_data20:43
rharpernp20:44
rharperthe NoCloud datasource expects cloud-config, which is textoutput starting with #cloud-config\n<yaml>20:44
rharperso, the NoCloud datasource isn't going to work with that.20:45
Guest78ok, thanks for clearing that up20:46
rharperthere are more complicated ways to use NoCloud to run a program to extract the user-data/cloud-config and run that manually, but that's not going work well.  Likely the best bet would be to teach cloud-init how to consume the metadata URL directly20:46
Guest78ok, great, I'll start looking into that.  For now we'll probably go with your idea of using the shell script to parse user data until we can figure that out.  cheers!20:49
rharpersure20:50
smoserGuest78: how did/do you sign up for skytap?21:07
=== r-daneel_ is now known as r-daneel
Guest78@smoser it sorta fell into my lap professionally.  Did some digging and if you want to check it out, one of the professional services folks would like to get you an account.  I'll DM his contact23:53

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!