Show posts by author:
Nick Anderson

Show notes: The agent is in - Episode 32 - Fireside chat w/ Mike Weilgart

Curious about how users feel about using CFEngine? Cody and Nick are joined by Mike Weilgart, a long time CFEngine user about his history and how CFEngine compares to other tools he has been using recently. Video The video recording is available on YouTube: At the end of every webinar, we stop the recording for a nice and relaxed, off-the-record chat with attendees. Join the next webinar to not miss this discussion.

Posted by Nick Anderson
December 28, 2023

Show notes: The agent is in - Episode 31 - Sneak peek of CFEngine 3.23

Join the team for a sneak peek of what’s coming in 3.23.0. Herman joins Cody, Craig and Nick to discuss what’s new in the upcoming release of CFEngine 3.23.0. We look at improvements to Groups in Mission Portal with easier ways to specify specific hosts that should or should not be part of the group based on reported attributes. This new functionality makes it much easier to affect change across a set of hosts without touching policy.

Posted by Nick Anderson
November 30, 2023

Change in behavior: ignore_interfaces.rx prefers a new location

ignore_interfaces.rx can be populated with regular expressions that match network interface names. When an interface matches CFEngine will ignore the interface. In the upcoming release of 3.23.0, and in the future release of 3.21.4 there is a change in behavior with respect to the preferred location of ignore_interfaces.rx from $(sys.inputdir) (typically /var/cfengine/inputs) to $(sys.workdir) (typically /var/cfengine). The change from $(sys.inputdir) to $(sys.workdir) makes it easier to ignore different interfaces on different hosts.

Posted by Nick Anderson
November 16, 2023

Change in behavior: self upgrade now defaults to hub binary version

In the upcoming release of 3.23.0, there is a change in behavior with respect to the self upgrade policy. Beginning with 3.23.0 the self upgrade policy will default to the binary version that is running on the hub instead of the version of the policy framework that is executing. When upgrading CFEngine1 there are three major steps: Upgrade the Masterfiles Policy Framework (MPF) Upgrade the hub binaries Upgrade the client binaries Generally it’s desirable that the MPF version is equal to or greater than the hub binary version and the hub binary version is equal to or greater than the client binary version. This way the policy has necessary knowledge in place prior to a binary upgrade where behavior may change.

Posted by Nick Anderson
November 15, 2023

Show notes: The agent is in - Episode 30 - Profiling CFEngine policy

Imagine having the power to identify the exact lines of your CFEngine policy that are slowing down your executions. In this episode, we’ll guide you through the art of profiling CFEngine policy for improved performance. In Episode 30 of “The agent is in,” Nick and team dives into the topic of profiling CFEngine policy. We explore tools and techniques to identify performance bottlenecks and optimize CFEngine deployments. The episode covers the following main points:

Posted by Nick Anderson
October 19, 2023

Show notes: The agent is in - Episode 29 - Basic Docker inventory with CFEngine

Ever been curious about Docker details or the cruft that has built up and could be cleared out? Craig, Cody, and Nick chat about some of the work Craig has been doing recently, using Docker in development and CI. Craig shows how to develop policy to inventory various Docker details like image names, counts of dangling images, and reclaimable disk space. Video The video recording is available on YouTube: At the end of every webinar, we stop the recording for a nice and relaxed, off-the-record chat with attendees. Join the next webinar to not miss this discussion.

Posted by Nick Anderson
September 28, 2023

Show notes: The agent is in - Episode 28 - Automating CFEngine policy testing

Have you been interested in automating the testing of your CFEngine policy? Cody, Craig and Nick follow up on the Policy Examples episode and dive a bit deeper into testing. Nick walks through some policy and related tests that leverage lib/testing.cf from the Masterfiles Policy Framework and Craig walks through implementing a GitHub Workflow to run the tests in a Docker container for each Pull Request. Video The video recording is available on YouTube:

Posted by Nick Anderson
August 31, 2023

How can I get a list of specific key values from an array of objects in JSON?

This question was covered in The agent is in, Episode 27 - CFEngine Q&A: Policy questions. Given the following JSON, how can I get a list containing just the values of name? [ { "name": "Aurora", "description": "Illuminating" }, { "name": "Orion", "description": "Stellar" }, { "name": "Luna", "description": "Serene" }, { "name": "Phoenix", "description": "Resilient" }, { "name": "Atlas", "description": "Strong" } ] Using maparray() The most concise and direct way to achieve something like this is to use the maparray() function. It iterates over a list or data container applying a pattern based on $(this.k) and $(this.v) of the currently iterated element to produce a list.

Posted by Nick Anderson
July 27, 2023

How can I test CFEngine policy?

This question was covered in The agent is in, Episode 27 - CFEngine Q&A: Policy questions. Testing is an important part of the software life-cycle. Writing tests for your CFEngine policy can help to bring improved assurance that your policy behaves as expected. Follow along and write your first test policy. Test stages When writing tests there are three or four basic stages that typically need to be handled. Initialization - Set up the necessary conditions for the test, e.g. create some files to be edited. Testing - Running the policy whose behavior you wish to test. Checking - Inspecting the results of the test policy to see if they conform with expectations. Cleanup - You might need to cleanup artifacts produced by the test if your testing system does not handle it for you. These stages map well to a sequence of bundles. So, a simple test template could look like this:

Posted by Nick Anderson
July 27, 2023

Show notes: The agent is in - Episode 27 - CFEngine Q&A: Policy questions

Unlock the power of CFEngine with expert insights and get your burning policy questions. Cody, Craig and Nick discuss and answer CFEngine policy questions submitted by users. Video The video recording is available on YouTube: At the end of every webinar, we stop the recording for a nice and relaxed, off-the-record chat with attendees. Join the next webinar to not miss this discussion.

Posted by Nick Anderson
July 27, 2023