简体   繁体   English

流动供应和版本控制

[英]Vagrant provisioning and version control

I've created a basic LAMP stack for my Vagrant box using Anisible. 我使用Anisible为我的Vagrant盒子创建了一个基本的LAMP堆栈。 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? Vagrant为每个项目推荐一个Vagrant文​​件,而不是问题,但是配置资源,剧本,主机等等呢? I'm pretty sure they shouldn't be committed to that projects Git repo, so what do I do with them? 我很确定他们不应该致力于那些项目Git repo,那么我该如何处理呢?

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? 如果是这种情况,我是否应该包括Vagrant文​​件或者我错过了什么?

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? 进一步考虑子模块的想法,从这个repo创建项目特定的分支并将它们克隆为子模块或者我是以错误的方式看待它是否有意义?

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 . 查看Github repos for AnisibleChefPuppet The files are all there for their vagrant boxes per project. 这些文件都是针对每个项目的流浪盒。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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