SlideShare una empresa de Scribd logo
1 de 42
Descargar para leer sin conexión
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!
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!

Más contenido relacionado

La actualidad más candente

node.js app deploy to heroku PaaS
node.js app deploy to heroku PaaSnode.js app deploy to heroku PaaS
node.js app deploy to heroku PaaSCaesar Chi
 
Django deployment and rpm+yum
Django deployment and rpm+yumDjango deployment and rpm+yum
Django deployment and rpm+yumWalter Liu
 
Easy WP Dev environments with VVV
Easy WP Dev environments with VVVEasy WP Dev environments with VVV
Easy WP Dev environments with VVVDaniel Stout
 
Helpful pre commit hooks for Python and Django
Helpful pre commit hooks for Python and DjangoHelpful pre commit hooks for Python and Django
Helpful pre commit hooks for Python and Djangoroskakori
 
Vagrant for Virtualized Development
Vagrant for Virtualized DevelopmentVagrant for Virtualized Development
Vagrant for Virtualized DevelopmentAdam Culp
 
Vagrant for Development
Vagrant for DevelopmentVagrant for Development
Vagrant for DevelopmentJacky Chan
 
VCCW - Vagrant based WordPress development environment
VCCW - Vagrant based WordPress development environmentVCCW - Vagrant based WordPress development environment
VCCW - Vagrant based WordPress development environmentTakayuki Miyauchi
 
Docker and fig for dev
Docker and fig for devDocker and fig for dev
Docker and fig for devpranas_algoteq
 
Node.js, Vagrant, Chef, and Mathoid @ Benetech
Node.js, Vagrant, Chef, and Mathoid @ BenetechNode.js, Vagrant, Chef, and Mathoid @ Benetech
Node.js, Vagrant, Chef, and Mathoid @ BenetechChristopher Bumgardner
 
EuroBSDCon 2021 - (auto)Installing BSD Systems
EuroBSDCon 2021 - (auto)Installing BSD SystemsEuroBSDCon 2021 - (auto)Installing BSD Systems
EuroBSDCon 2021 - (auto)Installing BSD SystemsVinícius Zavam
 
Build Lifecycle Craftsmanship for the Transylvania JUG
Build Lifecycle Craftsmanship for the Transylvania JUGBuild Lifecycle Craftsmanship for the Transylvania JUG
Build Lifecycle Craftsmanship for the Transylvania JUGMatthew McCullough
 
Wocker @WordBench Osaka No.41
Wocker @WordBench Osaka No.41Wocker @WordBench Osaka No.41
Wocker @WordBench Osaka No.41Kite Koga
 

La actualidad más candente (20)

node.js app deploy to heroku PaaS
node.js app deploy to heroku PaaSnode.js app deploy to heroku PaaS
node.js app deploy to heroku PaaS
 
Django deployment and rpm+yum
Django deployment and rpm+yumDjango deployment and rpm+yum
Django deployment and rpm+yum
 
Vagrant
VagrantVagrant
Vagrant
 
Easy WP Dev environments with VVV
Easy WP Dev environments with VVVEasy WP Dev environments with VVV
Easy WP Dev environments with VVV
 
Vagrant
VagrantVagrant
Vagrant
 
Vagrant
Vagrant Vagrant
Vagrant
 
Helpful pre commit hooks for Python and Django
Helpful pre commit hooks for Python and DjangoHelpful pre commit hooks for Python and Django
Helpful pre commit hooks for Python and Django
 
Skyfall b sides-c00-l-ed5-sp-2013
Skyfall b sides-c00-l-ed5-sp-2013Skyfall b sides-c00-l-ed5-sp-2013
Skyfall b sides-c00-l-ed5-sp-2013
 
Vagrant for Virtualized Development
Vagrant for Virtualized DevelopmentVagrant for Virtualized Development
Vagrant for Virtualized Development
 
Vagrant for Development
Vagrant for DevelopmentVagrant for Development
Vagrant for Development
 
