简体   繁体   中英

Vagrant provisioning and version control

I've created a basic LAMP stack for my Vagrant box using Anisible. It's all working fine, etc and now I want members of my team to use the same box.

Vagrant recommends one Vagrant file per project, not a problem, but what about the provision resources, the playbooks, hosts, etc? I'm pretty sure they shouldn't be committed to that projects Git repo, so what do I do with them?

Do I commit them to a separate repo and simply clone them as a submodule? If that's the case, should I include the Vagrant file as well or am I missing something?

Taking the submodule idea further, would it makes sense to create project-specific branches off this repo and clone them as a submodule or am I looking at this the wrong way?

Commit everything you need to bring up your box(es) for that project. You can easily copy and paste files from one project to another for reuse (or make a general repo) but the general idea would be that once they are committed to a project then all the developers needs to do is pull that project and vagrant up. If there are any mid-development changes, they can pull down again and vagrant provision and are current. That is the whole idea.

Check out the Github repos for Anisible , Chef and Puppet . The files are all there for their vagrant boxes per project.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM