SlideShare uma empresa Scribd logo
1 de 20
Baixar para ler offline
CFEngine 3

                            Code Freeze 2012
                                      Jan 12, 2012
                                      Brian Repko
       http://www.learnthinkcode.com
Copyright 2011 LearnThinkCode, Inc.
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License
Agenda
●
    Introduction to CFEngine
          ●
              What it is
          ●
              How it works
●
    Examples
●
    New Machine Setup
●
    CFEngine vs Chef vs Puppet




       Copyright 2011 LearnThinkCode, Inc.
       This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License
IANAS (sysadmin)
●
    My role has been as a developer / architect
    working with sysadmins to deploy our
    applications
●
    When automated, we have used cfengine
●
    This presentation will use cfengine
    configuration from Entagen (triplemap.com)
    for our examples
●
    Thanks to Frans Lawaetz!


      Copyright 2011 LearnThinkCode, Inc.
      This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License
CFEngine
●   Systems Maintenance Tool
       ●   Configures and automates large-scale IT infrastructure
       ●   Ensures the availability, security and compliance of systems and
            applications
●   Created by Mark Burgess (Ph.D in Theoretical Physics)
       ●   CFEngine 1 – released in 1993 (at Oslo University / post-doc)
       ●   CFEngine 2 – released in 1998 (Computer Immunology)
       ●   CFEngine 3 – released in 2008 (Promise Theory)
●   Two editions – Community (FOSS) and Nova (commercial)
       ●   Nova has portal, reporting, native MS Mac/Windows mgmt, high-
            availability, virtualization, KM, commercial support
●   Written in C, runs on all types of systems including mobile, tablet
    and embedded systems
●   Tons of low-level functions and action configurations to reuse
           Copyright 2011 LearnThinkCode, Inc.
           This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License
Who uses it




   Copyright 2011 LearnThinkCode, Inc.
   This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License
Components
●   cf-execd
       ●   Cron-like lightweight daemon that runs cf-agent (default is every 5 minutes)
       ●   More sophisticated than cron (randomness, fail-safe operation, time exclusions)
●   cf-agent
       ●   The main component that does the system automation and maintenance (maintaining promises)
       ●   Runs cf-promises (another executable) to validate bundles/promise syntax
●   cf-serverd
       ●   Distributes policy and data files (cf-agent pulls from cf-serverd)
●   Hubs (Nova only), Servers and Clients
       ●   Can run standalone as well
       ●   All systems run the same configuration policies (Hubs/Servers are Clients too!)
       ●   Top-level system(s) get their files from version control (please say yes)
●   Promises (statements)
       ●   Describes the desired state of some aspect of a system (file, process, package...)
●   Bundles (collections of promises, aka policies)
       ●   promises.cf as bootstrap policy – says what other bundles to execute
●   Variables and Classes (CFEngine defined and User defined)
       ●   Classes are booleans that allow control over which promises are executed and when

             Copyright 2011 LearnThinkCode, Inc.
             This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License
Bundles
●   Bundles are typically designed to target a particular set of systems
    and/or a particular objective
●   Bundles have a type (which executable) and name
       ●   “common” is for all executables
       ●   Each bundle type has a control (configuration) promise body
●   Each bundle is run three times in order to get each promise fulfilled
    (convergence)
●   Bundles have sections (“promise type”) whose order is fixed based
    on the executable
●   promises.cf, failsafe.cf and update.cf are “standard”
●   cfengine_stdlib.cf has lots of the low level functionality
●   The “common control body” specifies the files to process and the
    bundle sequence – specified in promises.cf (or standalone files)


           Copyright 2011 LearnThinkCode, Inc.
           This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License
Bundles
●   Bundle promise type order (for agent)
       ●   vars – define variables
       ●   classes – define classes
       ●   outputs – (Nova) data collection
       ●   interfaces – network interfaces
       ●   files – files and file contents
       ●   packages – packages / libraries to install / uninstall
       ●   environments – (Nova) virtualization
       ●   methods – process other bundles
       ●   processes – processes that should / should not be running
       ●   services – collections of processes
       ●   commands – commands to execute
       ●   storage – disks and filesystems
       ●   databases – (Nova) LDAP, SQL and Windows Registry
       ●   reports – reporting on cfengine state

       Copyright 2011 LearnThinkCode, Inc.
       This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License
Variables and Classes
●   Variables
       ●    Special Variables (CFEngine defined)
       ●    Scalar types - string, int, real
       ●    List types - slist, ilist, rlist
       ●    Scalar expression ${var}, List expression @{var}
       ●    Scalar expression of a list is a loop / for-each
●   Classes
       ●    Booleans that guard promises
       ●    CFEngine-defined (aka hard) Classes
       ●    User-defined (aka soft) Classes
       ●    Often set by using built-in functions
       ●    Can also be defined by promise repair or failure
       ●    Combined with not ('!'), and ('.' or '&'), or ('|' or '||')
           Copyright 2011 LearnThinkCode, Inc.
           This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License
Promises
●   Within its promise type
    class-expression::
            “promiser” [→ {“promisee1”,...}]
                         attr1 => value1,
                         attr2 => value2, ...
                         attrN => valueN;
●   Promisee is only used by Nova
●   Promise body is all the attributes
●   Promise body may reference body-parts
●   Many common attributes, others based on type
       Copyright 2011 LearnThinkCode, Inc.
       This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License
Promises
●   File promise – edit_line bundle
        ●   Ability to handle file edits
        ●   Templates or line changes
●   Promise Body Parts
        ●   Reusable setup of promise attributes
        ●   Can take parameters / variables
        ●   Can use classes internally
●   Functions
        ●   Lots of built-in functions
        ●   Many functions return a class (boolean)
       Copyright 2011 LearnThinkCode, Inc.
       This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License
Example 1 – Java Setup
●
    Review tm-java.cf (a portion of tm.cf)
●
    Goal is to have Oracle Java (JDK) as java
●
    No RHEL repo for it




      Copyright 2011 LearnThinkCode, Inc.
      This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License
Example 2 – DB, Tomcat, HTTP
●
    Review tm-server.cf
●
    All install as packages
●
    All run as services
●
    Configuration and setup
         ●
             Httpd configuration as template
         ●
             Restart httpd if configuration changed
         ●
             Tomcat to run as non-root user
         ●
             Tomcat context copied in
         ●
             MySQL db creation as idempotent(?)
      Copyright 2011 LearnThinkCode, Inc.
      This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License
Example 3 – Web App Deploy
●   Review tm-webapps.cf
●   Web applications are built with Jenkins
●   Jenkins jobs configure which hosts get which builds
       ●   Save war with .<host> appended to name
●   CFEngine needs to know when to pick up the wars
    (and not catch them in the middle)
       ●   Trigger file with <host> name
●   Some applications require special files
●   And then unzip everything and restart Tomcat


       Copyright 2011 LearnThinkCode, Inc.
       This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License
New Machine Setup
●   Review Entagen Triplemap Demo script
        ●   Quick script to bootstrap Triplemap Demos
        ●   Builds <x>.triplemap.com
        ●   Machine setup with KVM
