I have several different servers used for different purposes. Everyone use mysql, but it should be configured a little bit different. => Different users, different databases.
I have a cookbook that installes mysql.
The question is, where should I put the scripts that create databases and users for mysql?
Sould it be:
- One script for every server(role) inside mysql cookbook? (This way different configs for 1 server will be in different cookbooks)
- Create a cookbook for every role, where I concatenate all the special configurations concerning this role. (This way different configs for 1 server will be in 1 particular place, but we will have 1 additional cookbook)
I personally think the #1 is better, as we join the different cookbooks under I role anyway.
Edit
It does not concern only databases. For example, I have some applications that require tomcats/jetties/other containers to be installed and configured differently (different ports, different modules enabled). Where different versions of settings.xml/jetty.xml etc. should be stored? In cookbook that
- installs tomcat or
- that installs other application, that requires tomcat?