Would Puppet or Chef be used to set up a slave database?
Would the tasks required in configuring and deploying a slave database be tasks that Chef or Puppet would cover? Would I have, say, Puppet, adding the host configuration fo开发者_JS百科r the new slave to my master node and restarting the MySQL process?
You can definitely use Puppet to manage the configuration of your database servers. The file, package,service design pattern comes in extremely useful in situations like this. The package is required to be installed, the service is set to be running and requiries the package (mysql-server perhaps), and the configuration file is served up using Puppet's fileserver module, as well as set to notify the service. That way, when you want to add the new slave to the master's config file, and it is refreshed via puppet, the mysqld service will restart with the new config. If you keep the whole thing in svn then you have a great way to track configuration changes.
This is a great explanation as well.
The general answer to your question, and I am sure other puppet administrators can disagree, is that server side/OS level configurations such as service configuration files and package installation, are the realm of Puppet. Application code that is "deployed" is for some other deployment situation. Database configuration is definitely in the former class.
Hope that helps.
精彩评论