Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: Private IP automation
PostPosted: Fri Jun 11, 2010 7:45 am 
Offline
Newbie

Joined: Fri Jun 11, 2010 3:27 am
Posts: 3
Hi everyone!

I am trying to have an automated way of creating and configuring my nodes and want them to communicate through the private network.
However, when I took a look at the API, I wasn't able to tell how I can get a private IP this way.

So I wanted to know if there is a way to enable the private IP of a node via some script rather than using the Linode Manager.

Thanks.


Top
   
 Post subject:
PostPosted: Fri Jun 11, 2010 9:54 am 
Offline
Senior Member
User avatar

Joined: Tue May 26, 2009 3:29 pm
Posts: 1691
Location: Montreal, QC
Since you need to reboot a linode for the new IP to take effect, that's not really going to work unless you have a third party box doing this through the API.

Is there a reason why you need to automate this? Why not just set up the private network on each machine and leave it at that?


Top
   
 Post subject:
PostPosted: Fri Jun 11, 2010 10:34 am 
Offline
Newbie

Joined: Fri Jun 11, 2010 3:27 am
Posts: 3
The problem is that I plan to automatically create and configure some nodes that I will put behind a load-balancer on an as needed basis.

As the decision for creation and deletion of nodes will be triggered by a program, it would be really inconvenient to have to request the private IP manually.


Top
   
 Post subject:
PostPosted: Fri Jun 11, 2010 11:09 am 
Offline
Linode Staff
User avatar

Joined: Tue Apr 15, 2003 6:24 pm
Posts: 3090
Website: http://www.linode.com/
Location: Galloway, NJ
This is on our dev roadmap, however I can't give you an ETA just yet. It will happen, however.

Thanks,
-Chris


Top
   
 Post subject:
PostPosted: Fri Jun 11, 2010 11:53 am 
Offline
Newbie

Joined: Fri Jun 11, 2010 3:27 am
Posts: 3
Thanks for your answer.

I hope you can get this running as soon as possible :D


Top
   
 Post subject:
PostPosted: Sun Jul 04, 2010 2:24 am 
Offline

Joined: Mon Mar 15, 2010 11:14 pm
Posts: 1
Perhaps this is not possible, but it would very interesting if the private IPs could, by default, work like the public ones: set to use DHCP by default.

In my case, I would like to spawn up a bunch of boxes (say, 10 of them) for just one day a month. But I don't want to have to go configure the private IPs just so I can get them to see the persistent database server that they'll be communicating with...


Top
   
PostPosted: Sun Sep 16, 2012 11:21 am 
Offline
Newbie

Joined: Sun Sep 16, 2012 11:18 am
Posts: 3
I know that this is a pretty old thread, but I'd definitely *love* it if the private IPs could also be assigned via DHCP (at least if you only have 1 of them on the specific Linode)...

At this point the API does seem to provide everything that would be needed to automate this without the DHCP assignment but it'd be sooo much easier for users to configure some type of automated scaling if the private IPs would be active immediately upon reboot via DHCP.


Top
   
PostPosted: Sun Sep 16, 2012 11:26 am 
Offline
Linode Staff
User avatar

Joined: Tue Apr 15, 2003 6:24 pm
Posts: 3090
Website: http://www.linode.com/
Location: Galloway, NJ
DHCP can only assign one IP per interface - so that'd be your public IP. No chance for it to do both.

But, we could work in an 'ip-config helper' that spruces up your network interface config files for you. It would be disable-able, of course.

-Chris


Top
   
PostPosted: Sun Sep 16, 2012 11:40 am 
Offline
Newbie

Joined: Sun Sep 16, 2012 11:18 am
Posts: 3
Thanks for the quick follow-up Chris, especially on an old thread. :-)

DHCP - Aren't the steps that we take manually (am doing exactly this right now for a new Linode, heh, ~60% done) just adding a second interface meaning that you could potentially have two configured by default and so still be able to use DHCP for the private? Upon taking a closer second look at the instructions (it's early & I tend to stay closer to the app level generally heh) it actually looks like the other IPs are configured on virtual interfaces instead, eh? I'm not familiar TBH, is this where the limitation comes in to play? I guess I would expect, perhaps naively, that some of the new virtualization stuff would support a configuration like thus but obviously this is a good bit out of my knowledge range...