●   Some VM support in Nova (I've not seen it)
●   Have seen knife (Chef) used to bring up
    CFEngine policy servers and clients
        ●   And then CFEngine to setup Puppet
        ●   And then Puppet to setup Chef
        ●   http://blog.afistfulofservers.net/
      Copyright 2011 LearnThinkCode, Inc.
      This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License
Challenges to CFEngine
●   Learning Curve
       ●   Syntax and flow in general
       ●   No “standard style”
       ●   Global vs Local on variables / classes
       ●   Reserved names
       ●   Timing / Locks
●   Large Ecosystem
       ●   Tons of variables, classes, functions
       ●   Start small! Collaborate!
       ●   Code review files in VCS!
●   Be careful – you are root everywhere at once!
       ●   cf-promises will verify syntax – it will not prevent stupid – test your files!
       ●   Use test.cf and limit its execution
       ●   Run on a virtual machine
       ●   Run your tests at least twice on a given machine

           Copyright 2011 LearnThinkCode, Inc.
           This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License
Copyright 2011 LearnThinkCode, Inc.
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License
CFEngine vs Chef vs Puppet
●   Chef and Puppet are both Ruby-based
●   CFEngine is C
       ●   Runs on anything (Nova) and is fast and lightweight (memory footprint)
       ●   CFEngine scales very well (AMD running 10k clients per server)
●   Commercial support available for all
       ●   Is “only in Nova” driving people away from CFEngine?
●   Execution repairs itself (failsafe/update) – don't know for Chef/Puppet
●   CFEngine language is “odd” - learning curve for all
●   CFEngine file editing capabilities seem strong (lots of body parts in stdlib)
●   CFEngine will be more verbose
       ●   but everything is available and easily tweakable (vs “Puppet defines the how”)
       ●   to an extent...promise types are written in C
●   CFEngine based on heuristics / Promise Theory vs Graph / Dependencies / Model
●   Lots of sharing of Chef recipes and Puppet scripts – not so much with CFEngine
       ●   Community Open Promise Body Library but that's it...
●   Puppet a reaction to CFEngine 2 (Luke Kanies) – CFEngine 3 is a rewrite
●   Chef a reaction to Puppet

             Copyright 2011 LearnThinkCode, Inc.
             This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License
References
●
    CFEngine
         ●
             http://cfengine.com/getting-started
●
    Vertical SysAdmin (Aleksey)
         ●
             http://www.verticalsysadmin.com/blog
         ●
             http://www.verticalsysadmin.com/cfengine/
               Getting_Started_with_CFEngine_3.pdf
●
    Sample WordPress setup
         ●
             http://sysadvent.blogspot.com/2011/12/da
               y-15-automating-wordpress-with.html

      Copyright 2011 LearnThinkCode, Inc.
      This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License
Q/A – Thank You!




   Copyright 2011 LearnThinkCode, Inc.
   This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License

Mais conteúdo relacionado

Mais procurados

Jalimo Slides Linuxtag2007 (English)
Jalimo Slides Linuxtag2007 (English)Jalimo Slides Linuxtag2007 (English)
Jalimo Slides Linuxtag2007 (English)smancke
 
Jax london 2011
Jax london 2011Jax london 2011
Jax london 2011njbartlett
 
Java SE 9 modules (JPMS) - an introduction
Java SE 9 modules (JPMS) - an introductionJava SE 9 modules (JPMS) - an introduction
Java SE 9 modules (JPMS) - an introductionStephen Colebourne
 
Java EE | Modular EJBs for Enterprise OSGi | Tim Ward
Java EE | Modular EJBs for Enterprise OSGi | Tim WardJava EE | Modular EJBs for Enterprise OSGi | Tim Ward
Java EE | Modular EJBs for Enterprise OSGi | Tim WardJAX London
 
Disco API - OpenJDK distributions as a service
Disco API - OpenJDK distributions as a serviceDisco API - OpenJDK distributions as a service
Disco API - OpenJDK distributions as a serviceGerrit Grunwald
 
Java and Java platforms
Java and Java platformsJava and Java platforms
Java and Java platformsIlio Catallo
 
Java SE 9 modules - an introduction (July 2018)
Java SE 9 modules - an introduction (July 2018)Java SE 9 modules - an introduction (July 2018)
Java SE 9 modules - an introduction (July 2018)Stephen Colebourne
 
Taming the Deployment Beast
Taming the Deployment BeastTaming the Deployment Beast
Taming the Deployment BeastChris Cornutt
 
Java Course 15: Ant, Scripting, Spring, Hibernate
Java Course 15: Ant, Scripting, Spring, HibernateJava Course 15: Ant, Scripting, Spring, Hibernate
Java Course 15: Ant, Scripting, Spring, HibernateAnton Keks
 
Jython for embedded software validation
Jython for embedded software validationJython for embedded software validation
Jython for embedded software validationPyCon Italia
 
Introduction to Android by Demian Neidetcher
Introduction to Android by Demian NeidetcherIntroduction to Android by Demian Neidetcher
Introduction to Android by Demian NeidetcherMatthew McCullough
 
Dalvik Vm &amp; Jit
Dalvik Vm &amp; JitDalvik Vm &amp; Jit
Dalvik Vm &amp; JitAnkit Somani
 
Zend Framework 2 - Basic Components
Zend Framework 2  - Basic ComponentsZend Framework 2  - Basic Components
Zend Framework 2 - Basic ComponentsMateusz Tymek
 
Architecture | Modular Enterprise Applications | Mark Nuttall
Architecture | Modular Enterprise Applications | Mark NuttallArchitecture | Modular Enterprise Applications | Mark Nuttall
Architecture | Modular Enterprise Applications | Mark NuttallJAX London
 
Agile Days Twin Cities 2011
Agile Days Twin Cities 2011Agile Days Twin Cities 2011
Agile Days Twin Cities 2011Brian Repko
 
JVM JIT compilation overview by Vladimir Ivanov
JVM JIT compilation overview by Vladimir IvanovJVM JIT compilation overview by Vladimir Ivanov
JVM JIT compilation overview by Vladimir IvanovZeroTurnaround
 
Java 7 Modularity: a View from the Gallery
Java 7 Modularity: a View from the GalleryJava 7 Modularity: a View from the Gallery
Java 7 Modularity: a View from the Gallerynjbartlett
 
How to implement a simple dalvik virtual machine
How to implement a simple dalvik virtual machineHow to implement a simple dalvik virtual machine
How to implement a simple dalvik virtual machineChun-Yu Wang
 

Mais procurados (20)

Jalimo Slides Linuxtag2007 (English)
Jalimo Slides Linuxtag2007 (English)Jalimo Slides Linuxtag2007 (English)
Jalimo Slides Linuxtag2007 (English)
 
Jax london 2011
Jax london 2011Jax london 2011
Jax london 2011
 
Java SE 9 modules (JPMS) - an introduction
Java SE 9 modules (JPMS) - an introductionJava SE 9 modules (JPMS) - an introduction
Java SE 9 modules (JPMS) - an introduction
 
Java EE | Modular EJBs for Enterprise OSGi | Tim Ward
Java EE | Modular EJBs for Enterprise OSGi | Tim WardJava EE | Modular EJBs for Enterprise OSGi | Tim Ward
Java EE | Modular EJBs for Enterprise OSGi | Tim Ward
 
Disco API - OpenJDK distributions as a service
Disco API - OpenJDK distributions as a serviceDisco API - OpenJDK distributions as a service
Disco API - OpenJDK distributions as a service
 
Java and Java platforms
Java and Java platformsJava and Java platforms
Java and Java platforms
 
Java SE 9 modules - an introduction (July 2018)
Java SE 9 modules - an introduction (July 2018)Java SE 9 modules - an introduction (July 2018)
Java SE 9 modules - an introduction (July 2018)
 
Taming the Deployment Beast
Taming the Deployment BeastTaming the Deployment Beast
Taming the Deployment Beast
 
Java Course 15: Ant, Scripting, Spring, Hibernate
Java Course 15: Ant, Scripting, Spring, HibernateJava Course 15: Ant, Scripting, Spring, Hibernate
Java Course 15: Ant, Scripting, Spring, Hibernate
 
Jython for embedded software validation
Jython for embedded software validationJython for embedded software validation
Jython for embedded software validation
 
Introduction to Android by Demian Neidetcher
Introduction to Android by Demian NeidetcherIntroduction to Android by Demian Neidetcher
Introduction to Android by Demian Neidetcher
 
Dalvik Vm &amp; Jit
Dalvik Vm &amp; JitDalvik Vm &amp; Jit
Dalvik Vm &amp; Jit
 
Zend Framework 2 Patterns
Zend Framework 2 PatternsZend Framework 2 Patterns
Zend Framework 2 Patterns
 
Zend Framework 2 - Basic Components
Zend Framework 2  - Basic ComponentsZend Framework 2  - Basic Components
Zend Framework 2 - Basic Components
 
Architecture | Modular Enterprise Applications | Mark Nuttall
Architecture | Modular Enterprise Applications | Mark NuttallArchitecture | Modular Enterprise Applications | Mark Nuttall
Architecture | Modular Enterprise Applications | Mark Nuttall
 
Agile Days Twin Cities 2011
Agile Days Twin Cities 2011Agile Days Twin Cities 2011
Agile Days Twin Cities 2011
 
Java introduction
Java introductionJava introduction
Java introduction
 
JVM JIT compilation overview by Vladimir Ivanov
JVM JIT compilation overview by Vladimir IvanovJVM JIT compilation overview by Vladimir Ivanov
JVM JIT compilation overview by Vladimir Ivanov
 
Java 7 Modularity: a View from the Gallery
Java 7 Modularity: a View from the GalleryJava 7 Modularity: a View from the Gallery
Java 7 Modularity: a View from the Gallery
 
How to implement a simple dalvik virtual machine
How to implement a simple dalvik virtual machineHow to implement a simple dalvik virtual machine
How to implement a simple dalvik virtual machine
 

Destaque

Cfengine presentation at the RMLL
Cfengine presentation at the RMLLCfengine presentation at the RMLL
Cfengine presentation at the RMLLRUDDER
 
Config Management Camp 2015 - How to Deploy CFEngine in the Open Internet
Config Management Camp 2015 - How to Deploy CFEngine in the Open InternetConfig Management Camp 2015 - How to Deploy CFEngine in the Open Internet
Config Management Camp 2015 - How to Deploy CFEngine in the Open InternetCFEngine
 
CFEngine - company, mission, offering and partners
CFEngine - company, mission, offering and partnersCFEngine - company, mission, offering and partners
CFEngine - company, mission, offering and partnersRUDDER
 
Configuration management 101 - A tale of disaster recovery using CFEngine 3
Configuration management 101 - A tale of disaster recovery using CFEngine 3Configuration management 101 - A tale of disaster recovery using CFEngine 3
Configuration management 101 - A tale of disaster recovery using CFEngine 3RUDDER
 
Configuration management: automating and rationalizing server setup with CFEn...
Configuration management: automating and rationalizing server setup with CFEn...Configuration management: automating and rationalizing server setup with CFEn...
Configuration management: automating and rationalizing server setup with CFEn...RUDDER
 
Getting started with CFEngine - Webinar
Getting started with CFEngine - WebinarGetting started with CFEngine - Webinar
Getting started with CFEngine - WebinarCFEngine
 
Using ncf building blocks to help writing CFEngine policies
Using ncf building blocks to help writing CFEngine policiesUsing ncf building blocks to help writing CFEngine policies
Using ncf building blocks to help writing CFEngine policiesRUDDER
 
Cfengine presentation @Loadays
Cfengine presentation @LoadaysCfengine presentation @Loadays
Cfengine presentation @LoadaysRUDDER
 
Cfengine vs Puppet vs Chef: A Guide for Stressed Developers
Cfengine vs Puppet vs Chef: A Guide for Stressed DevelopersCfengine vs Puppet vs Chef: A Guide for Stressed Developers
Cfengine vs Puppet vs Chef: A Guide for Stressed DevelopersRon Toland
 

Destaque (9)

Cfengine presentation at the RMLL
Cfengine presentation at the RMLLCfengine presentation at the RMLL
Cfengine presentation at the RMLL
 
Config Management Camp 2015 - How to Deploy CFEngine in the Open Internet
Config Management Camp 2015 - How to Deploy CFEngine in the Open InternetConfig Management Camp 2015 - How to Deploy CFEngine in the Open Internet
Config Management Camp 2015 - How to Deploy CFEngine in the Open Internet
 
CFEngine - company, mission, offering and partners
CFEngine - company, mission, offering and partnersCFEngine - company, mission, offering and partners
CFEngine - company, mission, offering and partners
 
Configuration management 101 - A tale of disaster recovery using CFEngine 3
Configuration management 101 - A tale of disaster recovery using CFEngine 3Configuration management 101 - A tale of disaster recovery using CFEngine 3
Configuration management 101 - A tale of disaster recovery using CFEngine 3
 
Configuration management: automating and rationalizing server setup with CFEn...
Configuration management: automating and rationalizing server setup with CFEn...Configuration management: automating and rationalizing server setup with CFEn...
Configuration management: automating and rationalizing server setup with CFEn...
 
Getting started with CFEngine - Webinar
Getting started with CFEngine - WebinarGetting started with CFEngine - Webinar
Getting started with CFEngine - Webinar
 
Using ncf building blocks to help writing CFEngine policies
Using ncf building blocks to help writing CFEngine policiesUsing ncf building blocks to help writing CFEngine policies
Using ncf building blocks to help writing CFEngine policies
 
Cfengine presentation @Loadays
Cfengine presentation @LoadaysCfengine presentation @Loadays
Cfengine presentation @Loadays
 
Cfengine vs Puppet vs Chef: A Guide for Stressed Developers
Cfengine vs Puppet vs Chef: A Guide for Stressed DevelopersCfengine vs Puppet vs Chef: A Guide for Stressed Developers
Cfengine vs Puppet vs Chef: A Guide for Stressed Developers
 

Semelhante a CFEngine 3

Vagrant & CFEngine - LOPSA East 2013
Vagrant & CFEngine - LOPSA East 2013Vagrant & CFEngine - LOPSA East 2013
Vagrant & CFEngine - LOPSA East 2013Nick Anderson
 
(phpconftw2012) PHP as a Middleware in Embedded Systems
(phpconftw2012) PHP as a Middleware in Embedded Systems(phpconftw2012) PHP as a Middleware in Embedded Systems
(phpconftw2012) PHP as a Middleware in Embedded Systemssosorry
 
DevOps Fest 2020. immutable infrastructure as code. True story.
DevOps Fest 2020. immutable infrastructure as code. True story.DevOps Fest 2020. immutable infrastructure as code. True story.
DevOps Fest 2020. immutable infrastructure as code. True story.Vlad Fedosov
 
It’s 2021. Why are we -still- rebooting for patches? A look at Live Patching.
It’s 2021. Why are we -still- rebooting for patches? A look at Live Patching.It’s 2021. Why are we -still- rebooting for patches? A look at Live Patching.
It’s 2021. Why are we -still- rebooting for patches? A look at Live Patching.All Things Open
 
The State of the Veil Framework
The State of the Veil FrameworkThe State of the Veil Framework
The State of the Veil FrameworkVeilFramework
 
Build, logging, and unit test tools
Build, logging, and unit test toolsBuild, logging, and unit test tools
Build, logging, and unit test toolsAllan Huang
 
CFEngine, 4 years later
CFEngine, 4 years laterCFEngine, 4 years later
CFEngine, 4 years laterRUDDER
 
Don't Fear the Autotools
Don't Fear the AutotoolsDon't Fear the Autotools
Don't Fear the AutotoolsScott Garman
 
Devops with Python by Yaniv Cohen DevopShift
Devops with Python by Yaniv Cohen DevopShiftDevops with Python by Yaniv Cohen DevopShift
Devops with Python by Yaniv Cohen DevopShiftYaniv cohen
 
Getting Started With CFEngine - Updated Version
Getting Started With CFEngine - Updated VersionGetting Started With CFEngine - Updated Version
Getting Started With CFEngine - Updated VersionCFEngine
 
Shorten Device Boot Time for Automotive IVI and Navigation Systems
Shorten Device Boot Time for Automotive IVI and Navigation SystemsShorten Device Boot Time for Automotive IVI and Navigation Systems
Shorten Device Boot Time for Automotive IVI and Navigation SystemsNational Cheng Kung University
 
Managing Your Runtime With P2
Managing Your Runtime With P2Managing Your Runtime With P2
Managing Your Runtime With P2Pascal Rapicault
 
Configuration Management and Transforming Legacy Applications in the Enterpri...
Configuration Management and Transforming Legacy Applications in the Enterpri...Configuration Management and Transforming Legacy Applications in the Enterpri...
Configuration Management and Transforming Legacy Applications in the Enterpri...Docker, Inc.
 
Scaling AngularJS: Enterprise SOA on the MEAN Stack (Responsive Web & Mobile)
Scaling AngularJS: Enterprise SOA on the MEAN Stack (Responsive Web & Mobile)Scaling AngularJS: Enterprise SOA on the MEAN Stack (Responsive Web & Mobile)
Scaling AngularJS: Enterprise SOA on the MEAN Stack (Responsive Web & Mobile)Movel
 
Monitoring Kubernetes with Prometheus (Kubernetes Ireland, 2016)
Monitoring Kubernetes with Prometheus (Kubernetes Ireland, 2016)Monitoring Kubernetes with Prometheus (Kubernetes Ireland, 2016)
Monitoring Kubernetes with Prometheus (Kubernetes Ireland, 2016)Brian Brazil
 
Best Practices for Developing & Deploying Java Applications with Docker
Best Practices for Developing & Deploying Java Applications with DockerBest Practices for Developing & Deploying Java Applications with Docker
Best Practices for Developing & Deploying Java Applications with DockerEric Smalling
 

Semelhante a CFEngine 3 (20)

It gilde 20150209
It gilde 20150209It gilde 20150209
It gilde 20150209
 
Modularity problems
Modularity  problemsModularity  problems
Modularity problems
 
Vagrant & CFEngine - LOPSA East 2013
Vagrant & CFEngine - LOPSA East 2013Vagrant & CFEngine - LOPSA East 2013
Vagrant & CFEngine - LOPSA East 2013
 
(phpconftw2012) PHP as a Middleware in Embedded Systems
(phpconftw2012) PHP as a Middleware in Embedded Systems(phpconftw2012) PHP as a Middleware in Embedded Systems
(phpconftw2012) PHP as a Middleware in Embedded Systems
 
DevOps Fest 2020. immutable infrastructure as code. True story.
DevOps Fest 2020. immutable infrastructure as code. True story.DevOps Fest 2020. immutable infrastructure as code. True story.
DevOps Fest 2020. immutable infrastructure as code. True story.
 
It’s 2021. Why are we -still- rebooting for patches? A look at Live Patching.
It’s 2021. Why are we -still- rebooting for patches? A look at Live Patching.It’s 2021. Why are we -still- rebooting for patches? A look at Live Patching.
It’s 2021. Why are we -still- rebooting for patches? A look at Live Patching.
 
The State of the Veil Framework
The State of the Veil FrameworkThe State of the Veil Framework
The State of the Veil Framework
 
Build, logging, and unit test tools
Build, logging, and unit test toolsBuild, logging, and unit test tools
Build, logging, and unit test tools
 
CFEngine, 4 years later
CFEngine, 4 years laterCFEngine, 4 years later
CFEngine, 4 years later
 
Project Atomic-Nulecule
Project Atomic-NuleculeProject Atomic-Nulecule
Project Atomic-Nulecule
 
Don't Fear the Autotools
Don't Fear the AutotoolsDon't Fear the Autotools
Don't Fear the Autotools
 
JOSA TechTalks - Docker in Production
JOSA TechTalks - Docker in ProductionJOSA TechTalks - Docker in Production
JOSA TechTalks - Docker in Production
 
Devops with Python by Yaniv Cohen DevopShift
Devops with Python by Yaniv Cohen DevopShiftDevops with Python by Yaniv Cohen DevopShift
Devops with Python by Yaniv Cohen DevopShift
 
Getting Started With CFEngine - Updated Version
Getting Started With CFEngine - Updated VersionGetting Started With CFEngine - Updated Version
Getting Started With CFEngine - Updated Version
 
Shorten Device Boot Time for Automotive IVI and Navigation Systems
Shorten Device Boot Time for Automotive IVI and Navigation SystemsShorten Device Boot Time for Automotive IVI and Navigation Systems
Shorten Device Boot Time for Automotive IVI and Navigation Systems
 
Managing Your Runtime With P2
Managing Your Runtime With P2Managing Your Runtime With P2
Managing Your Runtime With P2
 
Configuration Management and Transforming Legacy Applications in the Enterpri...
Configuration Management and Transforming Legacy Applications in the Enterpri...Configuration Management and Transforming Legacy Applications in the Enterpri...
Configuration Management and Transforming Legacy Applications in the Enterpri...
 
Scaling AngularJS: Enterprise SOA on the MEAN Stack (Responsive Web & Mobile)
Scaling AngularJS: Enterprise SOA on the MEAN Stack (Responsive Web & Mobile)Scaling AngularJS: Enterprise SOA on the MEAN Stack (Responsive Web & Mobile)
Scaling AngularJS: Enterprise SOA on the MEAN Stack (Responsive Web & Mobile)
 
Monitoring Kubernetes with Prometheus (Kubernetes Ireland, 2016)
Monitoring Kubernetes with Prometheus (Kubernetes Ireland, 2016)Monitoring Kubernetes with Prometheus (Kubernetes Ireland, 2016)
Monitoring Kubernetes with Prometheus (Kubernetes Ireland, 2016)
 
Best Practices for Developing & Deploying Java Applications with Docker
Best Practices for Developing & Deploying Java Applications with DockerBest Practices for Developing & Deploying Java Applications with Docker
Best Practices for Developing & Deploying Java Applications with Docker
 

Último

Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Kaya Weers
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integrationmarketing932765
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesManik S Magar
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...itnewsafrica
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxfnnc6jmgwh
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructureitnewsafrica
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 

Último (20)

Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 

CFEngine 3

  • 1. CFEngine 3 Code Freeze 2012 Jan 12, 2012 Brian Repko http://www.learnthinkcode.com Copyright 2011 LearnThinkCode, Inc. This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License
  • 2. Agenda ● Introduction to CFEngine ● What it is ● How it works ● Examples ● New Machine Setup ● CFEngine vs Chef vs Puppet Copyright 2011 LearnThinkCode, Inc. This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License
  • 3. IANAS (sysadmin) ● My role has been as a developer / architect working with sysadmins to deploy our applications ● When automated, we have used cfengine ● This presentation will use cfengine configuration from Entagen (triplemap.com) for our examples ● Thanks to Frans Lawaetz! Copyright 2011 LearnThinkCode, Inc. This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License
  • 4. CFEngine ● Systems Maintenance Tool ● Configures and automates large-scale IT infrastructure ● Ensures the availability, security and compliance of systems and applications ● Created by Mark Burgess (Ph.D in Theoretical Physics) ● CFEngine 1 – released in 1993 (at Oslo University / post-doc) ● CFEngine 2 – released in 1998 (Computer Immunology) ● CFEngine 3 – released in 2008 (Promise Theory) ● Two editions – Community (FOSS) and Nova (commercial) ● Nova has portal, reporting, native MS Mac/Windows mgmt, high- availability, virtualization, KM, commercial support ● Written in C, runs on all types of systems including mobile, tablet and embedded systems ● Tons of low-level functions and action configurations to reuse Copyright 2011 LearnThinkCode, Inc. This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License
  • 5. Who uses it Copyright 2011 LearnThinkCode, Inc. This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License
  • 6. Components ● cf-execd ● Cron-like lightweight daemon that runs cf-agent (default is every 5 minutes) ● More sophisticated than cron (randomness, fail-safe operation, time exclusions) ● cf-agent ● The main component that does the system automation and maintenance (maintaining promises) ● Runs cf-promises (another executable) to validate bundles/promise syntax ● cf-serverd ● Distributes policy and data files (cf-agent pulls from cf-serverd) ● Hubs (Nova only), Servers and Clients ● Can run standalone as well ● All systems run the same configuration policies (Hubs/Servers are Clients too!) ● Top-level system(s) get their files from version control (please say yes) ● Promises (statements) ● Describes the desired state of some aspect of a system (file, process, package...) ● Bundles (collections of promises, aka policies) ● promises.cf as bootstrap policy – says what other bundles to execute ● Variables and Classes (CFEngine defined and User defined) ● Classes are booleans that allow control over which promises are executed and when Copyright 2011 LearnThinkCode, Inc. This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License
  • 7. Bundles ● Bundles are typically designed to target a particular set of systems and/or a particular objective ● Bundles have a type (which executable) and name ● “common” is for all executables ● Each bundle type has a control (configuration) promise body ● Each bundle is run three times in order to get each promise fulfilled (convergence) ● Bundles have sections (“promise type”) whose order is fixed based on the executable ● promises.cf, failsafe.cf and update.cf are “standard” ● cfengine_stdlib.cf has lots of the low level functionality ● The “common control body” specifies the files to process and the bundle sequence – specified in promises.cf (or standalone files) Copyright 2011 LearnThinkCode, Inc. This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License
  • 8. Bundles ● Bundle promise type order (for agent) ● vars – define variables ● classes – define classes ● outputs – (Nova) data collection ● interfaces – network interfaces ● files – files and file contents ● packages – packages / libraries to install / uninstall ● environments – (Nova) virtualization ● methods – process other bundles ● processes – processes that should / should not be running ● services – collections of processes ● commands – commands to execute ● storage – disks and filesystems ● databases – (Nova) LDAP, SQL and Windows Registry ● reports – reporting on cfengine state Copyright 2011 LearnThinkCode, Inc. This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License
  • 9. Variables and Classes ● Variables ● Special Variables (CFEngine defined) ● Scalar types - string, int, real ● List types - slist, ilist, rlist ● Scalar expression ${var}, List expression @{var} ● Scalar expression of a list is a loop / for-each ● Classes ● Booleans that guard promises ● CFEngine-defined (aka hard) Classes ● User-defined (aka soft) Classes ● Often set by using built-in functions ● Can also be defined by promise repair or failure ● Combined with not ('!'), and ('.' or '&'), or ('|' or '||') Copyright 2011 LearnThinkCode, Inc. This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License
  • 10. Promises ● Within its promise type class-expression:: “promiser” [→ {“promisee1”,...}] attr1 => value1, attr2 => value2, ... attrN => valueN; ● Promisee is only used by Nova ● Promise body is all the attributes ● Promise body may reference body-parts ● Many common attributes, others based on type Copyright 2011 LearnThinkCode, Inc. This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License
  • 11. Promises ● File promise – edit_line bundle ● Ability to handle file edits ● Templates or line changes ● Promise Body Parts ● Reusable setup of promise attributes ● Can take parameters / variables ● Can use classes internally ● Functions ● Lots of built-in functions ● Many functions return a class (boolean) Copyright 2011 LearnThinkCode, Inc. This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License
  • 12. Example 1 – Java Setup ● Review tm-java.cf (a portion of tm.cf) ● Goal is to have Oracle Java (JDK) as java ● No RHEL repo for it Copyright 2011 LearnThinkCode, Inc. This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License
  • 13. Example 2 – DB, Tomcat, HTTP ● Review tm-server.cf ● All install as packages ● All run as services ● Configuration and setup ● Httpd configuration as template ● Restart httpd if configuration changed ● Tomcat to run as non-root user ● Tomcat context copied in ● MySQL db creation as idempotent(?) Copyright 2011 LearnThinkCode, Inc. This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License
  • 14. Example 3 – Web App Deploy ● Review tm-webapps.cf ● Web applications are built with Jenkins ● Jenkins jobs configure which hosts get which builds ● Save war with .<host> appended to name ● CFEngine needs to know when to pick up the wars (and not catch them in the middle) ● Trigger file with <host> name ● Some applications require special files ● And then unzip everything and restart Tomcat Copyright 2011 LearnThinkCode, Inc. This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License
  • 15. New Machine Setup ● Review Entagen Triplemap Demo script ● Quick script to bootstrap Triplemap Demos ● Builds <x>.triplemap.com ● Machine setup with KVM ● Some VM support in Nova (I've not seen it) ● Have seen knife (Chef) used to bring up CFEngine policy servers and clients ● And then CFEngine to setup Puppet ● And then Puppet to setup Chef ● http://blog.afistfulofservers.net/ Copyright 2011 LearnThinkCode, Inc. This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License
  • 16. Challenges to CFEngine ● Learning Curve ● Syntax and flow in general ● No “standard style” ● Global vs Local on variables / classes ● Reserved names ● Timing / Locks ● Large Ecosystem ● Tons of variables, classes, functions ● Start small! Collaborate! ● Code review files in VCS! ● Be careful – you are root everywhere at once! ● cf-promises will verify syntax – it will not prevent stupid – test your files! ● Use test.cf and limit its execution ● Run on a virtual machine ● Run your tests at least twice on a given machine Copyright 2011 LearnThinkCode, Inc. This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License
  • 17. Copyright 2011 LearnThinkCode, Inc. This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License
  • 18. CFEngine vs Chef vs Puppet ● Chef and Puppet are both Ruby-based ● CFEngine is C ● Runs on anything (Nova) and is fast and lightweight (memory footprint) ● CFEngine scales very well (AMD running 10k clients per server) ● Commercial support available for all ● Is “only in Nova” driving people away from CFEngine? ● Execution repairs itself (failsafe/update) – don't know for Chef/Puppet ● CFEngine language is “odd” - learning curve for all ● CFEngine file editing capabilities seem strong (lots of body parts in stdlib) ● CFEngine will be more verbose ● but everything is available and easily tweakable (vs “Puppet defines the how”) ● to an extent...promise types are written in C ● CFEngine based on heuristics / Promise Theory vs Graph / Dependencies / Model ● Lots of sharing of Chef recipes and Puppet scripts – not so much with CFEngine ● Community Open Promise Body Library but that's it... ● Puppet a reaction to CFEngine 2 (Luke Kanies) – CFEngine 3 is a rewrite ● Chef a reaction to Puppet Copyright 2011 LearnThinkCode, Inc. This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License
  • 19. References ● CFEngine ● http://cfengine.com/getting-started ● Vertical SysAdmin (Aleksey) ● http://www.verticalsysadmin.com/blog ● http://www.verticalsysadmin.com/cfengine/ Getting_Started_with_CFEngine_3.pdf ● Sample WordPress setup ● http://sysadvent.blogspot.com/2011/12/da y-15-automating-wordpress-with.html Copyright 2011 LearnThinkCode, Inc. This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License
  • 20. Q/A – Thank You! Copyright 2011 LearnThinkCode, Inc. This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License