Hi all, I'm curious about what good practices people have developed for organizing their local configuration files, bundles, bodies, special files, etc. as well as naming conventions for bundles, bodies, variables, etc. to prevent conflicts with defaults. I checked www.cfwiki.org but it doesn't seem like that's seen much attention (other than from spammers) in a while.
Here are some thoughts I'm putting into my initial pilot implementation, but I'm always looking for approaches that may better suit my environment. I'm using the dg_ prefix since for things specific to my company. * Put all custom global classes and variables in a "dg" common bundle in dg_config.cf * Put all custom bundles for use in bundlesequence in dg_bundles.cf * Put all bodies and non-bundlesequence bundles in dg_library.cf, leaving library.cf untouched. These first two could grow quite large so I'm wondering if I should eventually find a logical way to split them into appropriate smaller, more manageable files. * Clear and descriptive names, e.g. bundle agent cleanup_cfengine_outputs_directory > Delete old files from /var/cfengine/outputs. bundle agent update_local_sudoers_file > Pull the latest sudoers file from a master server to a platform-dependent location. bundle agent create_solaris_globalzone_files > Create /usr/globalzone in all Solaris global zones that only contains $(sys.uqhost). body copy_from secure_copy_with_backup(filename, hostname) > Based on library.cf:secure_cp, retrieves a file, backing up the promised file first. bundle edit_line enforce_one_line_file > I don't like this name but I can't think of a better one. It ensures a single string > parameter is the only line in a file and is used by the above globalzone bundle. Under Consideration: * Prefix all custom bodies and bundles with dg_. Seems a little clunky but would enforce a "namespace". So please feel free to provide constructive criticism of my thoughts above and add other good practices you may have come up with. Thanks, Justin This electronic communication and any attachments may contain confidential and proprietary information of DigitalGlobe, Inc. If you are not the intended recipient, or an agent or employee responsible for delivering this communication to the intended recipient, or if you have received this communication in error, please do not print, copy, retransmit, disseminate or otherwise use the information. Please indicate to the sender that you have received this communication in error, and delete the copy you received. DigitalGlobe reserves the right to monitor any electronic communication sent or received by its employees, agents or representatives. _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine