Search code examples
coldfusionwddx

Methods to automate ColdFusion Administrator settings


When working with a ColdFusion server you can access the CFIDE/administrator to set config values, which update the cfusion/lib/ xml files (e.g. neo-runtime.xml, neo-mail.xml, etc.)

I'd like to automate a deployment process that includes setting these administrator values so that I don't have to log in and manually set them for each new box that shares settings. I'm unsure of the best way to go about it.

Some thoughts I had are:

  1. Replacing the full files with ones containing my custom settings. I've done this for local development, but it may not be an ideal method due to CF hot-fixes potentially adding/removing/changing attributes.
  2. A script to read the wddx xml file and replace the attribute values. I'm having trouble finding information about how to do this method.

Has anyone done anything like this before? Or does anyone have any recommendations on how to best go about this?


Solution

  • There is a very usefull tool developed by Ortus Solutions for this kind of automatizations called cfconfig that can be installed with their commandbox command line utility. This tool isn't only capable of setting configurations of the administrator: It is also capable of exporting/importing settings to a json file (cfconfig.json). It might be what you need.

    Here is the link to their docs https://cfconfig.ortusbooks.com/introduction/getting-started-guide