Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Continuous Lifecycle 2013: Mit Puppen spielen -...
Search
Bastian Spanneberg
November 11, 2013
Technology
0
120
Continuous Lifecycle 2013: Mit Puppen spielen - Testsysteme automatisieren mit Vagrant und Puppet
Slides zu meinem Vagrant/Puppet Talk auf der Continuous Lifecycle 2013 in Karlsruhe
Bastian Spanneberg
November 11, 2013
Tweet
Share
More Decks by Bastian Spanneberg
See All by Bastian Spanneberg
The road to SRE
spanneberg
0
100
Continuous Delivery. Lessons (Not) Learned.
spanneberg
0
180
Deployments automatisieren und testen mit Ansible und ServerSpec
spanneberg
0
460
Other Decks in Technology
See All in Technology
ヒューリスティック評価を用いたゲームQA実践事例
gree_tech
PRO
0
540
BPaaSにおける人と協働する前提のAIエージェント-AWS登壇資料
kentarofujii
0
120
ここ一年のCCoEとしてのAWSコスト最適化を振り返る / CCoE AWS Cost Optimization devio2025
masahirokawahara
1
1.5k
AWSで始める実践Dagster入門
kitagawaz
0
240
【初心者向け】ローカルLLMの色々な動かし方まとめ
aratako
7
3.2k
DDD集約とサービスコンテキスト境界との関係性
pandayumi
2
260
LLMを搭載したプロダクトの品質保証の模索と学び
qa
0
760
Language Update: Java
skrb
2
260
おやつは300円まで!の最適化を模索してみた
techtekt
PRO
0
270
2025年になってもまだMySQLが好き
yoku0825
8
4k
allow_retry と Arel.sql / allow_retry and Arel.sql
euglena1215
1
150
Automating Web Accessibility Testing with AI Agents
maminami373
0
1k
Featured
See All Featured
Side Projects
sachag
455
43k
Practical Orchestrator
shlominoach
190
11k
What's in a price? How to price your products and services
michaelherold
246
12k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3k
A Tale of Four Properties
chriscoyier
160
23k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.4k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
111
20k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
580
A designer walks into a library…
pauljervisheath
207
24k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
9
800
Automating Front-end Workflow
addyosmani
1370
200k
How to Ace a Technical Interview
jacobian
279
23k
Transcript
codecentric AG Mit Puppen spielen Testsysteme automatisieren mit Vagrant und
Puppet Bastian Spanneberg @spanneberg
codecentric AG Testsysteme ?
codecentric AG [Gefühlte] Wahrheit: Wo verbringen Entwickler/QAs? Testsystem Produktion
codecentric AG Dokumentation?
codecentric AG Wie solide sind Testsysteme gebaut?
codecentric AG Das geht besser!
codecentric AG Los geht's ... > vagrant init precise64 http://.../precise64.box
> vagrant up > vagrant ssh
codecentric AG Vagrantfile Vagrant.configure("2") do |config| config.vm.box = "precise64" config.vm.box_url
= “..." end
codecentric AG ... > vagrant package > vagrant halt >
vagrant destroy > vagrant provision
codecentric AG Synced Folders config.vm.synced_folder "path_on_host", "/opt/guest_path" config.vm.synced_folder ... owner:
“foo”, group: “bar”, nfs: true, disabled: true
codecentric AG Networking config.vm.network :forwarded_port, guest: 80, host: 8080 [,auto_correct:
true] config.vm.network :private_network, ip: "192.168.50.4" config.vm.network :public network
codecentric AG Multi VM Umgebungen config.vm.define "app01" do |app01| app01.vm.host_name
= “app.local” app01.vm.box = "appserverimage" end config.vm.define "db01" do |db01| db01.vm.host_name = “db.local” db01.vm.box = "dbserverimage" end
codecentric AG Provisioning (Shell) Vagrant.configure("2") do |config| config.vm.box = "precise64"
config.vm.provision :shell, inline: "echo 'Vagrant was here!' > /etc/motd.tail" end
codecentric AG Provisioning (Puppet) config.vm.provision :puppet do |puppet| puppet.manifests_path =
"manifests" puppet.module_path = "modules" puppet.manifest_file = "site.pp" puppet.options = "..." end
codecentric AG Puppet – Resourcen resource_type { 'name' : attribut1
=> wert1, attribut2 => wert2, … } • Zustandbeschreibung • Keine garantierte Reihenfolge • Idempotenz
codecentric AG Puppet – Verbreitete Resourcen (1) file { '/etc/motd.tail'
: ensure => present, owner => root, group => root, mode => 644, content => 'This machine is managed by Puppet' } • Für Files, Links, Directories • “source” für Verweis auf externe Dateien • Ruby Templates
codecentric AG Puppet – Verbreitete Resourcen (2) package { 'apache2'
: ensure => installed, } service { 'apache2' : ensure => running, require => Package['apache2'], }
codecentric AG Puppet – Verbreitete Resourcen (3) group { 'foo'
: ensure => present, } user { 'foo' : ensure => present, gid => 'foo', managehome => true, shell => '/bin/bash', }
codecentric AG Puppet – Verbreitete Resourcen (4) exec { 'dltomcat'
: command => '/usr/bin/wget … foo.tgz', cwd => '/tmp', creates => '/tmp/foo.tgz', } exec { 'unpacktomcat' : command => '/bin/tar xzf …', unless => '/usr/bin/test d …', require => Exec['dltomcat'], }
codecentric AG Puppet – Metaparameter type { 'foobar' : before
=> …, require => …, notify => …, subscribe => …, alias => …, } • Auf alle Typen anwendbar • Modellierung von Abhängigkeiten
codecentric AG Puppet – Fakten, Klassen, Module, Nodes • Fakten
→ Infos über das System • Klassen → Gruppierung von Resourcen • Module → Wiederverwendung • Nodes → Beschreibung von Hosts → Demo
codecentric AG Puppet - Forge → forge.puppetlabs.com > puppet module
install mysql • Module für nahezu jeden Zweck • Guter Startpunkt zum Vertiefen
codecentric AG Puppet – Best Practice • Komma nach den
Attributes • Einrückung. Spaces. • Execs vermeiden! • Pakte verwenden wenn möglich • Lohnt sich ein eigenes Paket? • Potentiale für Wiederverwendung finden
codecentric AG Next step: Infrastruktur-Projekt ./modules/ ./manifests/ ./hiera/common.yaml ./hiera/local.yaml ./hiera/test.yaml
./hiera/staging.yaml ./Vagrantfile • Grundlage für Zusammenarbeit mit Betrieb • Reviews. Pair Programming. DevOps-Kultur :)
codecentric AG Next interesting steps • Puppetmaster • Dashboards: The
Foreman, Puppet Enterprise • mcollective • Puppet + rspec • Vagrant Cloud Provider (AWS, OpenStack) • Vagrantfile = Ruby-Skript • Custom Facts + Function mit Ruby
codecentric AG Danke! Fragen? • Wir suchen Kollegen! • Karlsruhe
:) • München • Hamburg • Frankfurt • Berlin • Düsseldorf • Solingen