Vagrant shared team access

1

Scenario:

  • Two machines (A and B), both on the same local network and with vagrant and virtualbox installed. One is Windows and another is Mac
  • On machine A I have a box homestead (laravel / homestead) with all my ambience.

Problem

I need machine B to access the folders and box URL of machine A. Here's what I've tried to do and it does not answer:

  • vagrant share --ssh. It does not answer why it falls after one hour
  • vagrant package and publish the environment.
    • It does not answer why I do not want other developers having to upload each one a box on their own machines
  • Copy the vagrantfile ie the environment for the other machines and give a vagrant up.
    • Do not answer the reason above

Below is a detailed look at what I've done.

Solution - SHARE --SSH

Running these 3 commands according to the documentation I was able to achieve the goal:

In sumo:

Machine A:

vagrant login
vagrant share --ssh

Machine B:

vagrant connect --ssh 

Everything went well. But this solution does not answer me because the connection drops after an hour as documented: security share

Solution - Package or copy environment Vagrantfile

The solutions through the box publishing in the hashicorp

vagrant package

or by copying the environment (vagrantfile) to give

vagrant up # na máquina B

They also do not answer.

Suggestions

Does anyone have any suggestions to help me?

I would like to leave machine A always on so that machine B, C or D of the developers can access it through an IP or something like that.

I wonder if I can do this through Private_network or Public_network of vagrantfile?

Someone who knows these features and who has already done something similar can help me, please.

Thanks guys.

    
asked by anonymous 23.09.2016 / 20:39

1 answer

0

So, just use a private network ("private_network") and a public key to access via SSH. For this, you would write in Vagrantfile:

config.vm.network :private_network, ip: "58.147.128.0"

On the machine that will be accessed, it is necessary to add the public key of the machines that will access it in the ~ / .ssh / authorized_keys file. This is a form of authentication, you could also use a username and password, but I find the use of the public key more secure by not exposing credentials. Some ways to configure remote access to a linux server are in article

    
25.09.2016 / 18:19