VCCW - Vagrant based WordPress development environment
VCCW - Vagrant based WordPress development environmentVCCW - Vagrant based WordPress development environment
VCCW - Vagrant based WordPress development environment
 
Docker and fig for dev
Docker and fig for devDocker and fig for dev
Docker and fig for dev
 
Making of GameOver
Making of GameOverMaking of GameOver
Making of GameOver
 
Node.js, Vagrant, Chef, and Mathoid @ Benetech
Node.js, Vagrant, Chef, and Mathoid @ BenetechNode.js, Vagrant, Chef, and Mathoid @ Benetech
Node.js, Vagrant, Chef, and Mathoid @ Benetech
 
Introduction to Vagrant
Introduction to VagrantIntroduction to Vagrant
Introduction to Vagrant
 
EuroBSDCon 2021 - (auto)Installing BSD Systems
EuroBSDCon 2021 - (auto)Installing BSD SystemsEuroBSDCon 2021 - (auto)Installing BSD Systems
EuroBSDCon 2021 - (auto)Installing BSD Systems
 
Vagrant presentation
Vagrant presentationVagrant presentation
Vagrant presentation
 
OpenDaylight go
OpenDaylight goOpenDaylight go
OpenDaylight go
 
Build Lifecycle Craftsmanship for the Transylvania JUG
Build Lifecycle Craftsmanship for the Transylvania JUGBuild Lifecycle Craftsmanship for the Transylvania JUG
Build Lifecycle Craftsmanship for the Transylvania JUG
 
Wocker @WordBench Osaka No.41
Wocker @WordBench Osaka No.41Wocker @WordBench Osaka No.41
Wocker @WordBench Osaka No.41
 

Destacado

Bicing Analysis - Villes Cyclables
Bicing Analysis - Villes CyclablesBicing Analysis - Villes Cyclables
Bicing Analysis - Villes Cyclablesjgrivolla
 
Toronto VMware User Group Opening - Angelo Luciani
Toronto VMware User Group Opening - Angelo LucianiToronto VMware User Group Opening - Angelo Luciani
Toronto VMware User Group Opening - Angelo LucianiAngelo Luciani
 
Spoofing - o retorno
Spoofing - o retornoSpoofing - o retorno
Spoofing - o retornoLouise Scoz
 
Vagrant & CFEngine - LOPSA East 2013
Vagrant & CFEngine - LOPSA East 2013Vagrant & CFEngine - LOPSA East 2013
Vagrant & CFEngine - LOPSA East 2013Nick Anderson
 
Maximize Community Toronto VMUG - Mike Preston
Maximize Community Toronto VMUG - Mike PrestonMaximize Community Toronto VMUG - Mike Preston
Maximize Community Toronto VMUG - Mike PrestonAngelo Luciani
 
Security_Practices_with_CFEngine-cfgcamp_2016
Security_Practices_with_CFEngine-cfgcamp_2016Security_Practices_with_CFEngine-cfgcamp_2016
Security_Practices_with_CFEngine-cfgcamp_2016Nick Anderson
 
OpenStack and the Industry Shift with Open Cloud - Eric Wright
OpenStack and the Industry Shift with Open Cloud - Eric WrightOpenStack and the Industry Shift with Open Cloud - Eric Wright
OpenStack and the Industry Shift with Open Cloud - Eric WrightAngelo Luciani
 
The Heisenberg Uncertainty Principle[1]
The Heisenberg Uncertainty Principle[1]The Heisenberg Uncertainty Principle[1]
The Heisenberg Uncertainty Principle[1]guestea12c43
 
Stephen Covey The 90/10 Principle
Stephen Covey The 90/10 PrincipleStephen Covey The 90/10 Principle
Stephen Covey The 90/10 PrincipleChamnan Nop
 
Green Technology Powerpoint
Green Technology PowerpointGreen Technology Powerpoint
Green Technology Powerpointtylersihelnick
 

