I hate config files. There, I said it. Made a change to your configuration? Database? Temp location? Gotta redeploy your application. Even if you have an awesome deployment mechanism it just seems somehow wrong to have to redeploy your app to make a configuration change. From a security standpoint, I don’t particularly like having passwords and such being stored in a source repository. Or making it part of your build process. Or manually editing files in production.
I want my configuration to be discoverable. In other words, the only part of the deployment process that has configuration information is the information needed to discover your configuration.
I’m doing some work again (finally!) on a really cool cloud example. But one of the things I had noticed was that every time I redeployed the app I needed to script out changing some discoverable endpoints. For example, if a queue has a load balancer in front of it, that load balancer name/IP may have changed. Having that extra level of deployment in there really bugged me. Some may say “with continuous deployment you don’t have to worry about that!” Oh yeah? What are you doing making your production environment available to your testing environment? Production settings, by definition, should not be testable in any other environment other than production and you generally shouldn’t be testing in a production environment.
One of the big tenets of building a scalable application is being able to discover resources. Who knows where information lies in a large scale system? Now, PHP developers may say “it’s never been a problem before!”. To which I would reply, “that’s the only way you’ve ever done it.” In other words, having an easy way to manage configuration options and application resources are things that most PHP developers have not really done. I take that back, I have seen it done, but it’s done by figuring out what the local configuration file says about those app resources and configs.
That’s it. Just ranting. Kinduv. But seriously, I do think we need to handle configuration and resources in a better way.
Comments
Nils Luxton
I’m inclined to agree with you here, I find config files a PITA. Have you seen any good alternatives (perhaps from other languages?) that sparked this rant? Or is this more of a “feeler post” awaiting some good suggestions in the comments?
I’m looking forward to hearing what people say.
I really like the new blog layout btw and agree with your reasons for choosing WordPress!
admin
It was a bit of a rant but I have an idea in my head of what I want to do.