SlideShare a Scribd company logo
www.cfengine.com
Vagrant & CFEngine
Ohio Linux Fest 2013
Before we get started
Is everyone in the right place?
Has everyone installed Virtualbox 4.2.16 or later?
VirtualBox --help | grep VirtualBox
Has everyone installed Vagrant 1.2.7 or later?
vagrant --version
Get to know each other
Hi, I'm Nick
SysAdmin > 10 Years
Work at CFEngine
Live in Lawrence, KS
Twitter: @cmdln_
IRC: nickanderson
Blog: http://www.cmdln.org
Who are you?
What do you do?
Have you used Vagrant?
Have you used CFEngine?
Why did you choose this
session and what do you
hope to get from it?
9/13/13
What is Vagrant?
Tool to make working with
development environments
easy.
Create, configure, destroy
lightweight, reproducible,
and portable environments.
● Created by Mitchell Hashimoto
● @mitchelh
● http://www.vagrantup.com
9/13/13
Provides common environment
Designers
Developers
Operations
QA
9/13/13
Portable
● VirtualBox
● AWS
● VMware
● More
● https://github.com/mitchellh/vagrant/wiki/Available-Vagrant-Plugins
9/13/13
How can it help?
Developer on-boarding
Quickly provision/decommission
test environments in repeatable
fashion
Bug Validation
Continuous Integration
Ad-hoc Demos
9/13/13
So what's it made of?
9/13/13
Vagrantfile
● Describe the type of machine(s) required for a project
● Syntax of Vagrantfile is Ruby, but knowledge of the Ruby language is not
necessary. It's mostly simple variable assignment.
Vagrant.configure("2") do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "centos-5.x-i386_nickanderson_201304271927"
end
9/13/13
CFEngine Provisioner: Currently Undocumented
● am_policy_hub
●
extra_agent_args
– Extra arguments to pass to cf-agent executions
●
classes
– Additional classes to define when running cf-agent
● deb_repo_file
– The apt repository configuration file to use for configuring
the repository containing the CFEngine packages
● deb_repo_line
– The line that specifys the repository to use for CFEngine
packages
●
files_path
– Directory to copy on top of the default masterfiles
● force_bootstrap
– If true, bootstrap the host even if it has been bootstrapped
before
● install
– Install CFEngine package from repository
● mode
– “bootstrap” or “single_run”, determines whether CFEngine will
be bootstrapped or just executed once on the host
●
policy_server_address
●
repo_gpg_key_url
– http location of GPG key used for checking package signatures
●
run_file
– Standalone CFEngine policy file to upload and execute
●
upload_path
– Path to upload run_file
●
yum_repo_file
– The yum repository file to use when configuring the repository
containing CFEngine packages
●
yum_repo_url
– The url of the repository containing the CFEngine packages
●
package_name
– The cfengine package name to install
9/13/13
CFEngine Provisioner: Example Use
9/13/13
Boxes
● Predefined operating system install
● Provider specific
● http://www.vagrantbox.es
● Use veewee or packer.io (build your own automatically)
– Kickstart/preseed, postinstall scripts
9/13/13
Automagic
● Ssh automatic port forwards
● Shared project folder /vagrant
9/13/13
Useful Plugin
● vagrant-vbguest automatically installs
the host's VirtualBox Guest Additions
on the guest system.
● vagrant plugin install vagrant-vbguest
● https://github.com/dotless-de/vagrant
-vbguest
9/13/13
Getting started
● vagrant box list
● vagrant box add
● vagrant init
● vagrant status
● vagrant up
● vagrant up
● vagrant status
● vagrant ssh
– vagrant ssh node
● vagrant destroy
9/13/13
Test it out
● Import vagrant basebox
– Locate CFEngine_Training.box in resources/veewee
– vagrant box add CFEngine_Training CFEngine_training.box
● Create a new empty directory
● vagrant init CFEngine_Training
● vagrant up
● vagrant ssh
● vagrant destroy -f
9/13/13
Daily Use
vagrant up
vagrant {destroy, halt, suspend}
!-2
9/13/13
This is fantastic!
9/13/13
Build base boxes for all the things!
Ohio Linux Fest 2013: Provisioning VMs Quickly with Vagrant and CFEngine
Black Hole
9/13/13
Automating Vagrant Provisioning
● Ansible
● CFEngine
● Chef
● Puppet
● Salt Stack
● Shell Scripts
● MixnMatch!
9/13/13
CFEngine
● IT infrastructure automation, compliance, and
knowledge management framework
● Opensource and Commercial Software
● Originally written by Mark Burgess
● @markburgess_osl
● http://www.cfengine.com
9/13/13
CFEngine History
● First released in 1993
● CFEngine 2 released in 1998, self healing
computer immunology. Added machine
learning and anomaly detection.
● 2003 Promise Theory work began
● 2008 CFEngine 3 released. Integrates
knowledge management and discovery
mechanisms.
9/13/13
CFEngine Properties
● Small
9/13/13
CFEngine Properties
● Small
● Secure (http://web.nvd.nist.gov/view/vuln/search)
9/13/13
CFEngine Properties
● Small
● Secure (http://web.nvd.nist.gov/view/vuln/search)
● Portable
9/13/13
CFEngine Properties
● Small
● Secure (http://web.nvd.nist.gov/view/vuln/search)
● Portable
● Resilient
9/13/13
CFEngine Properties
● Small
● Secure (http://web.nvd.nist.gov/view/vuln/search)
● Portable
● Resilient
● Declarative
9/13/13
Bootstrap a test environment
9/13/13
CFEngine Demo Time
● Lets try some community
contributed policy
9/13/13
cf-sketch
● Log in to your policy hub, locate the
design center repository and access
the cf-sketch shell
– vagrant ssh hub
– sudo -i
– cd /vagrant/resources/design-center/tools/cf-sketch
– ./cf-sketch.pl
9/13/13
Configure Timezones
● search time
● info -v tzconfig
● install System::tzconfig
● define paramset System::tzconfig
– Name: NO_Oslo_TZ
– Timezone: Europe/Oslo
– Zoneinfo: /usr/share/zoneinfo
9/13/13
Configure Timezones
● search time
● install System::tzconfig
● define paramset System::tzconfig
– Name: NO_Oslo_TZ
– Timezone: Europe/Oslo
– Zoneinfo: /usr/share/zoneinfo
9/13/13
Configure Timezones Cont.
● search time
● install System::tzconfig
● define paramset System::tzconfig
– Name: US_Central_TZ
– Timezone: US/Central
– Zoneinfo: /usr/share/zoneinfo
9/13/13
Activate and Deploy Timezone Configuration
● activate System::tzconfig NO_Oslo_TZ hub
● activate System::tzconfig US_Central_TZ node001
● deploy
9/13/13
Editor War!
● I prefer vim, and it's fun to mess with
the emacs people
● services/editor_war.cf
9/13/13
Wage War
● Remove Disallowed Packages
– vagrant ssh hub
– watch rpm -q emacs-nox
– Uncomment disallowed_packages to activate policy.
Watch it get fixed.
● Install Required Packages
– watch rpm -q vim-enhanced
– Uncomment required_packages to activate policy
9/13/13
More Nodes!
● Increase nodes to 2 in Vagrantfile
● vagrant up
● vagrant ssh node00{1,2}
9/13/13
The Books
● Learning CFEngine 3
– Diego Zamboni
● Vagrant Up and Running
– Mitchell Hashimoto
9/13/13
Questions/Discussion?
9/13/13
Thank You!

More Related Content

PPTX
Gestión de la configuración - Jenkins ci
Carles San Agustin
 
PDF
CloudOpen North America 2013: Vagrant & CFEngine
Nick Anderson
 
PPTX
Vagrant 101 Workshop
Liora Milbaum
 
PPTX
Js meetup | Yeoman generators
Pasindu Perera
 
PPTX
Vagrant hands on workshop for beginners
Liora Milbaum
 
ODP
Volunteering at YouSee on Technology Support
YouSee
 
PDF
Commit on day one thanks to vagrant & puppet!
Jakub Holy
 
PPTX
Vagrant step-by-step guide for Beginners
Sagar Acharya
 
Gestión de la configuración - Jenkins ci
Carles San Agustin
 
CloudOpen North America 2013: Vagrant & CFEngine
Nick Anderson
 
Vagrant 101 Workshop
Liora Milbaum
 
Js meetup | Yeoman generators
Pasindu Perera
 
Vagrant hands on workshop for beginners
Liora Milbaum
 
Volunteering at YouSee on Technology Support
YouSee
 
Commit on day one thanks to vagrant & puppet!
Jakub Holy
 
Vagrant step-by-step guide for Beginners
Sagar Acharya
 

What's hot (20)

PDF
node.js app deploy to heroku PaaS
Caesar Chi
 
PDF
Django deployment and rpm+yum
Walter Liu
 
PPTX
Vagrant
ProfessionalVMware
 
PDF
Easy WP Dev environments with VVV
Daniel Stout
 
PPTX
Vagrant
Evans Ye
 
PPTX
Vagrant
Akshay Siwal
 
PDF
Helpful pre commit hooks for Python and Django
roskakori
 
PDF
Skyfall b sides-c00-l-ed5-sp-2013
Mauro Risonho de Paula Assumpcao
 
PDF
Vagrant for Virtualized Development
Adam Culp
 
PDF
Vagrant for Development
Jacky Chan
 
PDF
VCCW - Vagrant based WordPress development environment
Takayuki Miyauchi
 
PPTX
Docker and fig for dev
pranas_algoteq
 
PDF
Making of GameOver
n|u - The Open Security Community
 
PPTX
Node.js, Vagrant, Chef, and Mathoid @ Benetech
Christopher Bumgardner
 
PDF
Introduction to Vagrant
Marcelo Pinheiro
 
PDF
EuroBSDCon 2021 - (auto)Installing BSD Systems
Vinícius Zavam
 
PDF
Vagrant presentation
Mahmudur Rahman
 
ODP
OpenDaylight go
YoungChoonTae
 
PDF
Build Lifecycle Craftsmanship for the Transylvania JUG
Matthew McCullough
 
PDF
Wocker @WordBench Osaka No.41
Kite Koga
 
node.js app deploy to heroku PaaS
Caesar Chi
 
Django deployment and rpm+yum
Walter Liu
 
Easy WP Dev environments with VVV
Daniel Stout
 
Vagrant
Evans Ye
 
Vagrant
Akshay Siwal
 
Helpful pre commit hooks for Python and Django
roskakori
 
Skyfall b sides-c00-l-ed5-sp-2013
Mauro Risonho de Paula Assumpcao
 
Vagrant for Virtualized Development
Adam Culp
 
Vagrant for Development
Jacky Chan
 
VCCW - Vagrant based WordPress development environment
Takayuki Miyauchi
 
Docker and fig for dev
pranas_algoteq
 
Node.js, Vagrant, Chef, and Mathoid @ Benetech
Christopher Bumgardner
 
Introduction to Vagrant
Marcelo Pinheiro
 
EuroBSDCon 2021 - (auto)Installing BSD Systems
Vinícius Zavam
 
Vagrant presentation
Mahmudur Rahman
 
OpenDaylight go
YoungChoonTae
 
Build Lifecycle Craftsmanship for the Transylvania JUG
Matthew McCullough
 
Wocker @WordBench Osaka No.41
Kite Koga
 
Ad

Viewers also liked (14)

KEY
Bicing Analysis - Villes Cyclables
jgrivolla
 
PPTX
Toronto VMware User Group Opening - Angelo Luciani
Angelo Luciani
 
PDF
Spoofing - o retorno
Louise Scoz
 
PPT
P P T Flor S
guestbdfa67
 
PDF
2016-02-01_dark
Nick Anderson
 
PPT
Ppt Flor S
guestbdfa67
 
PDF
Vagrant & CFEngine - LOPSA East 2013
Nick Anderson
 
PPTX
Maximize Community Toronto VMUG - Mike Preston
Angelo Luciani
 
PPTX
Green
tylersihelnick
 
PDF
Security_Practices_with_CFEngine-cfgcamp_2016
Nick Anderson
 
PPTX
OpenStack and the Industry Shift with Open Cloud - Eric Wright
Angelo Luciani
 
PPT
The Heisenberg Uncertainty Principle[1]
guestea12c43
 
PPS
Stephen Covey The 90/10 Principle
Chamnan Nop
 
PPTX
Green Technology Powerpoint
tylersihelnick
 
Bicing Analysis - Villes Cyclables
jgrivolla
 
Toronto VMware User Group Opening - Angelo Luciani
Angelo Luciani
 
Spoofing - o retorno
Louise Scoz
 
P P T Flor S
guestbdfa67
 
2016-02-01_dark
Nick Anderson
 
Ppt Flor S
guestbdfa67
 
Vagrant & CFEngine - LOPSA East 2013
Nick Anderson
 
Maximize Community Toronto VMUG - Mike Preston
Angelo Luciani
 
Security_Practices_with_CFEngine-cfgcamp_2016
Nick Anderson
 
OpenStack and the Industry Shift with Open Cloud - Eric Wright
Angelo Luciani
 
The Heisenberg Uncertainty Principle[1]
guestea12c43
 
Stephen Covey The 90/10 Principle
Chamnan Nop
 
Green Technology Powerpoint
tylersihelnick
 
Ad

Similar to Ohio Linux Fest 2013: Provisioning VMs Quickly with Vagrant and CFEngine (20)

PDF
Take home your very own free Vagrant CFML Dev Environment - Presented at dev....
Gavin Pickin
 
PDF
Take Home Your Very Own Free Vagrant CFML Dev Environment
ColdFusionConference
 
PDF
Magento Docker Setup.pdf
Abid Malik
 
PDF
Automating with ansible (Part B)
iman darabi
 
ODP
It gilde 20150209
Martin Simons
 
PDF
Wrangling 3rd Party Installers from Puppet
Puppet
 
PDF
Android Platform Debugging and Development
Opersys inc.
 
PDF
Crikeycon 2019 Velociraptor Workshop
Velocidex Enterprises
 
PPTX
Nomad + Flatcar: a harmonious marriage of lightweights
Iago López Galeiras
 
DOCX
Virtual box installation
Niranjan Pandey
 
PDF
Android Platform Debugging and Development
Opersys inc.
 
PDF
Android Platform Debugging and Development
Opersys inc.
 
PPTX
Kubernetes is Hard! Lessons Learned Taking Our Apps to Kubernetes by Eldad Assis
AgileSparks
 
PDF
DevOps Fest 2020. Николай Маржан. Consistent backups of multi-shard MongoDB
DevOps_Fest
 
PDF
Android Platform Debugging and Development
Opersys inc.
 
PDF
Android Platform Debugging and Development
Opersys inc.
 
PDF
Android Platform Debugging and Development
Karim Yaghmour
 
PDF
Android Platform Debugging and Development
Opersys inc.
 
PDF
Vagrant workshop 2015
Haifa Ftirich
 
PDF
Android Platform Debugging and Development
Opersys inc.
 
Take home your very own free Vagrant CFML Dev Environment - Presented at dev....
Gavin Pickin
 
Take Home Your Very Own Free Vagrant CFML Dev Environment
ColdFusionConference
 
Magento Docker Setup.pdf
Abid Malik
 
Automating with ansible (Part B)
iman darabi
 
It gilde 20150209
Martin Simons
 
Wrangling 3rd Party Installers from Puppet
Puppet
 
Android Platform Debugging and Development
Opersys inc.
 
Crikeycon 2019 Velociraptor Workshop
Velocidex Enterprises
 
Nomad + Flatcar: a harmonious marriage of lightweights
Iago López Galeiras
 
Virtual box installation
Niranjan Pandey
 
Android Platform Debugging and Development
Opersys inc.
 
Android Platform Debugging and Development
Opersys inc.
 
Kubernetes is Hard! Lessons Learned Taking Our Apps to Kubernetes by Eldad Assis
AgileSparks
 
DevOps Fest 2020. Николай Маржан. Consistent backups of multi-shard MongoDB
DevOps_Fest
 
Android Platform Debugging and Development
Opersys inc.
 
Android Platform Debugging and Development
Opersys inc.
 
Android Platform Debugging and Development
Karim Yaghmour
 
Android Platform Debugging and Development
Opersys inc.
 
Vagrant workshop 2015
Haifa Ftirich
 
Android Platform Debugging and Development
Opersys inc.
 

Recently uploaded (20)

PDF
Your Love Story, Beautifully Told by FliqaIndia’s Creative Experts
sandeep239227
 
PPTX
Internet Download Manager (IDM) Crack Free Download [Latest 2025] PPTX
awaischaudary317
 
PPTX
Elements of Music, Performing and Visual Arts
DyssaJaneManriqueAyn
 
PPTX
Human Efficiencknkjnhjbnhjbhjhjbnljy.pptx
hanhocpt13
 
PDF
Malaria detection through machine learning and deep learning
BhaveshGoyal26
 
PPTX
2 Human Resource Planning.pptxkkkkkkkkkkkkkkkkkkkk
khushigulati2325
 
PPTX
Eco-Friendly Living.ppt BIRLA OPEN MIND INTERNATIONAL SCHOOL
aartidevi7613
 
PPTX
Roadmap Infographics by Slidesgo.pptx qwerty
canigethellomoto
 
PPTX
Q1_Music and Arts_Week 3-4 [Autosaved].pptx
MelissaJeanBayobay1
 
PPTX
Lecture 1b - Diagnostic Analytics Intro and Purpose ver 1.0.pptx
guddipatel10
 
PDF
Zero no Tsukaima 1 - Zero_s Familiar.pdf
WaldeckFlugelWallens
 
PDF
PowerPoint Presentation -- Khai Y -- 9ca7f3602ac1344b9321b19ff99e177d -- Anna...
Adeel452922
 
PDF
How to Calibrate Cricut Maker 3​? Manny Maker
Richard Parker
 
PDF
ARTIFICIAL intelligence ............,....
kasimnagori121
 
PPTX
Welcome chiku new07.pptxrfgretgregbdffgfdgfd
xoviva2925
 
PPTX
奎斯特大学文凭办理|办理QUC毕业证学位证书2025年新版学位证书影本
1cz3lou8
 
PPT
2C Central and Eastern Europe - the flowering (Russia)
dolgalev
 
PPTX
MtA文凭办理|办理蒙特埃里森大学毕业证成绩单复刻学分无法毕业怎么办?
ekwp9g1k
 
PPTX
• Hinduism is not founded by any particular prophet. Buddhism was founded by ...
BeshoyGirgis2
 
PDF
Why Should You Hire a Video Production Studio in 2025?
GXYZ Inc
 
Your Love Story, Beautifully Told by FliqaIndia’s Creative Experts
sandeep239227
 
Internet Download Manager (IDM) Crack Free Download [Latest 2025] PPTX
awaischaudary317
 
Elements of Music, Performing and Visual Arts
DyssaJaneManriqueAyn
 
Human Efficiencknkjnhjbnhjbhjhjbnljy.pptx
hanhocpt13
 
Malaria detection through machine learning and deep learning
BhaveshGoyal26
 
2 Human Resource Planning.pptxkkkkkkkkkkkkkkkkkkkk
khushigulati2325
 
Eco-Friendly Living.ppt BIRLA OPEN MIND INTERNATIONAL SCHOOL
aartidevi7613
 
Roadmap Infographics by Slidesgo.pptx qwerty
canigethellomoto
 
Q1_Music and Arts_Week 3-4 [Autosaved].pptx
MelissaJeanBayobay1
 
Lecture 1b - Diagnostic Analytics Intro and Purpose ver 1.0.pptx
guddipatel10
 
Zero no Tsukaima 1 - Zero_s Familiar.pdf
WaldeckFlugelWallens
 
PowerPoint Presentation -- Khai Y -- 9ca7f3602ac1344b9321b19ff99e177d -- Anna...
Adeel452922
 
How to Calibrate Cricut Maker 3​? Manny Maker
Richard Parker
 
ARTIFICIAL intelligence ............,....
kasimnagori121
 
Welcome chiku new07.pptxrfgretgregbdffgfdgfd
xoviva2925
 
奎斯特大学文凭办理|办理QUC毕业证学位证书2025年新版学位证书影本
1cz3lou8
 
2C Central and Eastern Europe - the flowering (Russia)
dolgalev
 
MtA文凭办理|办理蒙特埃里森大学毕业证成绩单复刻学分无法毕业怎么办?
ekwp9g1k
 
• Hinduism is not founded by any particular prophet. Buddhism was founded by ...
BeshoyGirgis2
 
Why Should You Hire a Video Production Studio in 2025?
GXYZ Inc
 

Ohio Linux Fest 2013: Provisioning VMs Quickly with Vagrant and CFEngine

  • 2. Before we get started Is everyone in the right place? Has everyone installed Virtualbox 4.2.16 or later? VirtualBox --help | grep VirtualBox Has everyone installed Vagrant 1.2.7 or later? vagrant --version
  • 3. Get to know each other Hi, I'm Nick SysAdmin > 10 Years Work at CFEngine Live in Lawrence, KS Twitter: @cmdln_ IRC: nickanderson Blog: http://www.cmdln.org Who are you? What do you do? Have you used Vagrant? Have you used CFEngine? Why did you choose this session and what do you hope to get from it?
  • 4. 9/13/13 What is Vagrant? Tool to make working with development environments easy. Create, configure, destroy lightweight, reproducible, and portable environments. ● Created by Mitchell Hashimoto ● @mitchelh ● http://www.vagrantup.com
  • 6. 9/13/13 Portable ● VirtualBox ● AWS ● VMware ● More ● https://github.com/mitchellh/vagrant/wiki/Available-Vagrant-Plugins
  • 7. 9/13/13 How can it help? Developer on-boarding Quickly provision/decommission test environments in repeatable fashion Bug Validation Continuous Integration Ad-hoc Demos
  • 9. 9/13/13 Vagrantfile ● Describe the type of machine(s) required for a project ● Syntax of Vagrantfile is Ruby, but knowledge of the Ruby language is not necessary. It's mostly simple variable assignment. Vagrant.configure("2") do |config| # All Vagrant configuration is done here. The most common configuration # options are documented and commented below. For a complete reference, # please see the online documentation at vagrantup.com. # Every Vagrant virtual environment requires a box to build off of. config.vm.box = "centos-5.x-i386_nickanderson_201304271927" end
  • 10. 9/13/13 CFEngine Provisioner: Currently Undocumented ● am_policy_hub ● extra_agent_args – Extra arguments to pass to cf-agent executions ● classes – Additional classes to define when running cf-agent ● deb_repo_file – The apt repository configuration file to use for configuring the repository containing the CFEngine packages ● deb_repo_line – The line that specifys the repository to use for CFEngine packages ● files_path – Directory to copy on top of the default masterfiles ● force_bootstrap – If true, bootstrap the host even if it has been bootstrapped before ● install – Install CFEngine package from repository ● mode – “bootstrap” or “single_run”, determines whether CFEngine will be bootstrapped or just executed once on the host ● policy_server_address ● repo_gpg_key_url – http location of GPG key used for checking package signatures ● run_file – Standalone CFEngine policy file to upload and execute ● upload_path – Path to upload run_file ● yum_repo_file – The yum repository file to use when configuring the repository containing CFEngine packages ● yum_repo_url – The url of the repository containing the CFEngine packages ● package_name – The cfengine package name to install
  • 12. 9/13/13 Boxes ● Predefined operating system install ● Provider specific ● http://www.vagrantbox.es ● Use veewee or packer.io (build your own automatically) – Kickstart/preseed, postinstall scripts
  • 13. 9/13/13 Automagic ● Ssh automatic port forwards ● Shared project folder /vagrant
  • 14. 9/13/13 Useful Plugin ● vagrant-vbguest automatically installs the host's VirtualBox Guest Additions on the guest system. ● vagrant plugin install vagrant-vbguest ● https://github.com/dotless-de/vagrant -vbguest
  • 15. 9/13/13 Getting started ● vagrant box list ● vagrant box add ● vagrant init ● vagrant status ● vagrant up ● vagrant up ● vagrant status ● vagrant ssh – vagrant ssh node ● vagrant destroy
  • 16. 9/13/13 Test it out ● Import vagrant basebox – Locate CFEngine_Training.box in resources/veewee – vagrant box add CFEngine_Training CFEngine_training.box ● Create a new empty directory ● vagrant init CFEngine_Training ● vagrant up ● vagrant ssh ● vagrant destroy -f
  • 17. 9/13/13 Daily Use vagrant up vagrant {destroy, halt, suspend} !-2
  • 19. 9/13/13 Build base boxes for all the things!
  • 22. 9/13/13 Automating Vagrant Provisioning ● Ansible ● CFEngine ● Chef ● Puppet ● Salt Stack ● Shell Scripts ● MixnMatch!
  • 23. 9/13/13 CFEngine ● IT infrastructure automation, compliance, and knowledge management framework ● Opensource and Commercial Software ● Originally written by Mark Burgess ● @markburgess_osl ● http://www.cfengine.com
  • 24. 9/13/13 CFEngine History ● First released in 1993 ● CFEngine 2 released in 1998, self healing computer immunology. Added machine learning and anomaly detection. ● 2003 Promise Theory work began ● 2008 CFEngine 3 released. Integrates knowledge management and discovery mechanisms.
  • 26. 9/13/13 CFEngine Properties ● Small ● Secure (http://web.nvd.nist.gov/view/vuln/search)
  • 27. 9/13/13 CFEngine Properties ● Small ● Secure (http://web.nvd.nist.gov/view/vuln/search) ● Portable
  • 28. 9/13/13 CFEngine Properties ● Small ● Secure (http://web.nvd.nist.gov/view/vuln/search) ● Portable ● Resilient
  • 29. 9/13/13 CFEngine Properties ● Small ● Secure (http://web.nvd.nist.gov/view/vuln/search) ● Portable ● Resilient ● Declarative
  • 31. 9/13/13 CFEngine Demo Time ● Lets try some community contributed policy
  • 32. 9/13/13 cf-sketch ● Log in to your policy hub, locate the design center repository and access the cf-sketch shell – vagrant ssh hub – sudo -i – cd /vagrant/resources/design-center/tools/cf-sketch – ./cf-sketch.pl
  • 33. 9/13/13 Configure Timezones ● search time ● info -v tzconfig ● install System::tzconfig ● define paramset System::tzconfig – Name: NO_Oslo_TZ – Timezone: Europe/Oslo – Zoneinfo: /usr/share/zoneinfo
  • 34. 9/13/13 Configure Timezones ● search time ● install System::tzconfig ● define paramset System::tzconfig – Name: NO_Oslo_TZ – Timezone: Europe/Oslo – Zoneinfo: /usr/share/zoneinfo
  • 35. 9/13/13 Configure Timezones Cont. ● search time ● install System::tzconfig ● define paramset System::tzconfig – Name: US_Central_TZ – Timezone: US/Central – Zoneinfo: /usr/share/zoneinfo
  • 36. 9/13/13 Activate and Deploy Timezone Configuration ● activate System::tzconfig NO_Oslo_TZ hub ● activate System::tzconfig US_Central_TZ node001 ● deploy
  • 37. 9/13/13 Editor War! ● I prefer vim, and it's fun to mess with the emacs people ● services/editor_war.cf
  • 38. 9/13/13 Wage War ● Remove Disallowed Packages – vagrant ssh hub – watch rpm -q emacs-nox – Uncomment disallowed_packages to activate policy. Watch it get fixed. ● Install Required Packages – watch rpm -q vim-enhanced – Uncomment required_packages to activate policy
  • 39. 9/13/13 More Nodes! ● Increase nodes to 2 in Vagrantfile ● vagrant up ● vagrant ssh node00{1,2}
  • 40. 9/13/13 The Books ● Learning CFEngine 3 – Diego Zamboni ● Vagrant Up and Running – Mitchell Hashimoto