Destacado (14)

Bicing Analysis - Villes Cyclables
Bicing Analysis - Villes CyclablesBicing Analysis - Villes Cyclables
Bicing Analysis - Villes Cyclables
 
Toronto VMware User Group Opening - Angelo Luciani
Toronto VMware User Group Opening - Angelo LucianiToronto VMware User Group Opening - Angelo Luciani
Toronto VMware User Group Opening - Angelo Luciani
 
Spoofing - o retorno
Spoofing - o retornoSpoofing - o retorno
Spoofing - o retorno
 
P P T Flor S
P P T  Flor  SP P T  Flor  S
P P T Flor S
 
2016-02-01_dark
2016-02-01_dark2016-02-01_dark
2016-02-01_dark
 
Ppt Flor S
Ppt Flor SPpt Flor S
Ppt Flor S
 
Vagrant & CFEngine - LOPSA East 2013
Vagrant & CFEngine - LOPSA East 2013Vagrant & CFEngine - LOPSA East 2013
Vagrant & CFEngine - LOPSA East 2013
 
Maximize Community Toronto VMUG - Mike Preston
Maximize Community Toronto VMUG - Mike PrestonMaximize Community Toronto VMUG - Mike Preston
Maximize Community Toronto VMUG - Mike Preston
 
Green
GreenGreen
Green
 
Security_Practices_with_CFEngine-cfgcamp_2016
Security_Practices_with_CFEngine-cfgcamp_2016Security_Practices_with_CFEngine-cfgcamp_2016
Security_Practices_with_CFEngine-cfgcamp_2016
 
OpenStack and the Industry Shift with Open Cloud - Eric Wright
OpenStack and the Industry Shift with Open Cloud - Eric WrightOpenStack and the Industry Shift with Open Cloud - Eric Wright
OpenStack and the Industry Shift with Open Cloud - Eric Wright
 
The Heisenberg Uncertainty Principle[1]
The Heisenberg Uncertainty Principle[1]The Heisenberg Uncertainty Principle[1]
The Heisenberg Uncertainty Principle[1]
 
Stephen Covey The 90/10 Principle
Stephen Covey The 90/10 PrincipleStephen Covey The 90/10 Principle
Stephen Covey The 90/10 Principle
 
Green Technology Powerpoint
Green Technology PowerpointGreen Technology Powerpoint
Green Technology Powerpoint
 

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

Take Home Your Very Own Free Vagrant CFML Dev Environment
Take Home Your Very Own Free Vagrant CFML Dev Environment Take Home Your Very Own Free Vagrant CFML Dev Environment
Take Home Your Very Own Free Vagrant CFML Dev Environment ColdFusionConference
 
Take home your very own free Vagrant CFML Dev Environment - Presented at dev....
Take home your very own free Vagrant CFML Dev Environment - Presented at dev....Take home your very own free Vagrant CFML Dev Environment - Presented at dev....
Take home your very own free Vagrant CFML Dev Environment - Presented at dev....Gavin Pickin
 
Magento Docker Setup.pdf
Magento Docker Setup.pdfMagento Docker Setup.pdf
Magento Docker Setup.pdfAbid Malik
 
Automating with ansible (Part B)
Automating with ansible (Part B)Automating with ansible (Part B)
Automating with ansible (Part B)iman darabi
 
Wrangling 3rd Party Installers from Puppet
Wrangling 3rd Party Installers from PuppetWrangling 3rd Party Installers from Puppet
Wrangling 3rd Party Installers from PuppetPuppet
 
Android Platform Debugging and Development
Android Platform Debugging and DevelopmentAndroid Platform Debugging and Development
Android Platform Debugging and DevelopmentOpersys inc.
 
Crikeycon 2019 Velociraptor Workshop
Crikeycon 2019 Velociraptor WorkshopCrikeycon 2019 Velociraptor Workshop
Crikeycon 2019 Velociraptor WorkshopVelocidex Enterprises
 
Nomad + Flatcar: a harmonious marriage of lightweights
Nomad + Flatcar: a harmonious marriage of lightweightsNomad + Flatcar: a harmonious marriage of lightweights
Nomad + Flatcar: a harmonious marriage of lightweightsIago López Galeiras
 
Virtual box installation
Virtual box installationVirtual box installation
Virtual box installationNiranjan Pandey
 
Android Platform Debugging and Development
Android Platform Debugging and DevelopmentAndroid Platform Debugging and Development
Android Platform Debugging and DevelopmentOpersys inc.
 
Android Platform Debugging and Development
Android Platform Debugging and DevelopmentAndroid Platform Debugging and Development
Android Platform Debugging and DevelopmentOpersys inc.
 
Kubernetes is Hard! Lessons Learned Taking Our Apps to Kubernetes by Eldad Assis
Kubernetes is Hard! Lessons Learned Taking Our Apps to Kubernetes by Eldad AssisKubernetes is Hard! Lessons Learned Taking Our Apps to Kubernetes by Eldad Assis
Kubernetes is Hard! Lessons Learned Taking Our Apps to Kubernetes by Eldad AssisAgileSparks
 
DevOps Fest 2020. Николай Маржан. Consistent backups of multi-shard MongoDB
DevOps Fest 2020. Николай Маржан. Consistent backups of multi-shard MongoDBDevOps Fest 2020. Николай Маржан. Consistent backups of multi-shard MongoDB
DevOps Fest 2020. Николай Маржан. Consistent backups of multi-shard MongoDBDevOps_Fest
 
Android Platform Debugging and Development
Android Platform Debugging and DevelopmentAndroid Platform Debugging and Development
Android Platform Debugging and DevelopmentOpersys inc.
 
Android Platform Debugging and Development
Android Platform Debugging and DevelopmentAndroid Platform Debugging and Development
Android Platform Debugging and DevelopmentKarim Yaghmour
 
Android Platform Debugging and Development
Android Platform Debugging and DevelopmentAndroid Platform Debugging and Development
Android Platform Debugging and DevelopmentOpersys inc.
 
Android Platform Debugging and Development
Android Platform Debugging and DevelopmentAndroid Platform Debugging and Development
Android Platform Debugging and DevelopmentOpersys inc.
 
Vagrant workshop 2015
Vagrant workshop 2015Vagrant workshop 2015
Vagrant workshop 2015Haifa Ftirich
 
Android Platform Debugging and Development
Android Platform Debugging and DevelopmentAndroid Platform Debugging and Development
Android Platform Debugging and DevelopmentOpersys inc.
 

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

Take Home Your Very Own Free Vagrant CFML Dev Environment
Take Home Your Very Own Free Vagrant CFML Dev Environment Take Home Your Very Own Free Vagrant CFML Dev Environment
Take Home Your Very Own Free Vagrant CFML Dev Environment
 
Take home your very own free Vagrant CFML Dev Environment - Presented at dev....
Take home your very own free Vagrant CFML Dev Environment - Presented at dev....Take home your very own free Vagrant CFML Dev Environment - Presented at dev....
Take home your very own free Vagrant CFML Dev Environment - Presented at dev....
 
Magento Docker Setup.pdf
Magento Docker Setup.pdfMagento Docker Setup.pdf
Magento Docker Setup.pdf
 
Automating with ansible (Part B)
Automating with ansible (Part B)Automating with ansible (Part B)
Automating with ansible (Part B)
 
It gilde 20150209
It gilde 20150209It gilde 20150209
It gilde 20150209
 
Wrangling 3rd Party Installers from Puppet
Wrangling 3rd Party Installers from PuppetWrangling 3rd Party Installers from Puppet
Wrangling 3rd Party Installers from Puppet
 
