Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Wed Apr 24, 2013 7:53 am 
Offline
Senior Newbie

Joined: Wed Jun 29, 2011 12:32 pm
Posts: 7
Website: http://www.somersettechsolutions.co.uk
WLM: anthony@somersettechsolutions.co.uk
AOL: anthonysomerset
Location: London, UK
I'm wondering if this is possible, if not then i'll feature request it :)

EC2 has an ability to get basic instance information from within the instance without needing to authenticate with there API - its basically a web interface on an internal only ip that returns key info like ip, instance id etc

I'm currently writing a stack script for a common stack we need to setup including r1soft/idera

now as you may be aware r1soft/idera needs a custom kernel module compiling and i've historically had problems with compiling with the current versions of the kernel so i generally just switch to pv_grub with linode and use the debian stock kernels (i'd rather not but here we are anyway)

as part of the stackscript process i'd like to update the kernel for the config of the linode from the default (which is needed to get things going) to the pv_grub kernel once the relevant inside vm stuff is done (installing the kernel and grub etc so this means i need to work with the API which isnt such a big deal

however i have no way of currently being able to identify the linode without having info to start with (that is i would have to edit the stackscript manually once i created the linode so i can inject the linodeid into the script

so i ask, is this kind of info available to our linodes in any form?


Top
   
PostPosted: Wed Apr 24, 2013 7:41 pm 
Offline
Senior Newbie

Joined: Wed Jun 29, 2011 12:32 pm
Posts: 7
Website: http://www.somersettechsolutions.co.uk
WLM: anthony@somersettechsolutions.co.uk
AOL: anthonysomerset
Location: London, UK
as an update to this

StackScripts pass the LINODEID into a Bash Variable that you can use, it turns out i need the ConfigID to update the kernel setting and the API doesnt have any clear display of what config is active - so for now i have "cheated" i've assumed that at the point this stack script is used, there will only ever be one Config for a particular linode so just extract the ConfigID from the linode.config.list api call - its hacky but it works


Top
   
PostPosted: Wed Apr 24, 2013 8:42 pm 
Offline
Senior Member

Joined: Sat Mar 28, 2009 4:23 pm
Posts: 415
Website: http://jedsmith.org/
Location: Out of his depth and job-hopping without a clue about network security fundamentals
I've half a mind to leverage the network of people that I can and see if there's any merit to some kind of cross-provider standard here, be that a standardization upon Amazon's mechanism or some kind of vendor-neutral identification scheme. You know what they say about standards, though...

Every piece of devops software -- think Chef, etc. -- needs to solve this in some way, and none of them can reverse the Linode ID from just the running Linode's environment without using a Stackscript. For those of you unfamiliar with Amazon's mechanism, Amazon offers a Web API running on http://169.254.169.254/ which, when accessed from the instance, returns metadata for the instance itself. No identification required. Lots of things make use of this, like cloud-init.

We talked about it when I worked at Linode, so it was definitely on the radar. Would be nice to see.

_________________
Disclaimer: I am no longer employed by Linode; opinions are my own alone.


Top
   
PostPosted: Wed May 01, 2013 4:13 am 
Offline
Senior Newbie

Joined: Wed Jun 29, 2011 12:32 pm
Posts: 7
Website: http://www.somersettechsolutions.co.uk
WLM: anthony@somersettechsolutions.co.uk
AOL: anthonysomerset
Location: London, UK
its nice that LINODE_ID is passed via the stackscript which is great, it would good if it also passed the running/created CONFIG_ID through as well - it would solve my needs perfectly

my solution was hacky and will fail the moment i have more than one config setup for a single linode

but definitely +1 for some standardisation on linodes being able to get there metadata from an internal only API - the AWS is the most elegant solution i can say i have seen for this kind of stuff


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group