CFConfig - a new way to manage your CF Engine config

By Brad Wood

Elevator Pitch

CFConfig is a new project that features a service layer wrapped in a CLI for managing your CF engine’s configs in an engine-agnostic manner. Just what you’ve been needing for cloud deployments, exporting, importing, and diffing configs. Even imports Adobe config into Lucee and vice versa!

Description

In this talk, we’ll learn about a new library that’s the answer you’ve been looking for if you’ve ever wanted to script out the complete setup of a server without manually copying XML files around. CFConfig is a command line library that is built on top of CommandBox so it can be run anywhere by hand or as part of an automated script. The CLI can be used for Vagrant or Docker provisioners or custom setup scripts. The pure service layer’s fluent API can be integrated into any CFML project for mashups outside of the CLI. We’ll dig into this new library, what is is, how to use it, and most importantly how to contribute back to the project if you want better support for a particular engine.

In a nutshell, this project can be used to read and write ColdFusion configuration from any version of any CF engine in a generic format that let’s you separate the setup of your servers from the actual installation. Here’s some examples:

  • Export config from a server as a backup
  • Import config to a server to speed/automate setup
  • Copy config from one server to another. Servers could even be different CF engines
  • Merge config from multiple servers together.
  • Facilitate the external management of any server’s settings without needing to log into the admin UI.

We’ll cover the generic JSON format that’s used and talk about how you can distribute your coded with a full generic set of configuration including CF mappings, datasources, custom tags, or request timeouts without needing to worry about what version of CF the end user is going to have. This tool is a must for anyone using Vagrant, Docker, local development environments, or just managing more than one server.

Notes

This library is a work in progress, but is currently running with Lucee 4/5 support and partial support for Adobe CF11 and 2016. I expect to have much more implemented by cf.O(). Everything in the readmes are working (in an alpha state) https://www.forgebox.io/view/commandbox-cfconfig https://www.forgebox.io/view/cfconfig-services