Android Platform Debugging and Development
Android Platform Debugging and DevelopmentAndroid Platform Debugging and Development
Android Platform Debugging and Development
 
Crikeycon 2019 Velociraptor Workshop
Crikeycon 2019 Velociraptor WorkshopCrikeycon 2019 Velociraptor Workshop
Crikeycon 2019 Velociraptor Workshop
 
Nomad + Flatcar: a harmonious marriage of lightweights
Nomad + Flatcar: a harmonious marriage of lightweightsNomad + Flatcar: a harmonious marriage of lightweights
Nomad + Flatcar: a harmonious marriage of lightweights
 
Virtual box installation
Virtual box installationVirtual box installation
Virtual box installation
 
Android Platform Debugging and Development
Android Platform Debugging and DevelopmentAndroid Platform Debugging and Development
Android Platform Debugging and Development
 
Android Platform Debugging and Development
Android Platform Debugging and DevelopmentAndroid Platform Debugging and Development
Android Platform Debugging and Development
 
Kubernetes is Hard! Lessons Learned Taking Our Apps to Kubernetes by Eldad Assis
Kubernetes is Hard! Lessons Learned Taking Our Apps to Kubernetes by Eldad AssisKubernetes is Hard! Lessons Learned Taking Our Apps to Kubernetes by Eldad Assis
Kubernetes is Hard! Lessons Learned Taking Our Apps to Kubernetes by Eldad Assis
 
DevOps Fest 2020. Николай Маржан. Consistent backups of multi-shard MongoDB
DevOps Fest 2020. Николай Маржан. Consistent backups of multi-shard MongoDBDevOps Fest 2020. Николай Маржан. Consistent backups of multi-shard MongoDB
DevOps Fest 2020. Николай Маржан. Consistent backups of multi-shard MongoDB
 
Android Platform Debugging and Development
Android Platform Debugging and DevelopmentAndroid Platform Debugging and Development
Android Platform Debugging and Development
 
Android Platform Debugging and Development
Android Platform Debugging and DevelopmentAndroid Platform Debugging and Development
Android Platform Debugging and Development
 
Android Platform Debugging and Development
Android Platform Debugging and DevelopmentAndroid Platform Debugging and Development
Android Platform Debugging and Development
 
Android Platform Debugging and Development
Android Platform Debugging and DevelopmentAndroid Platform Debugging and Development
Android Platform Debugging and Development
 
Vagrant workshop 2015
Vagrant workshop 2015Vagrant workshop 2015
Vagrant workshop 2015
 
Android Platform Debugging and Development
Android Platform Debugging and DevelopmentAndroid Platform Debugging and Development
Android Platform Debugging and Development
 

Último

Triangle Vinyl Record Store, Clermont Florida
Triangle Vinyl Record Store, Clermont FloridaTriangle Vinyl Record Store, Clermont Florida
Triangle Vinyl Record Store, Clermont FloridaGabrielaMiletti
 
Russian⚡ Call Girls In Sector 104 Noida✨8375860717⚡Escorts Service
Russian⚡ Call Girls In Sector 104 Noida✨8375860717⚡Escorts ServiceRussian⚡ Call Girls In Sector 104 Noida✨8375860717⚡Escorts Service
Russian⚡ Call Girls In Sector 104 Noida✨8375860717⚡Escorts Servicedoor45step
 
Olivia Cox. intertextual references.pptx
Olivia Cox. intertextual references.pptxOlivia Cox. intertextual references.pptx
Olivia Cox. intertextual references.pptxLauraFagan6
 
Pragati Maidan Call Girls : ☎ 8527673949, Low rate Call Girls
Pragati Maidan Call Girls : ☎ 8527673949, Low rate Call GirlsPragati Maidan Call Girls : ☎ 8527673949, Low rate Call Girls
Pragati Maidan Call Girls : ☎ 8527673949, Low rate Call Girlsashishs7044
 
