sudip
sudip

Reputation: 2860

Existing GIT repo with vagrant file

I just started using Vagrant. Now, One of my clients shared a GIT repo with the following files & directories :

Vagrantfile (file)

Vagrant (directory)

Now, I don't understand what will be my next step ? Every resource in the internet assumes that I am creating a new box from scratch (vagrant init hashicorp/precise64). But, here I need to match the box environment that is shared with me.

Thanks.

Upvotes: 0

Views: 1218

Answers (2)

Alex Mulchinock
Alex Mulchinock

Reputation: 2269

As stated in the previous answers - download the repository, and enter (cd via command line) the directory.

Once in there - you should just be able to run vagrant up to initiate the download and configuration of the vagrant box. Your client will (in theory) have set up the Vagrantfile to configure the machine appropriately.

Note: It might be worth checking to see if they have specified a hostname for the box [i.e mynewproject.dev] (found in Vagrantfile or sometimes, in a .yaml configuration file (i.e site.yaml).

If they have - it would be worth updating your hosts file to make sure you can use the host name locally.

Upvotes: 1

Frederic Henri
Frederic Henri

Reputation: 53793

The Vagrantfile will described everything about the VM you will build, so it knows about the vagrant box to use, you will have something like

Vagrant.configure("2") do
  ....
  config.box = "hashicorp/precise64"
  ...
end

If the box is available freely on Atlas (such as hashicorp/precise64) vagrant will download the box and spin a new VM. If the box is not freely available, you will need to install yourself with vagrant box add

Upvotes: 1

Related Questions