/srv/irclogs.ubuntu.com/2015/04/07/#cloud-init.txt

=== harlowja is now known as harlowja_away
smosercn28h, it stops at the first.13:44
cn28haha ok, hm13:45
Odd_Blokecn28h: You can configure which data sources it will look at, though.13:45
smosergamename (who is gone), cloud-init doesn't currently "pick" eth0. it starts running when the OS's networking is up.13:45
smoserright, Odd_Bloke you coudl tell cloud-init to not use the openstack, but another entirely.13:45
smoseror you could (i think) tell cloud-init to use the openstack one, but with a different url (ie, not 169.254.169.254, and use a URL you have control of)13:46
smoserthose things have to be configured prior to cloud-init running.13:46
Odd_Bloke(I guess you'd also need to skip EC2, as OpenStack provides an EC2-compatible metadata service)13:46
smoserie, you can't tell cloud-init where to find data in the data that you're providing it.13:46
smoserit unfortunately can't read your mind.13:46
smoseropenstack is before EC2 in the order, so that cloud-init will prefer the openstack MD to ec2.13:47
smoserbut, yeah, Odd_Bloke you're right. youd' have to tell it not to look ther also.13:47
smosernk121, you should 'apt-get install pastebinit'13:48
smoserand use pastebinit  :)13:48
smoserthen i dont have to go to pastebin.com urls and look at all those adds.13:48
smoserer... ads.13:48
cn28hsmoser: you mean, there may be a way to configure the openstack datasource to look elsewhere? (that would be great -- I'd been thinking I'd have to actually go subclass the implementation and replace the user data logic)13:48
smoseryeah, that may be configurable13:49
smoserthe openstack one is.13:49
smoserer.. the ec2 one is.13:49
cn28hah, very interesting13:49
smoseror you could use "nocloud"13:49
smoserwhich is pretty simple also.13:49
smoseryou just need a base-url with a 'user-data' and 'meta-data'13:49
smoserharlowja_away, what "archive" format would you want for multipart13:50
cn28hyeah that's an interesting idea -- we *are* using other features like key injection via openstack, but I suppose I can use a shellscript to grab that from the metadata service and stage it.. less elegant but workable13:50
smoser:)13:51
smoseryeah.13:51
smosercn28h, look at doc/examples/cloud-config-datasources.txt13:52
smoserthats how you confgiure a datasource... the key 'metadata_urls' that you see in Ec2 is also valid for openstack13:52
smoserper my reading of the code13:52
smoserit looks like it reads:13:53
smoser metadata_urls13:53
smoser max_wait13:53
smoser timeout13:53
smosernk121, i think you're using vivid ?13:55
nk121smoser: no trusty13:56
cn28hnice, yeah that will be great.  Now I just need to think of how to correlate it so I can return the right user data for that instance, hm13:57
smoserright.13:57
smoserthat does suck.13:57
smoseryou oculd look at source ip13:57
smoseras you should be albe to get the instances ip address13:57
smoserfrom openstack13:57
smoserthat is essentially how the opestnack metadata service works13:58
cn28hah, yeah that makes sense13:58
cn28hmap it backwards by talking to neutron and figuring out which instance has that IP or some such13:58
smoserright.14:04
smosercn28h, if you do this , it might be somewhat useful generically.14:05
smoserie, a opensta-ck-metadata-aware proxy 14:05
cn28hhm14:05
smosers/sta-ck/ck/14:05
smoserfairly simple given openstack admin credentials.14:06
smoseryou just take input of a IP address and render the result.14:06
smoseryou may even be able to re-use the openstack one.. but that might be difficult14:06
cn28hyeah, I will have to do some digging14:06
cn28hand discussion with the rest of my team -- they may well just tell me it's too crazy for their tastes and thatI need to find a different way ;p14:07
cn28hbut it sounds like an interesting possibility14:07
cn28hreally it would be nice if the other service currently camping on the user-data field was cloud-init compatible14:08
cn28hbecause it's just a handful of key-value pairs that could easily be written to a file and read from there instead ...14:08
cn28hbut that belongs to a codebase we don't own14:09
smosercn28h, so... if you're talking to that other service...14:09
smosertell them they should support mime-multipart and pick out the pieces they're interetsed in14:09
smoseror use cloud-config-archive format (which i woudl admit is less "standardy")14:09
smoserthis is waht cloud-init does... it pays attention only to things that are destined for it and ignores other things.t14:10
cn28hyeah, that makes much more sense so that you can share the user data14:10
smoserright.14:10
cn28hmaybe I will open a JIRA with a feature request14:10
smosernk121, i'm not sure what i'm seeing there really... 14:12
smosernk121, /var/log/cloud-init-output.log might hvae more info14:12
gamenameHi.  How does cloud-init know which device (e.g. eth0)  as the preferred network interface?15:54
Odd_Bloke14:45:33 < smoser> gamename (who is gone), cloud-init doesn't currently "pick" eth0. it starts running when the OS's networking is up.16:20
=== alexpilotti_ is now known as alexpilotti
gamenameOdd_Bloke: Eh? Gone?  Is the status showing me offline?  Re: the question. Ah, ok.  cloud-init is agnostic about the network. It just uses whatever interface comes up. All correct? 16:29
Odd_Blokegamename: You were gone when smoser said that, ~3 hours ago. :)16:33
Odd_Blokegamename: I believe your conclusion is correct, yes.16:33
gamenameOdd_Bloke: Got it.  I didn't get the response. Sorry for the confusion. I'll check my client (or change the damn thing).16:33
cn28hsmoser: so I had an interesting thought and figured I'd share.  If I create a really minimal web app that proxies *locally* I can leave all the heavy lifting in terms of correlation up to openstack because I can just forward requests off to the real thing locally. Then, I can intercept user-data and send that off somewhere else, along with fields I can pull from the metadata service myself to help correlate on the remote end. Should work as17:05
cn28hlong as I can guarantee it's up and running before cloud-init runs.17:05
=== harlowja_away is now known as harlowja
harlowjasmoser just some simple directory structure would seem like it could replace the whole MIME stuff17:32
harlowjafile + directory struture17:32
harlowja^ is also then easily examinable...17:32
=== harlowja is now known as harlowja_away
=== harlowja_away is now known as harlowja
=== tennis_ is now known as gamename
harlowjasmoser https://code.launchpad.net/~harlowja/cloud-init/write-files-fetch-from-somewhere should be fixed up22:54

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