On October 23rd, 2014, we updated our
By continuing to use LinkedIn’s SlideShare service, you agree to the revised terms, so please take a few minutes to review them.
~# vagrantTasks: vagrant basebox # Commands to manage baseboxes vagrant box # Commands to manage system boxes vagrant destroy # Destroy the environment, deleting the created virtualmachines vagrant halt # Halt the running VMs in the environment vagrant help [TASK] # Describe available tasks or one specific task vagrant init [box_name] [box_url] # Initializes the current folder forVagrant usage vagrant package # Package a Vagrant environment for distribution vagrant provision # Rerun the provisioning scripts on a running VM vagrant reload # Reload the environment, halting it then restartingit. vagrant resume # Resume a suspended Vagrant environment. vagrant ssh # SSH into the currently running Vagrant environment. vagrant ssh_config # outputs .ssh/config valid syntax for connecting tothis environment via ssh vagrant status # Shows the status of the current Vagrant environment. vagrant suspend # Suspend a running Vagrant environment. vagrant up # Creates the Vagrant environment vagrant version # Prints the Vagrant version information
2. Manage your configuration
• Configuration as (Ruby-)Code• Client-only or Client-server Setup• there is a series-b funded company in the background• both are officially supported by amazon• there are a lot of BIG customers using the tool• good documentation• good, vibrant communities
• both know the current configuration (ohai and facter)• You define your nodes (Servers)• using a lot of pre-existing resources• and a lot of default community-built cookbooks / modules• it‘s easy to extend using ruby• use configuration file templates• use providers as platform abstractions (for packaging, ...)
• Chef is actually Ruby, Puppet provides a DSL• puppet has the bigger community• puppet has more documentation• but chef is growing fast in both regards• puppet = europe, chef = usa• chef is more flexible because of native ruby• chef is more flexible because of clever data structures
There is no „better“ tool.
There is no „better“ tool.But we prefer Puppet. Less Ruby :-)
Ok, that was a lot of work. Why did i do that again?
Collection of Wins Failsafety Simplicity Fast Setup TimeRepeatability Self-ServiceConsistency Version Management http://www.flickr.com/photos/turtlemom_nancy/
There is no golden Image anymore
There is just one directory in your source ...
„vagrant up“„vagrant provision“
Even more vagrant fun ...
Fail Safety with Vagrant-Snapvagrant snap take -d “snap1“vagrant snap listvagrant snap go “snap1“
What if i need tosimulate 20
McCloudWrapper likeVagrant around FogTransparent local & cloud usageSupports EC2, OpenStack, KVM, etc
What if i need tosimulate 2000machines?
mCollectivedssh/ssh-for-loop on steroidsfast management for loads of serversuses puppet/facter or chef/ohai, MQ- based
$ mc-package -W "architecture=x86" status apache * [ ============================================================> ] 10 / 10host01.example.com version = apache-2.2.9-7host02.example.com version = apache-2.2.9-7host03.example.com version = apache-2.2.9-7host04.example.com version = apache-2.2.9-7host05.example.com version = apache-2.2.9-7host06.example.com version = apache-2.2.9-7host07.example.com version = apache-2.2.9-7host08.example.com version = apache-2.2.9-7host09.example.com version = apache-2.2.9-7host10.example.com version = apache-2.2.9-7---- package agent summary ---- Nodes: 10 / 10 Versions: 10 * 0.25.5-1.el5 Elapsed Time: 1.03 s
The Foreman - Machine Life CycleManagementActs as a web front end for PuppetShows You the system inventoryCreates new machines and takes care of provisioning
Knowing everything about yourserver configuration is great!
Create new servers
Your (possible) Todolist
1. Install Vagrant, Veewee etc
2. Add anconﬁgurationfolder to your
3. Conﬁgure Your Vagrant images using chef or puppet
4. Setup a chef-or puppet-server using this conﬁguration
5. Move your CI, Staging andProduction-Setup to chef/puppet, too
6. Create a self-service-plattform for thedevelopment team
More cool stuff you can do:
Test-Driven infrastructure using chef/puppet-cucumber
Automatedmonitoring usingnagios or munin
Automatedreporting using graphite
Thanks!Johann-Peter Hartmannjohann__ @ freenode I hope you enjoyed it!Mail / Jabber:firstname.lastname@example.orgFurther reading:http://www.planetdevops.nethttp://dzone.comhttp://twitter.com/#!/DEVOPS_BORAThttp://github.com/johannhartmann/
Vegetable Test DrivenInfrastructure Kontinuierliche Entiwcklung - und dann? I Mayﬂower GmbH I 28. Oktober 2010 I 87
actually a behavior driven design toolused for test driven infrastructurecucumber-puppetchef-cucumber
Feature: Manualsearch In order to find an article As an developer I want to use the search function Scenario: Search for bdd and check resulting page Given I go to "http://it-republik.de/php/" When I fill in "search_itr" with "bdd" And I click "search2" Then I should see "Suche"
Given /^I go to "([^"]*)"$/ do |url| visit urlendWhen /^I fill in "([^"]*)" with "([^"]*)"$/ do |field, value| fill_in field, :with => valueendWhen /^I click "([^"]*)"$/ do |button| click_button(button)endThen /^I should see "([^"]*)"$/ do |text| response_body.should include(text)end
johann$ cucumberFeature: Manualsearch In order to find an article As an developer I want to use the search function Scenario: Search for bdd and check resulting page # features/search.feature:5 Given I go to "http://it-republik.de/php/" # features/step_definitions/search_steps.rb:1 When I fill in "search_itr" with "bdd" # features/step_definitions/search_steps.rb:5 And I click "search2" # features/step_definitions/search_steps.rb:9 Then I should see "Suche" # features/step_definitions/search_steps.rb:131 scenario (1 passed)4 steps (4 passed)0m1.615s
Feature: Install inetd In order to serve the web the httpd service must be installed Scenario: Setup httpd Given a node of class “web“ When I compile the catalog Then package “httpd“ should be “installed“ Then there should be a resource “Service[httpd]“ And the service should have “enable“ set to “true“ And State should be “running“ And the service should require “Package[httpd]“ Kontinuierliche Entiwcklung - und dann? I Mayﬂower GmbH I 28. Oktober 2010 I 92
Hey, i understandOperations - and i‘m working in marketing
Unit TestsAcceptance TestsMetricsCoding Style... you get theidea.
... and evenmore ...PackagingInfrastructureUpdatesReleasesDeployment
Eat together http://www.flickr.com/photos/vilavelosa/ 3815032524/
Plantogether Kontinuierliche Entiwcklung - und dann? I Mayﬂower GmbH I 28. Oktober 2010 I 103
Wetware - Mayflower 1-2 Ops per team • Admin & Development tasks • full time working within the team
Wetware - MayflowerClose cooperation with central operationsFull root access for any development-infrastructre
Wetware - Mayflower1+n Puppet-Master • central company master • Team puppet master per team / project • company master is starting point for the project puppet configuration
Wetware - MayflowerExample Setup: • local Developer VM • CI-Deployment-Server in the DMZ • Staging in the private Cloud • Beta happens in the Amazon-Cloud • Production in AWS, too
Wetware - Mayflowerlocal GIT- / Gitorious-ServerEucalyptus-Cloud in the DMZ - as Self-Service!
Wetware - Mayflower Vagrant for Development Scrum => KanBan Puppet Nagios