on vagrant documentation you need multi machine and port forward
https://www.vagrantup.com/docs/multi-machine/
https://www.vagrantup.com/docs/networking/forwarded_ports.html
ie
Vagrant.configure("2") do |config|
config.vm.provision "shell", inline: "echo Hello"
config.vm.define "web" do |web|
web.vm.box = "apache"
web.vm.network "forwarded_port", guest: 80, host: 8080
end config.vm.define "db" do |db| db.vm.box = "mysql" end end
On Tue, Nov 15, 2016 at 9:48 PM, Tomek Rabczak <[email protected]> wrote:
> Hi,
>
> I'm trying to configure a multi-machine environment in which one master VM
> has a redis process running on it. I'd like to setup port forwarding
> between one master machine and potentially multiple slave machines.
> Normally I'd accomplish this by running `ssh -R 127.0.0.1:6379:
> 127.0.0.1:6379 user@master` on each slave machine. Is there a way to set
> this up through the vagrantfile. Is that the best/correct way to accomplish
> something like this?
>
> Thanks,
> Tomek
>
> --
> This mailing list is governed under the HashiCorp Community Guidelines -
> https://www.hashicorp.com/community-guidelines.html. Behavior in
> violation of those guidelines may result in your removal from this mailing
> list.
>
> GitHub Issues: https://github.com/mitchellh/vagrant/issues
> IRC: #vagrant on Freenode
> ---
> You received this message because you are subscribed to the Google Groups
> "Vagrant" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/vagrant-up/3bbe6a00-449e-4074-aee4-4fabfec9a9ff%40googlegroups.com
> <https://groups.google.com/d/msgid/vagrant-up/3bbe6a00-449e-4074-aee4-4fabfec9a9ff%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
--
Alvaro
--
This mailing list is governed under the HashiCorp Community Guidelines -
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of
those guidelines may result in your removal from this mailing list.
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups
"Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vagrant-up/CAHqq0ewbKAG0vWp6b7xbTHzsmnjz2YM0Na6frZBejs1wfME3mQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.