Monday, March 26, 2012

Opscode's Chef, MySQL, Best Practices

If Chef manages a CNF file, please have it put a comment in the top of the file that it is managed by Chef. Do not assume that everyone will believe that every file is being managed by Chef. In general, you should have Chef leave a comment in every file that it manages (and someone at Opscode should make this a default feature in Chef).

Do not have Chef reboot the database. Databases are designed to run for years at a time. Many parameters can be set while the databases is running in such a way that it does not need to be bounced in order to make the parameter work. There are exceptions to this in non-production environments.

Need to change the schema? Do not have the Chef create a table, and then do alter table after alter table to install a new system. This is very painful to watch.

* Thanks to Alex Howells for the idea of always putting a comment in the top of the Chef script.

No comments:

Post a Comment