Successfully reported this slideshow.
Your SlideShare is downloading. ×

Einführung in Puppet und Vagrant

Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Upcoming SlideShare
Oracle WebLogic for DevOps
Oracle WebLogic for DevOps
Loading in …3
×

Check these out next

1 of 39 Ad

More Related Content

Slideshows for you (20)

Similar to Einführung in Puppet und Vagrant (20)

Advertisement

Einführung in Puppet und Vagrant

  1. 1. Vagrant - How to make your Dev-Env awesome. Eine kleine Einführung in puppet und vagrant. Sönke Ruempler -- @s0enke PHP Unconference 2011
  2. 2. Ich "last level support" - von strace bis OOP "WannaBe-DevOP" "Systems thinking"
  3. 3. Jimdo Website Builder seit 2007 "Startup" 5 Millionen Registrations 12 Sprachen
  4. 4. Agenda a.k.a. "Der Inhalt ist immer invers proportional zum Aufwand, der ins Layout gesteckt wurde" :-) ● Was ist Konfigurationsmanagement? ● Was ist puppet? ● Was ist vagrant? ● Live-Hacking: Starten eines kleinen Clusters auf dem Laptop inkl. einer Hello-World-App
  5. 5. Configuration Management Wer kennt es? Wie setzt ihr Server auf? ● Golden Image? ● Bash Script? ● Wiki? ● Tool?
  6. 6. Server-Admin Probleme Wie setze ich einen Server reproduzierbar auf? Denn: Wiki / Doku verstaubt oder wird nicht gefunden Wie hält man es auf Stand? Einloggen auf alle n Server?
  7. 7. http://www.slideshare.net/socializedsoftware/crash-course-in-open-source-cloud-computing
  8. 8. Infrastructure as code http://www.puppetlabs.com/
  9. 9. ausführbare, testbare und versionierte Server-Dokumentation Config-Deployment schnell, oft und reproduzierbar
  10. 10. seit 2004
  11. 11. eine deklarative, abstrakte DSL für Sysadmins, um Systemkonfiguration zu beschreiben
  12. 12. Idempotent f(x) = f(f(x))
  13. 13. Manifests
  14. 14. puppet classes class webserver { package { "apache2": ensure => present, # apt-get etc. } file { "/etc/apache2/apache2.conf" : ensure => present source => "puppet:///apache2/apache2.conf" } }
  15. 15. puppet nodes node "web" { $db_server = "db1" include webserver } node db1, db2, db3 { include mysql }
  16. 16. Services Modules (google: "puppet <package/daemon>") Variables, Templates Inheritance, zB bei Nodes
  17. 17. http://www.puppetlabs.com/puppet/how-puppet-works/
  18. 18. Client / Server
  19. 19. ? Questions so far ...
  20. 20. vagrant - even the logo is cool! www.vagrantup.com - kudos to Mitchell Hashimto
  21. 21. Dev-Umgebung: Ist-Analyse Wie entwickelt ihr und wie setzt ihr euer Dev-System auf? ● Lokal auf dem Desktop? ● Testserver? ● Sandboxes auf VM-Server? ● lokale VMs? ● Noch anders?
  22. 22. Soll-Zustand (Businessanforderungen)
  23. 23. vagrant to the rescue!
  24. 24. Soll-Zustand I Isolation der Testumgebung vs. Dein Desktop - ein Softwarezoo: Browser, Webserver, Musikplayer, Datenbankserver, Editor) oder geteilter Testserver: Shared Ressourcen, Shared Software -> Kollisionen (Beispiel: memcache keys oder "Lass uns mal PHP 5.3 ausprobieren")
  25. 25. Soll-Zustand II Wiederholbar vs. nach 6 Monaten findet Kunde einen Bug, wie lange brauchst du, um das Projekt "rauszukramen" und den Fehler zu reproduzieren / fixen ? oder z. B. lange Einrichtung bei Neuem Mitarbeiter / Projektbeteiligter oder: 3 Wochen Urlaub, Testsystem völig outdated
  26. 26. Soll-Zustand III Einheitlichkeit vs. "It works on my machine" Anderes OS als in Produktion (!) Andere Kernel (32 vs. 64bit), Libs, Software und Versionen als in Produktion ... PHP (is_a() anyone?)
  27. 27. Definition: Was ist vagrant "Vagrant is a tool for building and distributing virtualized development environments." "By providing automated creation and provisioning of virtual machines using Oracle’s VirtualBox, Vagrant provides the tools to create and configure lightweight, reproducible, and portable virtual environments.
  28. 28. Was ist vagrant? ● "Dev-Env zum Mitnehmen" ● Verwaltung des VM Lebenszyklus ● Shared Folders / lokales NFS ● SSH ● Konfiguration der VMs via Puppet / Chef / bash-script ● komplexe Multi-VM-Setups inkl. privatem Netzwerk ● Framework zur Erstellung von VM-BaseImages (Base Boxes)
  29. 29. Vagrantfile ● Beschreibt die VM(s) ● Eins pro Projekt - kommt mit in die Versionskontrolle deines Projekts ● Configfile ist Ruby (und damit scriptbar) That's it (für eine VM)!
  30. 30. == Hardware Software
  31. 31. Workflow(s) vagrant init vagrant up vagrant reload vagrant provision vagrant ssh vagrant halt vagrant destroy
  32. 32. NO! ZOMG ACTION!!11
  33. 33. Action! soenke♥kellerautomat:~$ gem install vagrant
  34. 34. beyond ... Vagrant -> Cloud: mccloud (https://github.com/jedi4ever/mccloud (by Patrick Debois - father of devopsdays!)) cucumber-nagios: Ecosystem as Code cucumber-puppet: Behavior Driven Administration

×