ncf is a configuration framework written in pure CFEngine, started in 2013, with the aim of providing reusable, single purpose high-level components to help structure your CFEngine policy. It also comes with a web interface easily edit configuration policies.
During this talk, we will first briefly present recent improvements in the ncf 1.0 release. Then we will focus on how to setup ncf from scratch and how you can integrate it gradually into your CFEngine policy and what benefits it can bring.
About Alexis Mousset
Alexis Mousset is a Rudder developer and contributor to CFEngine since 2015. He works for Normation.
About Benoît Peccatte
Benoit Peccatte is a Rudder developer, the open source IT automation and compliance tool, employed by Normation. He worked as a developer for several years before returning to his preferred field of system administration, where he has been almost exclusively using and hacking open source tools for the past 8 years. He is now combining these two experiences to improve Rudder (http://www.rudder-project.org).
This talk was given at Configuration Management Camp 2016.
2. 2
1.Presentation
2.What's new in ncf
3.Setup ncf
4.Using ncf with existing CFEngine code
Using ncf building blocks to
help writing CFEngine policies
3. Who are we ?
●
Sysadmin
●
Rudder and ncf team
●
CFEngine contributor
Alexis Mousset
4. Who are we ?
●
Sysadmin
●
Developper
●
Rudder and ncf team
●
CFEngine trainer
●
CFEngine Champion
Benoît Peccatte
5. What is ncf ?
● ncf is a CFEngine framework
● It means whatever you like, from “new
CFEngine framework” to “notre code
fonctionne” (“our code works” in French)
http://www.ncf.io/
#ncf on freenode
10. 10
1.Presentation
2.What's new in ncf
3.Setup ncf
4.Using ncf with existing CFEngine code
Using ncf building blocks to
help writing CFEngine policies
11. ncf is now in version 1.0
●
Support Solaris and AIX
●
Group and user management
●
Variable definition
●
Conditions
●
Command_execution_result
●
Unique class prefix (needs cfengine patch)
●
Drag'n'drop
19. 19
1.Presentation
2.What's new in ncf
3.Setup ncf
4.Using ncf with existing CFEngine code
Using ncf building blocks to
help writing CFEngine policies
20. Setup ncf from scratch
●
Follow the quickstart on ncf.io
●
Install cfengine-community package
●
Install ncf package
●
Copy ncf tree into CFEngine inputs
22. Setup ncf from scratch
●
You can use the promises.cf provided by ncf
●
Or write your own as we will see later
23. 23
1.Presentation
2.What's new in ncf
3.Setup ncf
4.Using ncf with existing CFEngine code
Using ncf building blocks to
help writing CFEngine policies
24. Integration with CFEngine
●
Loading ncf from your existing promises.cf
●
Copy the bundles :
●
bundle common inputs
●
bundle common me
●
bundle common configuration
●
Merge inputs and the bundle sequence
25. Integration with CFEngine
●
Now let's enhance your existing code with ncf
●
Reduce the number of lines
●
Enhance readability
●
Have configurable reporting for free
●
Use standardized and predictible class names
●
Keep compatibility with CFEngine 3.5
32. Integration with CFEngine
Logger:
● ncf automatically creates reports
● The output formatting is configured using loggers
● Loggers are configurable and pluggable
● Loglevel can be changed from the command line