=== kentb__ is now known as kentb | ||
jtv | roaksoax, smoser: hi there... do you happen to know a good example, by any chance, of how to make an authenticated http (GET) request to the metadata server from the commissioning script? I know we have the python code in there, but are the credentials in a format that we can easily put to use in wget? | 12:05 |
---|---|---|
smoser | jtv, well, i dont know how easy or difficult wget and oauth would be. | 13:16 |
smoser | is this as a one time thing or are you looking for general solution? | 13:16 |
smoser | from an ephemeral instance, cloud-init's MAAS datasource can be run from the command line. | 13:18 |
jtv | smoser: I'm looking to have the commissioning script make one authenticated GET request to the metadata service. No general solution needed, really. | 13:33 |
smoser | i think the MAAS datasource can possibly do what you want | 13:34 |
smoser | jtv, | 13:35 |
smoser | python /usr/share/pyshared/cloudinit/sources/DataSourceMAAS.py | 13:36 |
smoser | the argument to '--config' is a file in /etc/cloud/cloud.cfg.d/*cmdl* | 13:36 |
smoser | and inside that file is the url you need also | 13:36 |
jtv | smoser: I guess that's in the cloud-init source tree? | 13:37 |
smoser | if you're booted into an ephemeral image, its ther for you. | 13:38 |
jtv | And I guess I just wrap it in some python to invoke it? | 13:38 |
smoser | i dont know why wrap in python | 13:39 |
jtv | Well it's not an executable, is it? | 13:39 |
jtv | Or is it? There's no hashbang... | 13:40 |
smoser | oh. just run it with python | 13:40 |
smoser | it has a main | 13:41 |
jtv | I see. Sounds perfect! | 13:41 |
smoser | jtv, http://paste.ubuntu.com/1429760/ | 14:18 |
smoser | I've been wanting to write that for a while, so there it is. | 14:18 |
smoser | maybe i'll send it to maas-devel | 14:19 |
jtv | smoser: thanks. I hope I'll be able to look into it tomorrow. (Unwell at the moment, so we'll have to see how it develops) | 14:32 |
smoser | jtv, but if you're looking for a way to make 'GET' requests in the ephemeral image, then the thing we want to get to is having a client in there that can easily do that (ie, add 'GET' support to maas-signal). | 14:35 |
jtv | smoser: I guess you mean extracting some shared functionality. That probably makes sense. Wouldn't necessarily be something you'd still want to call maas-signal though. | 14:37 |
freed0 | anyone here deployed larger 20+ MAAS systems locally and not in the 'cloud'? | 15:55 |
rbasak | Aram: hey, any joy with the DHCP/IP issue? | 17:37 |
rbasak | Aram: I've just been reminded of bug 1064291, which might be relevant to the design of the go-juju maas provider | 17:37 |
ubot5 | Launchpad bug 1064291 in Release Notes for Ubuntu "Default constraints make no sense on MAAS" [Undecided,New] https://launchpad.net/bugs/1064291 | 17:37 |
=== ehw_ is now known as ehw | ||
=== ppetraki_ is now known as ppetraki |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!