About a year ago, I wrote a small python script to automate installing and bootstrapping CFEngine on virtual machines in AWS. It had some hard coded IP addresses that I needed to update when I spawned new hosts, but other than that, it worked well. During manual testing, it saved me a lot of time instead of having to do things manually. Deploying CFEngine normally consists of these steps:
Determine what CFEngine package to use. Download appropriate package if you haven’t already - curl. Copy the package to the host - scp. Log into the host - ssh. Install the package - rpm / dpkg. Bootstrap CFEngine - cf-agent -B. At a company hackathon I decided to make my script into something better, something that would be useful to my colleagues, and maybe even CFEngine users in general. Enter cf-remote.
cf-runagent is a component for triggering remote agent runs using the CFEngine network protocol. It does not allow for arbitrary commands to be executed, but rather asks the remote host to run the policy it already has. To trigger cf-runagent from other systems or web interfaces, you want to be able to run it as non-root.
Install and bootstrap I will use cf-remote to set up a demo hub running CFEngine Enterprise 3.12.1:
CFEngine no longer supports the conversion tool for upgrades from CFEngine version 2 to 3. Manual intervention was still needed after its usage, and a simple, direct translation can be a poor choice that misses the opportunity for improvement. We recommend following the Upgrading from CFEngine 2 to 3 guide, alternatively in combination with Professional Services from CFEngine to provide a ‘best effort’ conversion.
CFEngines 1 & 2 CFE3 Community Core CFE Nova World-wide deployment Consistent extensible syntax Introducing Knowledge Management Technology leader Enhanced configuration modelling Scalable reporting Brought convergent repair Lists, patterns, methods Native windows support User extensible without scripts SQL, LDAP integration Fault tolerance features CFDB searchable knowledge bank Generalized package model Spreadsheet model for content driven policies Simplified installation and upgrade Packaging Product integration Support