9654467111 Call Girls In Noida Sector 62 Short 1500 Night 6000
9654467111 Call Girls In Noida Sector 62 Short 1500 Night 60009654467111 Call Girls In Noida Sector 62 Short 1500 Night 6000
9654467111 Call Girls In Noida Sector 62 Short 1500 Night 6000Sapana Sha
 
Russian Call Girls Delhi NCR 9999965857 Call or WhatsApp Anytime
Russian Call Girls Delhi NCR 9999965857 Call or WhatsApp AnytimeRussian Call Girls Delhi NCR 9999965857 Call or WhatsApp Anytime
Russian Call Girls Delhi NCR 9999965857 Call or WhatsApp AnytimeKomal Khan
 
Karol Bagh Call Girls : ☎ 8527673949, Low rate Call Girls
Karol Bagh Call Girls : ☎ 8527673949, Low rate Call GirlsKarol Bagh Call Girls : ☎ 8527673949, Low rate Call Girls
Karol Bagh Call Girls : ☎ 8527673949, Low rate Call Girlsashishs7044
 
FULL ENJOY - 9953040155 Call Girls in Paschim Vihar | Delhi
FULL ENJOY - 9953040155 Call Girls in Paschim Vihar | DelhiFULL ENJOY - 9953040155 Call Girls in Paschim Vihar | Delhi
FULL ENJOY - 9953040155 Call Girls in Paschim Vihar | DelhiMalviyaNagarCallGirl
 
San Jon Motel, Motel/Residence, San Jon NM
San Jon Motel, Motel/Residence, San Jon NMSan Jon Motel, Motel/Residence, San Jon NM
San Jon Motel, Motel/Residence, San Jon NMroute66connected
 
FULL ENJOY - 9953040155 Call Girls in Dwarka Mor | Delhi
FULL ENJOY - 9953040155 Call Girls in Dwarka Mor | DelhiFULL ENJOY - 9953040155 Call Girls in Dwarka Mor | Delhi
FULL ENJOY - 9953040155 Call Girls in Dwarka Mor | DelhiMalviyaNagarCallGirl
 
Strip Zagor Extra 322 - Dva ortaka.pdf
Strip   Zagor Extra 322 - Dva ortaka.pdfStrip   Zagor Extra 322 - Dva ortaka.pdf
Strip Zagor Extra 322 - Dva ortaka.pdfStripovizijacom
 
Burari Call Girls : ☎ 8527673949, Low rate Call Girls
Burari Call Girls : ☎ 8527673949, Low rate Call GirlsBurari Call Girls : ☎ 8527673949, Low rate Call Girls
Burari Call Girls : ☎ 8527673949, Low rate Call Girlsashishs7044
 
Akola Call Girls #9907093804 Contact Number Escorts Service Akola
Akola Call Girls #9907093804 Contact Number Escorts Service AkolaAkola Call Girls #9907093804 Contact Number Escorts Service Akola
Akola Call Girls #9907093804 Contact Number Escorts Service Akolasrsj9000
 
Roadrunner Lodge, Motel/Residence, Tucumcari NM
Roadrunner Lodge, Motel/Residence, Tucumcari NMRoadrunner Lodge, Motel/Residence, Tucumcari NM
Roadrunner Lodge, Motel/Residence, Tucumcari NMroute66connected
 
FULL ENJOY - 9953040155 Call Girls in Laxmi Nagar | Delhi
FULL ENJOY - 9953040155 Call Girls in Laxmi Nagar | DelhiFULL ENJOY - 9953040155 Call Girls in Laxmi Nagar | Delhi
FULL ENJOY - 9953040155 Call Girls in Laxmi Nagar | DelhiMalviyaNagarCallGirl
 
9654467111 Full Enjoy @24/7 Call Girls In Saket Delhi Ncr
9654467111 Full Enjoy @24/7 Call Girls In Saket Delhi Ncr9654467111 Full Enjoy @24/7 Call Girls In Saket Delhi Ncr
9654467111 Full Enjoy @24/7 Call Girls In Saket Delhi NcrSapana Sha
 
