audiolize / vagrant-softlayer

This is a Vagrant plugin that adds a SoftLayer provider to Vagrant, allowing Vagrant to control and provision SoftLayer CCI instances.
MIT License
42 stars 15 forks source link

Get public/local ips for vagrant instances #18

Closed marianormuro closed 10 years ago

marianormuro commented 10 years ago

Hi, qq question. Is there by any chance a way to pull the ips assigned by softlayer to an instance? We are using the vagrant plugin to setup hadoop clusters and we need to update the /etc/hosts files with this info. It would be great if we could do it when the machines are being provisioned. If the feature is possible, but not implemented we would be happy to contribute.

Cheers, M

lonniev commented 10 years ago

Related to this (perhaps) is advice on how to set up the port forwarding tunnels from localhost to the SL-deployed vagrant VM.

I expect to have to open ports on the SL control panel but there are several config.vm.network options in the SL-ized Vagrantfile that suggest this might be programmable.

On Wed, Jul 30, 2014 at 2:55 PM, Mariano Rodriguez Muro < notifications@github.com> wrote:

Hi, qq question. Is there by any chance a way to pull the ips assigned by softlayer to an instance? We are using the vagrant plugin to setup hadoop clusters and we need to update the /etc/hosts files with this info. It would be great if we could do it when the machines are being provisioned. If the feature is possible, but not implemented we would be happy to contribute.

Cheers, M

— Reply to this email directly or view it on GitHub https://github.com/audiolize/vagrant-softlayer/issues/18.

ju2wheels commented 10 years ago

@lonniev The standard upstream vagrant doc on port forwarding should apply for this case and work ok though I havent tested myself. If you find otherwise please open a separate issue. It should apply the port forward to the IP used for provisioning automatically.

lonniev commented 10 years ago

Julio,

Ok, I will do the due diligence to see what is blocking my “just try it” quick test. I spotted the SL port range config parameter, thought that might be relevant (for a port 3030 outside the 2200~ region), tried the typical :forward_port, and had no success. A direct browse to :3030 did work. So, I figure that my config is fouled up.

On Wed, Jul 30, 2014 at 3:50 PM, Julio Lajara notifications@github.com wrote:

@lonniev https://github.com/lonniev The standard upstream vagrant doc on port forwarding http://docs.vagrantup.com/v2/networking/index.html should apply for this case and work ok though I havent tested myself. If you find otherwise please open a separate issue. It should apply the port forward to the IP used for provisioning automatically.

— Reply to this email directly or view it on GitHub https://github.com/audiolize/vagrant-softlayer/issues/18#issuecomment-50685229 .

ju2wheels commented 10 years ago

@marianormuro Im not aware of any way to pass get it within Vagrant as its all internal, unless @emyl knows a way, my guess would be the only way to retrieve it on the actual box for provisioning with a config manager or script is to tap the SL API from the actual box.

ju2wheels commented 10 years ago

@lonniev : I stand corrected, based on what I find ssh port forwarding is not implemented nor is it available for any cloud provider that ive found and is only available for the VirtualBox provider as its implementation is tied to the use of the VirtualBox NAT.

lonniev commented 10 years ago

ok, I don’t really need it but it’s a cool feature of the local VirtualBox vagrants and I thought I’d try it on the SL ones. Thank you for sparing me the research.

On Wed, Jul 30, 2014 at 7:59 PM, Julio Lajara notifications@github.com wrote:

@lonniev https://github.com/lonniev : I stand corrected, based on what I find ssh port forwarding is not implemented nor is it available for any cloud provider that ive found and is only available for the VirtualBox provider as its implementation is tied to the use of the VirtualBox NAT.

— Reply to this email directly or view it on GitHub https://github.com/audiolize/vagrant-softlayer/issues/18#issuecomment-50704510 .

alexandersimeonov commented 10 years ago

@marianormuro Have you tried the vagrant-hostmanager plugin?

emyl commented 10 years ago

As @anac0nda has pointed out, a way to sort the issue out is to use vagrant-hostmanager. Another thing that come in my mind is provisioning serf onto machines and the use something like serf-hosts.