Accessing the metadata API?

Blake Rouse blake.rouse at canonical.com
Wed Feb 8 16:14:56 UTC 2017


On Wed, Feb 8, 2017 at 11:10 AM, Jim Tilander <jim at tilander.org> wrote:

> Hi Andres,
>
> Basically I’ve been struggling with how curtin works, but I finally got
> the the following stuck in curtin_userdata:
>
> 99_bootstrap: ["curtin", "in-target", "/bin/bash",
> "/usr/local/bin/post-install.sh"]
>

99_bootstrap: ["curtin", "in-target", "/bin/bash",
"/usr/local/bin/post-install.sh", "{{node.fqdn}}"]

With that the FQDN of the node will be passed as the first parameter of
your script.


>
>
> Then in the post-install.sh script I actually want to extract the FQDN of
> my node (but since I run in the installer environment, I can’t really rely
> it seems on the network to tell me this).
>
> When you mention that I could do node.fqdn(), where would I put that? Is
> that some curtin templating? Python?
>
> Thanks,
> Jim
>
> On Feb 3, 2017, at 6:06 AM, Andres Rodriguez <andres.rodriguez at canonical.
> com> wrote:
>
> All I wanted to do was to reliably lookup my own FQDN, as well optionally
>> get some custom payload for each node into a script that runs during setup.
>>
>
> I would need more context than that, but you could get the FQDN of a
> deploying machine in the preseeds context (i.e. node.fqdn()). That said,
> you could also do post_install configuration via preseeds.
>
> You could inject user_data on the deployment (if doing so via the API of
> course).
>
>
>
> --
> Maas-devel mailing list
> Maas-devel at lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/
> mailman/listinfo/maas-devel
>
>
Hope that helps.

Thanks,
Blake Rouse
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/maas-devel/attachments/20170208/89ef7db3/attachment.html>


More information about the Maas-devel mailing list