I have the following setup:
- Many different projects which are separate git repositories, but all have mostly the same server configuration
- Each project in turn depends on many other projects and we use the composer dependency manager to get them together (PHP language here).
I want to use Vagrant and include a Vagrant file in each repository, so my team members can clone a repository, run vagrant up
and be ready to go.
My question is now directed towards the provisioning. I need to install several tools and packages like apache, git, mysql and several php packages, then download some files (like a recent development db dump), set everything up in /var/www and run the composer install command.
So one option to do this is using a manager using recipes like chef or puppet. The alternative would be to write a bash file and use shell provisioning.
I have not much experience with chef / puppet, so naturally, it seems easier to use the shell option, but I want to understand if this is not a good / viable option in the long run.
Why to me it seems a bad approach to go with puppet / chef:
I understand that I will have to use several different recipes and will almost always use the same recipes for my different repositories, so I would have to include all of them in all the repositories. Consider having 20 repos and needing 10 recipes, that means that I will need to add 200 recipes as a git-submodule or alike (also each team member needs to clone the repository, then clone 10 recipe repositories and only then run vagrant up for each project). In contrast, I would just need to have a small repo with my shell script and clone it 20 times.
I am probably missing something, so please advice whether I should opt for chef / puppet and why it makes sense even if my repositories all have a very similar server setup.