Khanpur Call Girls : ☎ 8527673949, Low rate Call Girls
Khanpur Call Girls : ☎ 8527673949, Low rate Call GirlsKhanpur Call Girls : ☎ 8527673949, Low rate Call Girls
Khanpur Call Girls : ☎ 8527673949, Low rate Call Girlsashishs7044
 
Russian⚡ Call Girls In Sector 39 Noida✨8375860717⚡Escorts Service
Russian⚡ Call Girls In Sector 39 Noida✨8375860717⚡Escorts ServiceRussian⚡ Call Girls In Sector 39 Noida✨8375860717⚡Escorts Service
Russian⚡ Call Girls In Sector 39 Noida✨8375860717⚡Escorts Servicedoor45step
 
FULL ENJOY - 9953040155 Call Girls in New Ashok Nagar | Delhi
FULL ENJOY - 9953040155 Call Girls in New Ashok Nagar | DelhiFULL ENJOY - 9953040155 Call Girls in New Ashok Nagar | Delhi
FULL ENJOY - 9953040155 Call Girls in New Ashok Nagar | DelhiMalviyaNagarCallGirl
 

Último (20)

Triangle Vinyl Record Store, Clermont Florida
Triangle Vinyl Record Store, Clermont FloridaTriangle Vinyl Record Store, Clermont Florida
Triangle Vinyl Record Store, Clermont Florida
 
Russian⚡ Call Girls In Sector 104 Noida✨8375860717⚡Escorts Service
Russian⚡ Call Girls In Sector 104 Noida✨8375860717⚡Escorts ServiceRussian⚡ Call Girls In Sector 104 Noida✨8375860717⚡Escorts Service
Russian⚡ Call Girls In Sector 104 Noida✨8375860717⚡Escorts Service
 
Olivia Cox. intertextual references.pptx
Olivia Cox. intertextual references.pptxOlivia Cox. intertextual references.pptx
Olivia Cox. intertextual references.pptx
 
Pragati Maidan Call Girls : ☎ 8527673949, Low rate Call Girls
Pragati Maidan Call Girls : ☎ 8527673949, Low rate Call GirlsPragati Maidan Call Girls : ☎ 8527673949, Low rate Call Girls
Pragati Maidan Call Girls : ☎ 8527673949, Low rate Call Girls
 
9654467111 Call Girls In Noida Sector 62 Short 1500 Night 6000
9654467111 Call Girls In Noida Sector 62 Short 1500 Night 60009654467111 Call Girls In Noida Sector 62 Short 1500 Night 6000
9654467111 Call Girls In Noida Sector 62 Short 1500 Night 6000
 
Russian Call Girls Delhi NCR 9999965857 Call or WhatsApp Anytime
Russian Call Girls Delhi NCR 9999965857 Call or WhatsApp AnytimeRussian Call Girls Delhi NCR 9999965857 Call or WhatsApp Anytime
Russian Call Girls Delhi NCR 9999965857 Call or WhatsApp Anytime
 
Karol Bagh Call Girls : ☎ 8527673949, Low rate Call Girls
Karol Bagh Call Girls : ☎ 8527673949, Low rate Call GirlsKarol Bagh Call Girls : ☎ 8527673949, Low rate Call Girls
Karol Bagh Call Girls : ☎ 8527673949, Low rate Call Girls
 
FULL ENJOY - 9953040155 Call Girls in Paschim Vihar | Delhi
FULL ENJOY - 9953040155 Call Girls in Paschim Vihar | DelhiFULL ENJOY - 9953040155 Call Girls in Paschim Vihar | Delhi
FULL ENJOY - 9953040155 Call Girls in Paschim Vihar | Delhi
 
San Jon Motel, Motel/Residence, San Jon NM
San Jon Motel, Motel/Residence, San Jon NMSan Jon Motel, Motel/Residence, San Jon NM
San Jon Motel, Motel/Residence, San Jon NM
 
