基于流浪的开发

I was just discovered Vagrant and i want to use it in my development. I just wanted to see how are some more experienced developers handing this.

I will assume on my local machine i will have a folder, say ~/server/, where i will keep all my projects (one in each folder), and each will contain a Vagrantfile.

Questions:

  • GIT: do i install the git on my machine and make the pushing/pulling locally, or put it on the vm for each project and run those from there?
  • DB: the database will obviously go into the vm for each project, but how will i be able to easily modify them? Should i install phpmyadmin or a tool like that on each vm?
  • what is the best way to access the vms in the browser? Do i assign each of them a different IP and then add a record into my /etc/hosts?

I'm just starting out with Vagrant, so there are probably questions i have that didn't even popped into my head yet, so any other suggestions you could give me that you think are important for this will be very useful to me.

Thanks in advance for the answers.

  • GIT: In my opinion, you should install git and setup repositories via vagrant provisioning on each VM, and after that you can create git hooks on your local machine that will update the code on each VM on local commit.
  • DB: You don't need to install phpmyadmin on vms. You can easily modify DB (I am assuming, you want to modify records) via DB client installed on your local machine (preferred) or you can also use local machine's phpmyadmin with remote connection.
  • Yes, you can do that.