Sunday, June 10, 2012

A quick note on ColdFusion configuration, XML files, and dependability

There is a wonderful set of files packaged with ColdFusion that you may or may not be aware of. Heck, you may have never even poked behind the scenes of what makes ColdFusion tick before but, if you haven't, you really should because these files _are_ important and they control a whole lot of settings you use on a day-to-day basis. I'm going to briefly cover what each file is, what it controls, and how you can use these files to do a number of things, from ensuring disaster recover-ability, to environment specific deployments.

So what files are these?
There is a group of files called neo-*.xml that are responsible for a lot of your CF server's settings. For CF 8/9 (C:\JRun4\servers\#server#\cfusion-ear\cfusion-war\WEB-INF\cfusion\lib) for CF 10 (C:\ColdFusion10\#server#\lib).  NOTE: These paths change depending on server, install type, version, etc...

I'm only going to cover some of the more important one's here, but feel free to explore them yourself.

  • neo-clientstore.xml - This covers your client variables such as Registry, Cookies, Etc...
  • neo-cron.xml - This is all your scheduled tasks.
  • neo-datasource.xml - This is all your database connections and settings.
  • neo-debug.xml - This is your debugger settings (ports, etc...).
  • neo-dotnet.xml - This is your dotnet and connector settings.
  • neo-drivers.xml - This is all your database JDBC drivers and settings.
  • neo-event.xml - This is your event gateways configuration.
  • neo-logging.xml - This is some base-level logging information.
  • neo-mail.xml - This is your mail settings.
  • neo-monitoring.xml - This is your server monitor settings.
  • neo-probe.xml - This is your probe settings. (If you haven't looked into using probes, you should do so. It's a handy way to measure the health of your server on the cheap.)
  • neo-runtime.xml - This is a big one. It covers custom tag paths, mappings, request settings, etc...
  • neo-search.xml - This is veritys config settings.
  • neo-security.xml - This is RDS security settings, etc...
  • neo-solr.xml - SOLR settings. ( `nuff said )
  • neo-xmlrpc.xml - This is web services, etc...
 I'm also going to mention two other files:
  • - This is your CF license info
  • - This is your admin password info (hashed, etc...)
Ok, so why are these files important and how can I use them?

How many times have you had to reinstall ColdFusion. Remember having to reconfigure all your data-sources, web services, etc...? If you back up your neo-*.xml files, you won't have to. Simply reinstall, stop the server, drop in your config files and restart! BOOM! Back up and running ^__^

Or, if you have different data-sources etc, between dev environments, store a copy of your neo-*.xml files and replace the hard-coded settings with variables and simply replace during your build/deployment process. Now you can dynamically configure new CF instances on the fly!

The possibilities are numerous. If nothing else, these are files to be aware of because this is where all your config settings are taking place.

No comments:

Post a Comment

Follow by Email