Thursday, July 12, 2012

Opscode Chef running under bundler

I like to run chef-solo under bundler. It lets me hack on chef easily and brings all the benefits of gem management to my chef. That being said chef and bundler don't play well together. I finally got the gem_package resource and commands to work without the restrictions bundler imposes. I put this file in  the libraries directory of one of my cookbooks.

Thursday, July 08, 2010

Please seperate configuration from code

When configuration and code are managed together it means that I can't test old code because it's configuration no longer matches the current environment. It is extremely frustrating when my assignment is to find a performance regression.

I guess this supports the idea that even in small environments where you control everything, you should support discovery in your code. You shouldn't have to tell it everything. It should be able to find out most of what it needs from the environment itself.

Wednesday, June 30, 2010

Mysql replication

Today I was working on a master-master replication setup and I couldn't get the slave threads to work. I could connect between the servers with the mysql client, but the slave threads couldn't connect. I finally found that although you can set a long password for a mysql user, the mysql replication will silently truncate long passwords before it uses them to log into the master server. So you set the password to one thing and something shorter is actually used. I ended up using a 10 character password and that worked fine.