Node Meta Data Service

So recently I've gotten spoiled with other cloud provider meta data services. The kind of API where I can hit an 'internal' URL like 169.254.169.254/latest/user-data/ and pull out usernames, passwords, SSH-keys etc as I deploy new instances. I can't seem to find such a service on Linode so I'm hoping to use the StackScripts API instead.

When I create a StackScript and 'deploy an image' using one, what technically is occuring? Is linode stuffing a shell script into a 'standard' image that gets executed on first boot? If so what is the path that it does so? Is it different per supported distribution? Does Linode at some point try to delete that shell script?

Since I run a fully custom and encrypted distribution via pv-grub what I would like to do is deploy a 'standard' image with said StackScript and then simply mount that drive in my custom distribution and slurp out the StackScript that I can dynamically push via the Linode API at deploy time. That way I can fully customize my own instances dynamically. Anyone done any such machinations?

What other solutions have you come up to deploy SSH-keys and such? I could come up with my own external service but I'm concerned I would implement some gaping security hole that would be easily exploitable.

1 Reply

So to followup to my own post, yes it seems Linode just dumps whatever script is written (it does require a shebang at the top but no other seeming requirements) and dumps it into the created image (I only tested on Debian 7) at /root/StackScript.

So for me this should work. Mount drive and slurp in file for node configuration on custom distro.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct