Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

howto make the valkyrie.local a public_network #57

Closed
niccolox opened this issue Apr 12, 2015 · 6 comments
Closed

howto make the valkyrie.local a public_network #57

niccolox opened this issue Apr 12, 2015 · 6 comments

Comments

@niccolox
Copy link

its super easy to make the default Valkyrie setup, i.e. valkyrie.local (using Avahi on Ubuntu Trusty behind a pfsense fw) to be available from the public network

i.e. no need to hack /etc/hosts and do port forwards

simply add a second network at the end of the Vagrantfile

  config.vm.network "public_network", bridge: "eth0"

end
end

and woila

it friggin works

I can now access the web ui for Valkyrie from other machines on my local network

@ergonlogic
Copy link
Member

We could add this to the Vagrantfile, disabled by default, with an option available in config.yml to enable it.

@MatthewHager
Copy link
Contributor

@niccolox: I think a PR with the line present but commented + a note in the README.md would be gladly accepted.

On a side note, we've been using http://docs.vagrantup.com/v2/share/ to show each other our websites and it works over the public internet. After doing vagrant share, you simply need to add the generated share URL to one of your sites (or aegir instance) as an alias and verify it.

@niccolox
Copy link
Author

I've just put 5 nics in an old desktop and installed pfsense and am building my local network (including a devops dmz)

I'll probably skip Vagrant Share, will do forwarding with pfsense to internet public static ip or if I feel brave use a local install of ngrok or localtunnel

I am building a Faraday cage (maybe) and a bunker (joke) also

@ergonlogic
Copy link
Member

This is pretty neat, at least for Linux hosts. It allows for Valkyrie-hosted sites to be accessed from the LAN with zero config, since DNS is being announced via Avahi. It opens the door to collisions though, so you'd probably have to make sure that you only have one host running a Valkyrie VM on the network.

To enable this functionality, just drop a file called config.yml in the root of your Valkyrie project with the following entry:

public_network: TRUE

Then run vagrant reload to have the VM bridged onto your LAN.

@niccolox
Copy link
Author

right, and I assume I could change config.yml to different valkyrie2.local as my Aegir empire expands

however, I find Avahi kind of sucks (its based on a mac protocol after all) and am adding http://xip.io/ to the list of alternatives to try

its suggested in Deis, which I am cranking up again

@ergonlogic
Copy link
Member

Running multiple Valkyrie VMs simultaneously is not supported. See: #46. This is a design decision, since it'd greatly complicate everything to support an edge case. I tripped over this rabbit hole in drush-vagrant.

Valkyrie is specifically intended to streamline local development. Valhalla (or whatever we end up calling the production end of Valkyrie) will be required for something like that.

Avahi actually works quite nicely for me. We add aliases in Valkyrie to be in the .local domain. So example.com gets a example-con.local alias broadcast by Avahi. We also write this into the local Drush alias that we generate, so that running drush @example-com uli works properly.

While xip.io is interesting, I don't have any plans to support for the time-being.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants