vagrant-rackspace
vagrant-rackspace copied to clipboard
Multi-node IP Information
For multi-node setups, it would be useful if vagrant-rackspace can accommodate at least one of the following behaviors:
- Allow Vagrant to set the node IP address for private networks created\specified in the Vagrantfile
- Allow VMs in a multi-VM Vagrantfile to obtain each other's IP address (ex: configure /etc/hosts for a Puppet Master automatically on Puppet Agent hosts)
Is either option currently possible with vagrant-rackspace? If not, is there a workaround that anyone can share?
Quick-fix scenario would be for the user to output the IP address on a vm into a text file and "reverse rsync" it to the Vagrant user desktop to use with the VMs that get created it after it.
Alternatively, "vagrant ssh-config" is aware of each VM's IP address. If somehow this data could be used, that could also be helpful.
HI @VMTrooper,
It probably doesn't make sense for this plugin to do anything with /etc/hosts, but you should be able to use it along with other plugins that will manage that /etc/hosts or /etc/resolv for you. There's a bunch of possibilities - see [Local Domain Resolution](Local Domain Resolution) on the Available Vagrant Plugins list.
vagrant-hosts might be a good place to start. It has an autodetect/autoconfigure feature.
Let me know if you have any trouble using those plugins along with vagrant-rackspace.
Thanks,
Max
Thank you for the suggestions @maxlinc,
vagrant-hosts autodetect seems to rely on the IP being set by the network statement in the Vagrantfile.
If vagrant-hosts or some other plugin could collect this information from the vagrant ssh-config command after all VMs are provisioned and rsync it to the hosts, that would be more helpful for use with a cloud provider plugin like vagrant-rackspace.
Thanks, Trevor
@VMTrooper I poked around in the Rackspace API docs as well as the OpenStack docs and unfortunately I did not see a way to allocate a specific ip address so I believe option 1 is out.
As far as option 2, @maxlinc would probably know better than I do.
Let me see if I can follow up with a couple other people and see if I can't get you a better answer.
@VMTrooper sorry vagrant-hosts autodetect didn't do the trick.
It is definitely possible to get the info with plugins, and in fact vagrant ssh-config
itself is written as a plugin.
I think your best bet is to ask on the vagrant mailing list how others have setup puppetmaster on multi-node environments. It doesn't sound like a rackspace specific problem, so the broader vagrant community will probably have more answers. If you find a solution that works with virtualbox or other providers, but not on rackspace, let us know.
@krames thanks Kyle. something similar to what the vagrant-aws provider supports with private_ip_address
would be ideal. Perhaps using neutron port-create in the background somehow (or the nova-network equivalent)?
@maxlinc the problem is simple to solve with other providers that support private ip functionality like virtualbox, etc, and I have already done so. My ask is specific to vagrant-rackspace where it is not currently possible for the VMs to know each others IPs before the end of the Vagrantfile execution. The only hack I could think of would be storing the VM IP in a text file in /vagrant. However, rsync occurs only once and in the Vagrant desktop -> VM direction only.
@VMTrooper let me do a little more research into aws-vagrant. I might be able to add something comparable to vagrant-rackspace.
Thanks @krames! If a workaround/new feature for this is possible, it would make a perfect plugin even perfect-er.