IP-Config Helper - Could you elaborate on this a bit more perhaps? Would this be a binary or something that in essence is a remote system that would automatically make the appropriate configuration changes via Lish or similar direct access login? Really just interested in what you had in mind, at first glance it sounds like it could potentially be a very useful addition. I'd actually even be interested in hearing more about what you have in mind as far as this approach is concerned as it's something, depending on what you had in mind, that I might be interested in writing / helping to write or at least contributing to if possible (assuming you weren't thinking something more from the VM side / that I wouldn't have access to obviously)... :-)


Top
   
PostPosted: Sun Sep 16, 2012 11:50 am 
Offline
Linode Staff
User avatar

Joined: Tue Apr 15, 2003 6:24 pm
Posts: 3090
Website: http://www.linode.com/
Location: Galloway, NJ
One Linode = one interface, so no - we won't be having multiple interfaces and additional MAC entries, etc, etc. What you're doing when adding IPs is creating NIC aliases - completely different, and is somewhat deprecated. See 'man ip' for the new stuff...

They're on-boot helpers on the host that is bringing up your Linode. It mounts your filesystem, does stuff, unmounts and then boots it. This already happens with a few other things (console device, etc) which you can see clicking on your configuration profile.

If you're trying to achieve automation for now you're better off querying the API and then adding the (three?) lines to your network configuration file (/etc/network/interfaces for Debuntu, for example). Pretty straight forward.

http://www.linode.com/api/linode/linode.ip.addprivate
(boot your Linode)
http://www.linode.com/api/linode/linode.ip.list

-Chris


Top
   
PostPosted: Sun Sep 16, 2012 12:03 pm 
Offline
Newbie

Joined: Sun Sep 16, 2012 11:18 am
Posts: 3
DHCP - Gotcha, makes sense, that would definitely get pretty messy and fast! :-)

OnBoot helpers - Ah, I see. Is the code for these available anywhere that I could take a look at (either on the Linodes themselves and/or via GitHub or similar) perhaps? I'd definitely be interested in seeing it added [or contributing it myself] especially since it seems like it'd be somewhat straight-forward to add. I'd also be curious if something similar could be added to auto-mount additional disk images that are attached to a Linode at boot time. Obviously the latter concern is pretty small, and is very easily automated around as-is, but seems like another semi-easy addition that would possibly be quite helpful & useful for much of the Linode user base.

API - Yep, that's the route I'm probably going to go down, appreciate the guidance & confirmation. We're already making some similar calls for automated deployment via Capistrano which is configured to dynamically lookup the 'server pool' and deploy the appropriate code / configs to each server in the pool based on its role. Will likely do something similar here as well. :-)

Thanks again for the [super fast] replies on such an old thread, very much appreciated!

FWIW, I'm continually impressed by Linode - basically nothing to complain about - you guys have really surpassed my expectations all around (and my hopes / expectations began quite high)!

Thank you!


Top
   
PostPosted: Mon Sep 17, 2012 3:26 am 
Offline
Senior Member

Joined: Sat May 03, 2008 4:01 pm
Posts: 567
Website: http://www.mattnordhoff.com/
ArthurDAntonioIII,

In case you don't know, intra-data center IPv6 traffic is free, just like traffic over IPv4 private IPs. And a node's (first) IPv6 address comes up automatically via SLAAC, similarly to how DHCP is used for your primary IPv4 address. So if all of your software supports IPv6, you can switch to it and avoid IPv4 private IPs and the configuration hassle.

Remember, this doesn't mean you have to force your users to use IPv6, or even expose it to them at all. I just mean using it for your backend traffic. (This assumes you aren't actually providing public services to other Linode customers over the private network, I guess.)

Edit: Copy editing.

_________________
Matt Nordhoff (aka Peng on IRC)


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


Who is online

Users browsing this forum: No registered users and 1 guest


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