FULL ENJOY - 9953040155 Call Girls in Dwarka Mor | Delhi
FULL ENJOY - 9953040155 Call Girls in Dwarka Mor | DelhiFULL ENJOY - 9953040155 Call Girls in Dwarka Mor | Delhi
FULL ENJOY - 9953040155 Call Girls in Dwarka Mor | Delhi
 
Strip Zagor Extra 322 - Dva ortaka.pdf
Strip   Zagor Extra 322 - Dva ortaka.pdfStrip   Zagor Extra 322 - Dva ortaka.pdf
Strip Zagor Extra 322 - Dva ortaka.pdf
 
Burari Call Girls : ☎ 8527673949, Low rate Call Girls
Burari Call Girls : ☎ 8527673949, Low rate Call GirlsBurari Call Girls : ☎ 8527673949, Low rate Call Girls
Burari Call Girls : ☎ 8527673949, Low rate Call Girls
 
Akola Call Girls #9907093804 Contact Number Escorts Service Akola
Akola Call Girls #9907093804 Contact Number Escorts Service AkolaAkola Call Girls #9907093804 Contact Number Escorts Service Akola
Akola Call Girls #9907093804 Contact Number Escorts Service Akola
 
Roadrunner Lodge, Motel/Residence, Tucumcari NM
Roadrunner Lodge, Motel/Residence, Tucumcari NMRoadrunner Lodge, Motel/Residence, Tucumcari NM
Roadrunner Lodge, Motel/Residence, Tucumcari NM
 
FULL ENJOY - 9953040155 Call Girls in Laxmi Nagar | Delhi
FULL ENJOY - 9953040155 Call Girls in Laxmi Nagar | DelhiFULL ENJOY - 9953040155 Call Girls in Laxmi Nagar | Delhi
FULL ENJOY - 9953040155 Call Girls in Laxmi Nagar | Delhi
 
9654467111 Full Enjoy @24/7 Call Girls In Saket Delhi Ncr
9654467111 Full Enjoy @24/7 Call Girls In Saket Delhi Ncr9654467111 Full Enjoy @24/7 Call Girls In Saket Delhi Ncr
9654467111 Full Enjoy @24/7 Call Girls In Saket Delhi Ncr
 
Khanpur Call Girls : ☎ 8527673949, Low rate Call Girls
Khanpur Call Girls : ☎ 8527673949, Low rate Call GirlsKhanpur Call Girls : ☎ 8527673949, Low rate Call Girls
Khanpur Call Girls : ☎ 8527673949, Low rate Call Girls
 
Russian⚡ Call Girls In Sector 39 Noida✨8375860717⚡Escorts Service
Russian⚡ Call Girls In Sector 39 Noida✨8375860717⚡Escorts ServiceRussian⚡ Call Girls In Sector 39 Noida✨8375860717⚡Escorts Service
Russian⚡ Call Girls In Sector 39 Noida✨8375860717⚡Escorts Service
 
call girls in Noida New Ashok Nagar 🔝 >༒8448380779 🔝 genuine Escort Service 🔝...
call girls in Noida New Ashok Nagar 🔝 >༒8448380779 🔝 genuine Escort Service 🔝...call girls in Noida New Ashok Nagar 🔝 >༒8448380779 🔝 genuine Escort Service 🔝...
call girls in Noida New Ashok Nagar 🔝 >༒8448380779 🔝 genuine Escort Service 🔝...
 
FULL ENJOY - 9953040155 Call Girls in New Ashok Nagar | Delhi
FULL ENJOY - 9953040155 Call Girls in New Ashok Nagar | DelhiFULL ENJOY - 9953040155 Call Girls in New Ashok Nagar | Delhi
FULL ENJOY - 9953040155 Call Girls in New Ashok Nagar | Delhi
 

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!
  • 20.
  • 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