![Page 1: Vagrant, Ansible, Docker for developers and architectsgotocon.com/dl/goto-berlin-2015/GOTO_Nights/goto_englisch_slide... · Vagrant, Ansible, Docker for developers and architects](https://reader030.vdocuments.site/reader030/viewer/2022013120/5aede45e7f8b9a3669919814/html5/thumbnails/1.jpg)
OPITZ CONSULTING Vorlage Powerpoint 2011; Version 1.3; 10.05.2011; TGA, KSH
Vagrant, Ansible, Docker for
developers and architects
![Page 2: Vagrant, Ansible, Docker for developers and architectsgotocon.com/dl/goto-berlin-2015/GOTO_Nights/goto_englisch_slide... · Vagrant, Ansible, Docker for developers and architects](https://reader030.vdocuments.site/reader030/viewer/2022013120/5aede45e7f8b9a3669919814/html5/thumbnails/2.jpg)
OPITZ CONSULTING Vorlage Powerpoint 2011; Version 1.3; 10.05.2011; TGA, KSH
Kontakt 1. fach: • Diese Folie wird als vorletzte
Folie genutzt, um den
individuellen Bezug zum
Referenten herzustellen.
• Als Foto muss ein
quadratisches Foto des
Referenten in qualitativ
hochwertiger Form vorliegen.
• Das Foto geht über 3
Rasterbreiten.
• Die Daten der Adresse sollten
vollst. eingegeben werden
Richard Attermeyer
father, software architect and developer
Design: • Das Farbschema ist im
Design als „OC 2009“
hinterlegt.
• Ebenso sind die Schriftarten
als „OC 2009“ hinterlegt.
• Die Standardfarben sind:
Focus Areas
Software Architecture
Java Technologies
Continuous Delivery und DevOps
@rattermeyer
github.com/rattermeyer
xing.to/rat
http://de.slideshare.net/opitzconsulting
![Page 3: Vagrant, Ansible, Docker for developers and architectsgotocon.com/dl/goto-berlin-2015/GOTO_Nights/goto_englisch_slide... · Vagrant, Ansible, Docker for developers and architects](https://reader030.vdocuments.site/reader030/viewer/2022013120/5aede45e7f8b9a3669919814/html5/thumbnails/3.jpg)
OPITZ CONSULTING Vorlage Powerpoint 2011; Version 1.3; 10.05.2011; TGA, KSH
Agenda
![Page 4: Vagrant, Ansible, Docker for developers and architectsgotocon.com/dl/goto-berlin-2015/GOTO_Nights/goto_englisch_slide... · Vagrant, Ansible, Docker for developers and architects](https://reader030.vdocuments.site/reader030/viewer/2022013120/5aede45e7f8b9a3669919814/html5/thumbnails/4.jpg)
OPITZ CONSULTING Vorlage Powerpoint 2011; Version 1.3; 10.05.2011; TGA, KSH
High-Level Overview
VMs, Config Mgmt, Container
Development + Continuous
Delivery
![Page 5: Vagrant, Ansible, Docker for developers and architectsgotocon.com/dl/goto-berlin-2015/GOTO_Nights/goto_englisch_slide... · Vagrant, Ansible, Docker for developers and architects](https://reader030.vdocuments.site/reader030/viewer/2022013120/5aede45e7f8b9a3669919814/html5/thumbnails/5.jpg)
OPITZ CONSULTING Vorlage Powerpoint 2011; Version 1.3; 10.05.2011; TGA, KSH
Continuous Delivery Collection of techniques, processes and tools,
which are used to improve the process of software
delivery
![Page 6: Vagrant, Ansible, Docker for developers and architectsgotocon.com/dl/goto-berlin-2015/GOTO_Nights/goto_englisch_slide... · Vagrant, Ansible, Docker for developers and architects](https://reader030.vdocuments.site/reader030/viewer/2022013120/5aede45e7f8b9a3669919814/html5/thumbnails/6.jpg)
OPITZ CONSULTING Vorlage Powerpoint 2011; Version 1.3; 10.05.2011; TGA, KSH
Folie nur mit Bilddfasd • TODO: Design und Inhalt
• Dies ist eine Variante des
Haupttemplates für Seiten
mit einem großflächigen
Bild und ohne Textbereich
• Titel: ohne Titel!
• Inhalt:
• Grafik/Diagramm etc. aus
externen Quellen
• Fußzeile: ohne Fußzeile
Bildquelle / URL
Where to start?
![Page 7: Vagrant, Ansible, Docker for developers and architectsgotocon.com/dl/goto-berlin-2015/GOTO_Nights/goto_englisch_slide... · Vagrant, Ansible, Docker for developers and architects](https://reader030.vdocuments.site/reader030/viewer/2022013120/5aede45e7f8b9a3669919814/html5/thumbnails/7.jpg)
OPITZ CONSULTING Vorlage Powerpoint 2011; Version 1.3; 10.05.2011; TGA, KSH
Setting up the work environment
Distributing work environment
changes
Versioning of work environments
„Works on my machine“
Challenges
![Page 8: Vagrant, Ansible, Docker for developers and architectsgotocon.com/dl/goto-berlin-2015/GOTO_Nights/goto_englisch_slide... · Vagrant, Ansible, Docker for developers and architects](https://reader030.vdocuments.site/reader030/viewer/2022013120/5aede45e7f8b9a3669919814/html5/thumbnails/8.jpg)
OPITZ CONSULTING Vorlage Powerpoint 2011; Version 1.3; 10.05.2011; TGA, KSH
Virtual machines
![Page 9: Vagrant, Ansible, Docker for developers and architectsgotocon.com/dl/goto-berlin-2015/GOTO_Nights/goto_englisch_slide... · Vagrant, Ansible, Docker for developers and architects](https://reader030.vdocuments.site/reader030/viewer/2022013120/5aede45e7f8b9a3669919814/html5/thumbnails/9.jpg)
OPITZ CONSULTING Vorlage Powerpoint 2011; Version 1.3; 10.05.2011; TGA, KSH
Solution Approach
Golden Image
![Page 10: Vagrant, Ansible, Docker for developers and architectsgotocon.com/dl/goto-berlin-2015/GOTO_Nights/goto_englisch_slide... · Vagrant, Ansible, Docker for developers and architects](https://reader030.vdocuments.site/reader030/viewer/2022013120/5aede45e7f8b9a3669919814/html5/thumbnails/10.jpg)
OPITZ CONSULTING Vorlage Powerpoint 2011; Version 1.3; 10.05.2011; TGA, KSH
But:
![Page 11: Vagrant, Ansible, Docker for developers and architectsgotocon.com/dl/goto-berlin-2015/GOTO_Nights/goto_englisch_slide... · Vagrant, Ansible, Docker for developers and architects](https://reader030.vdocuments.site/reader030/viewer/2022013120/5aede45e7f8b9a3669919814/html5/thumbnails/11.jpg)
OPITZ CONSULTING Vorlage Powerpoint 2011; Version 1.3; 10.05.2011; TGA, KSH
Golden Image: Problems
Big
Distribution takes long
Simple customizing is difficult
Every small change leads to a big amount of data and to a
complete reinstallation
No collaboration
Versioning is difficult
![Page 12: Vagrant, Ansible, Docker for developers and architectsgotocon.com/dl/goto-berlin-2015/GOTO_Nights/goto_englisch_slide... · Vagrant, Ansible, Docker for developers and architects](https://reader030.vdocuments.site/reader030/viewer/2022013120/5aede45e7f8b9a3669919814/html5/thumbnails/12.jpg)
OPITZ CONSULTING Vorlage Powerpoint 2011; Version 1.3; 10.05.2011; TGA, KSH
And now?
![Page 13: Vagrant, Ansible, Docker for developers and architectsgotocon.com/dl/goto-berlin-2015/GOTO_Nights/goto_englisch_slide... · Vagrant, Ansible, Docker for developers and architects](https://reader030.vdocuments.site/reader030/viewer/2022013120/5aede45e7f8b9a3669919814/html5/thumbnails/13.jpg)
OPITZ CONSULTING Vorlage Powerpoint 2011; Version 1.3; 10.05.2011; TGA, KSH
Development environments
made easy
![Page 14: Vagrant, Ansible, Docker for developers and architectsgotocon.com/dl/goto-berlin-2015/GOTO_Nights/goto_englisch_slide... · Vagrant, Ansible, Docker for developers and architects](https://reader030.vdocuments.site/reader030/viewer/2022013120/5aede45e7f8b9a3669919814/html5/thumbnails/14.jpg)
OPITZ CONSULTING Vorlage Powerpoint 2011; Version 1.3; 10.05.2011; TGA, KSH
Developer-Workflow
> git clone https://gh.com/rattermeyer/jenkins-in-a-box.git*
> cd jenkins-in-a-box
> vagrant up
* git clone https://github.com/rattermeyer/jenkins-in-a-box.git
![Page 15: Vagrant, Ansible, Docker for developers and architectsgotocon.com/dl/goto-berlin-2015/GOTO_Nights/goto_englisch_slide... · Vagrant, Ansible, Docker for developers and architects](https://reader030.vdocuments.site/reader030/viewer/2022013120/5aede45e7f8b9a3669919814/html5/thumbnails/15.jpg)
OPITZ CONSULTING Vorlage Powerpoint 2011; Version 1.3; 10.05.2011; TGA, KSH
Vagrant: Vagrantfile
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "phusion/ubuntu-14.04-amd64"
config.vm.provider "virtualbox" do |vb|
vb.customize ["modifyvm", :id, "--memory", "1024"]
vb.customize ["modifyvm", :id, "--cpus", "1"]
end
config.vm.provision "puppet" do |puppet|
puppet.manifests_path = "puppet/manifests"
puppet.manifest_file = "site.pp"
puppet.module_path = "puppet/modules"
puppet.options = "--verbose --debug"
end
config.vm.network "private_network", ip: "192.168.33.10"
end
![Page 16: Vagrant, Ansible, Docker for developers and architectsgotocon.com/dl/goto-berlin-2015/GOTO_Nights/goto_englisch_slide... · Vagrant, Ansible, Docker for developers and architects](https://reader030.vdocuments.site/reader030/viewer/2022013120/5aede45e7f8b9a3669919814/html5/thumbnails/16.jpg)
OPITZ CONSULTING Vorlage Powerpoint 2011; Version 1.3; 10.05.2011; TGA, KSH
Vagrant: Vagrantfile
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "phusion/ubuntu-14.04-amd64"
config.vm.provider "virtualbox" do |vb|
vb.customize ["modifyvm", :id, "--memory", "1024"]
vb.customize ["modifyvm", :id, "--cpus", "1"]
end
config.vm.provision "puppet" do |puppet|
puppet.manifests_path = "puppet/manifests"
puppet.manifest_file = "site.pp"
puppet.module_path = "puppet/modules"
puppet.options = "--verbose --debug"
end
config.vm.network "private_network", ip: "192.168.33.10"
end
Starting Point:
Base Box
![Page 17: Vagrant, Ansible, Docker for developers and architectsgotocon.com/dl/goto-berlin-2015/GOTO_Nights/goto_englisch_slide... · Vagrant, Ansible, Docker for developers and architects](https://reader030.vdocuments.site/reader030/viewer/2022013120/5aede45e7f8b9a3669919814/html5/thumbnails/17.jpg)
OPITZ CONSULTING Vorlage Powerpoint 2011; Version 1.3; 10.05.2011; TGA, KSH
Vagrant: Vagrantfile
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "phusion/ubuntu-14.04-amd64"
config.vm.provider "virtualbox" do |vb|
vb.customize ["modifyvm", :id, "--memory", "1024"]
vb.customize ["modifyvm", :id, "--cpus", "1"]
end
config.vm.provision "puppet" do |puppet|
puppet.manifests_path = "puppet/manifests"
puppet.manifest_file = "site.pp"
puppet.module_path = "puppet/modules"
puppet.options = "--verbose --debug"
end
config.vm.network "private_network", ip: "192.168.33.10"
end
VM
Customization
![Page 18: Vagrant, Ansible, Docker for developers and architectsgotocon.com/dl/goto-berlin-2015/GOTO_Nights/goto_englisch_slide... · Vagrant, Ansible, Docker for developers and architects](https://reader030.vdocuments.site/reader030/viewer/2022013120/5aede45e7f8b9a3669919814/html5/thumbnails/18.jpg)
OPITZ CONSULTING Vorlage Powerpoint 2011; Version 1.3; 10.05.2011; TGA, KSH
Vagrant: Vagrantfile
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "phusion/ubuntu-14.04-amd64"
config.vm.provider "virtualbox" do |vb|
vb.customize ["modifyvm", :id, "--memory", "1024"]
vb.customize ["modifyvm", :id, "--cpus", "1"]
end
config.vm.provision "puppet" do |puppet|
puppet.manifests_path = "puppet/manifests"
puppet.manifest_file = "site.pp"
puppet.module_path = "puppet/modules"
puppet.options = "--verbose --debug"
end
config.vm.network "private_network", ip: "192.168.33.10"
end
Provisioning
![Page 19: Vagrant, Ansible, Docker for developers and architectsgotocon.com/dl/goto-berlin-2015/GOTO_Nights/goto_englisch_slide... · Vagrant, Ansible, Docker for developers and architects](https://reader030.vdocuments.site/reader030/viewer/2022013120/5aede45e7f8b9a3669919814/html5/thumbnails/19.jpg)
OPITZ CONSULTING Vorlage Powerpoint 2011; Version 1.3; 10.05.2011; TGA, KSH
Base Box
Pre-assembled Vagrant VM image, ready-to-run
Custom build possible
Base Box is base for further provisioning
Use „Packer“ to create base box
![Page 20: Vagrant, Ansible, Docker for developers and architectsgotocon.com/dl/goto-berlin-2015/GOTO_Nights/goto_englisch_slide... · Vagrant, Ansible, Docker for developers and architects](https://reader030.vdocuments.site/reader030/viewer/2022013120/5aede45e7f8b9a3669919814/html5/thumbnails/20.jpg)
OPITZ CONSULTING Vorlage Powerpoint 2011; Version 1.3; 10.05.2011; TGA, KSH
Provisioning
![Page 21: Vagrant, Ansible, Docker for developers and architectsgotocon.com/dl/goto-berlin-2015/GOTO_Nights/goto_englisch_slide... · Vagrant, Ansible, Docker for developers and architects](https://reader030.vdocuments.site/reader030/viewer/2022013120/5aede45e7f8b9a3669919814/html5/thumbnails/21.jpg)
OPITZ CONSULTING Vorlage Powerpoint 2011; Version 1.3; 10.05.2011; TGA, KSH
Provisioning
High flexibility
Long duration
of provisioning
Low flexibility
Shorter duration
of provisioning
Bigger Base
Box
Small Base
Box
![Page 22: Vagrant, Ansible, Docker for developers and architectsgotocon.com/dl/goto-berlin-2015/GOTO_Nights/goto_englisch_slide... · Vagrant, Ansible, Docker for developers and architects](https://reader030.vdocuments.site/reader030/viewer/2022013120/5aede45e7f8b9a3669919814/html5/thumbnails/22.jpg)
OPITZ CONSULTING Vorlage Powerpoint 2011; Version 1.3; 10.05.2011; TGA, KSH
![Page 23: Vagrant, Ansible, Docker for developers and architectsgotocon.com/dl/goto-berlin-2015/GOTO_Nights/goto_englisch_slide... · Vagrant, Ansible, Docker for developers and architects](https://reader030.vdocuments.site/reader030/viewer/2022013120/5aede45e7f8b9a3669919814/html5/thumbnails/23.jpg)
OPITZ CONSULTING Vorlage Powerpoint 2011; Version 1.3; 10.05.2011; TGA, KSH
Simplicity
Chef, Puppet, Salt are great tools as
well, may be more complex to start
with, steeper learning curve, etc.
Why Ansible
For larger roll-outs: Know your requirements and quality-attributes and
evaluate different products
![Page 24: Vagrant, Ansible, Docker for developers and architectsgotocon.com/dl/goto-berlin-2015/GOTO_Nights/goto_englisch_slide... · Vagrant, Ansible, Docker for developers and architects](https://reader030.vdocuments.site/reader030/viewer/2022013120/5aede45e7f8b9a3669919814/html5/thumbnails/24.jpg)
OPITZ CONSULTING Vorlage Powerpoint 2011; Version 1.3; 10.05.2011; TGA, KSH
Other Business Drivers?
Transparency System definition at central place
System definition is clearly structured and comprehensible
Reporting of changes
Automatization System build on demand
Not only initially, but also over the whole lifecycle
Reproducibility System build is reliably reproducible via the definition file
Changes are versionable
Design: • Das Farbschema ist im
Design als „OC 2009“
hinterlegt.
• Ebenso sind die Schriftarten
als „OC 2009“ hinterlegt.
• Die Standardfarben sind:
![Page 25: Vagrant, Ansible, Docker for developers and architectsgotocon.com/dl/goto-berlin-2015/GOTO_Nights/goto_englisch_slide... · Vagrant, Ansible, Docker for developers and architects](https://reader030.vdocuments.site/reader030/viewer/2022013120/5aede45e7f8b9a3669919814/html5/thumbnails/25.jpg)
OPITZ CONSULTING Vorlage Powerpoint 2011; Version 1.3; 10.05.2011; TGA, KSH
Ansible installed on control machine
Python required on all managed
nodes/servers
ssh public-key setup to connect to
hosts
Pre-conditions to use Ansible
![Page 26: Vagrant, Ansible, Docker for developers and architectsgotocon.com/dl/goto-berlin-2015/GOTO_Nights/goto_englisch_slide... · Vagrant, Ansible, Docker for developers and architects](https://reader030.vdocuments.site/reader030/viewer/2022013120/5aede45e7f8b9a3669919814/html5/thumbnails/26.jpg)
OPITZ CONSULTING Vorlage Powerpoint 2011; Version 1.3; 10.05.2011; TGA, KSH
You
(Control Machine)
Node
Node
Node
Node
SSH
Ansible works via ssh. No agent on node required.
![Page 27: Vagrant, Ansible, Docker for developers and architectsgotocon.com/dl/goto-berlin-2015/GOTO_Nights/goto_englisch_slide... · Vagrant, Ansible, Docker for developers and architects](https://reader030.vdocuments.site/reader030/viewer/2022013120/5aede45e7f8b9a3669919814/html5/thumbnails/27.jpg)
OPITZ CONSULTING Vorlage Powerpoint 2011; Version 1.3; 10.05.2011; TGA, KSH
Playbook
Written in YAML
Declare configurations / desired state
Orchestrate steps of any manual ordered process
Can launch tasks (async and sync)
Kept in source control
![Page 28: Vagrant, Ansible, Docker for developers and architectsgotocon.com/dl/goto-berlin-2015/GOTO_Nights/goto_englisch_slide... · Vagrant, Ansible, Docker for developers and architects](https://reader030.vdocuments.site/reader030/viewer/2022013120/5aede45e7f8b9a3669919814/html5/thumbnails/28.jpg)
OPITZ CONSULTING Vorlage Powerpoint 2011; Version 1.3; 10.05.2011; TGA, KSH
Playbook Sample
- hosts: webservers
vars:
http_port: 80
max_clients: 200
remote_user: root
tasks:
- name: ensure apache is at the latest version
yum: pkg=httpd state=latest
- name: write the apache config file
template: src=/srv/httpd.j2 dest=/etc/httpd.conf
notify:
- restart apache
- name: ensure apache is running
service: name=httpd state=started
handlers:
- name: restart apache
service: name=httpd state=restarted
![Page 29: Vagrant, Ansible, Docker for developers and architectsgotocon.com/dl/goto-berlin-2015/GOTO_Nights/goto_englisch_slide... · Vagrant, Ansible, Docker for developers and architects](https://reader030.vdocuments.site/reader030/viewer/2022013120/5aede45e7f8b9a3669919814/html5/thumbnails/29.jpg)
OPITZ CONSULTING Vorlage Powerpoint 2011; Version 1.3; 10.05.2011; TGA, KSH
Playbook Sample
- hosts: webservers
vars:
http_port: 80
max_clients: 200
remote_user: root
tasks:
- name: ensure apache is at the latest version
yum: pkg=httpd state=latest
- name: write the apache config file
template: src=/srv/httpd.j2 dest=/etc/httpd.conf
notify:
- restart apache
- name: ensure apache is running
service: name=httpd state=started
handlers:
- name: restart apache
service: name=httpd state=restarted
Restrictions
![Page 30: Vagrant, Ansible, Docker for developers and architectsgotocon.com/dl/goto-berlin-2015/GOTO_Nights/goto_englisch_slide... · Vagrant, Ansible, Docker for developers and architects](https://reader030.vdocuments.site/reader030/viewer/2022013120/5aede45e7f8b9a3669919814/html5/thumbnails/30.jpg)
OPITZ CONSULTING Vorlage Powerpoint 2011; Version 1.3; 10.05.2011; TGA, KSH
Playbook Sample
- hosts: webservers
vars:
http_port: 80
max_clients: 200
remote_user: root
tasks:
- name: ensure apache is at the latest version
yum: pkg=httpd state=latest
- name: write the apache config file
template: src=/srv/httpd.j2 dest=/etc/httpd.conf
notify:
- restart apache
- name: ensure apache is running
service: name=httpd state=started
handlers:
- name: restart apache
service: name=httpd state=restarted
Tasks
![Page 31: Vagrant, Ansible, Docker for developers and architectsgotocon.com/dl/goto-berlin-2015/GOTO_Nights/goto_englisch_slide... · Vagrant, Ansible, Docker for developers and architects](https://reader030.vdocuments.site/reader030/viewer/2022013120/5aede45e7f8b9a3669919814/html5/thumbnails/31.jpg)
OPITZ CONSULTING Vorlage Powerpoint 2011; Version 1.3; 10.05.2011; TGA, KSH
Playbook Sample: Tasks
- hosts: webservers
vars:
http_port: 80
max_clients: 200
remote_user: root
tasks:
- name: ensure apache is at the latest version
yum: pkg=httpd state=latest
- name: write the apache config file
template: src=/srv/httpd.j2 dest=/etc/httpd.conf
notify:
- restart apache
- name: ensure apache is running
service: name=httpd state=started
handlers:
- name: restart apache
service: name=httpd state=restarted
Documentation / Reference
Arguments Module
Tasks
![Page 32: Vagrant, Ansible, Docker for developers and architectsgotocon.com/dl/goto-berlin-2015/GOTO_Nights/goto_englisch_slide... · Vagrant, Ansible, Docker for developers and architects](https://reader030.vdocuments.site/reader030/viewer/2022013120/5aede45e7f8b9a3669919814/html5/thumbnails/32.jpg)
OPITZ CONSULTING Vorlage Powerpoint 2011; Version 1.3; 10.05.2011; TGA, KSH
Role
Playbook Sample
Variables
Tasks
Unit of reuse for system components (e.g. nginx role)
Contains all tasks, handlers, variables, files and templates for a
component configuration
Follows a directory layout convention
Files / Templates
![Page 33: Vagrant, Ansible, Docker for developers and architectsgotocon.com/dl/goto-berlin-2015/GOTO_Nights/goto_englisch_slide... · Vagrant, Ansible, Docker for developers and architects](https://reader030.vdocuments.site/reader030/viewer/2022013120/5aede45e7f8b9a3669919814/html5/thumbnails/33.jpg)
OPITZ CONSULTING Vorlage Powerpoint 2011; Version 1.3; 10.05.2011; TGA, KSH
Role
Source: ESA / Hubble CC3
Role
Role
Role
Role
Role
Role
Ansible Galaxy is your hub for finding,
reusing and sharing the best Ansible
content.
Role
Roles as unit of reuse
are published in the
„ansible galaxy“
![Page 34: Vagrant, Ansible, Docker for developers and architectsgotocon.com/dl/goto-berlin-2015/GOTO_Nights/goto_englisch_slide... · Vagrant, Ansible, Docker for developers and architects](https://reader030.vdocuments.site/reader030/viewer/2022013120/5aede45e7f8b9a3669919814/html5/thumbnails/34.jpg)
OPITZ CONSULTING Vorlage Powerpoint 2011; Version 1.3; 10.05.2011; TGA, KSH
Back to Vagrant
![Page 35: Vagrant, Ansible, Docker for developers and architectsgotocon.com/dl/goto-berlin-2015/GOTO_Nights/goto_englisch_slide... · Vagrant, Ansible, Docker for developers and architects](https://reader030.vdocuments.site/reader030/viewer/2022013120/5aede45e7f8b9a3669919814/html5/thumbnails/35.jpg)
OPITZ CONSULTING Vorlage Powerpoint 2011; Version 1.3; 10.05.2011; TGA, KSH
Development environment
![Page 36: Vagrant, Ansible, Docker for developers and architectsgotocon.com/dl/goto-berlin-2015/GOTO_Nights/goto_englisch_slide... · Vagrant, Ansible, Docker for developers and architects](https://reader030.vdocuments.site/reader030/viewer/2022013120/5aede45e7f8b9a3669919814/html5/thumbnails/36.jpg)
OPITZ CONSULTING Vorlage Powerpoint 2011; Version 1.3; 10.05.2011; TGA, KSH
Host (Windows)
Vagrant + Virtualbox
git checkout git://vagrant-box.git
vagrant up
Guest development machine (Linux)
Install ansible
Checkout ansible playbook
Execute ansible playbook
Window
Manager IDE
Apache
+ Config
Wildfly /
Tomcat
Initial Installation
![Page 37: Vagrant, Ansible, Docker for developers and architectsgotocon.com/dl/goto-berlin-2015/GOTO_Nights/goto_englisch_slide... · Vagrant, Ansible, Docker for developers and architects](https://reader030.vdocuments.site/reader030/viewer/2022013120/5aede45e7f8b9a3669919814/html5/thumbnails/37.jpg)
OPITZ CONSULTING Vorlage Powerpoint 2011; Version 1.3; 10.05.2011; TGA, KSH
Host (Windows)
Vagrant + Virtualbox
Guest development machine (Linux)
update ansible playbook
Execute ansible playbook
Wildfly /
Tomcat
Use Case: Update Wildfly
![Page 38: Vagrant, Ansible, Docker for developers and architectsgotocon.com/dl/goto-berlin-2015/GOTO_Nights/goto_englisch_slide... · Vagrant, Ansible, Docker for developers and architects](https://reader030.vdocuments.site/reader030/viewer/2022013120/5aede45e7f8b9a3669919814/html5/thumbnails/38.jpg)
OPITZ CONSULTING Vorlage Powerpoint 2011; Version 1.3; 10.05.2011; TGA, KSH
Snapshot
Guest development machine (Linux)
Install ansible
Checkout ansible playbook
Execute ansible playbook
Window
Manager IDE
Apache
+ Config
Wildfly /
Tomcat
Long Provisioning Times
Vagrant Base Box
![Page 39: Vagrant, Ansible, Docker for developers and architectsgotocon.com/dl/goto-berlin-2015/GOTO_Nights/goto_englisch_slide... · Vagrant, Ansible, Docker for developers and architects](https://reader030.vdocuments.site/reader030/viewer/2022013120/5aede45e7f8b9a3669919814/html5/thumbnails/39.jpg)
OPITZ CONSULTING Vorlage Powerpoint 2011; Version 1.3; 10.05.2011; TGA, KSH
Long Provisioning Times
Create a Snapshot of current VM state as your new base
box
Start provisioning changes based on this new base box
![Page 40: Vagrant, Ansible, Docker for developers and architectsgotocon.com/dl/goto-berlin-2015/GOTO_Nights/goto_englisch_slide... · Vagrant, Ansible, Docker for developers and architects](https://reader030.vdocuments.site/reader030/viewer/2022013120/5aede45e7f8b9a3669919814/html5/thumbnails/40.jpg)
OPITZ CONSULTING Vorlage Powerpoint 2011; Version 1.3; 10.05.2011; TGA, KSH
Development environment
< 5 machines
![Page 41: Vagrant, Ansible, Docker for developers and architectsgotocon.com/dl/goto-berlin-2015/GOTO_Nights/goto_englisch_slide... · Vagrant, Ansible, Docker for developers and architects](https://reader030.vdocuments.site/reader030/viewer/2022013120/5aede45e7f8b9a3669919814/html5/thumbnails/41.jpg)
OPITZ CONSULTING Vorlage Powerpoint 2011; Version 1.3; 10.05.2011; TGA, KSH
Development environment
< 5 machines
„resource-hungry“
![Page 42: Vagrant, Ansible, Docker for developers and architectsgotocon.com/dl/goto-berlin-2015/GOTO_Nights/goto_englisch_slide... · Vagrant, Ansible, Docker for developers and architects](https://reader030.vdocuments.site/reader030/viewer/2022013120/5aede45e7f8b9a3669919814/html5/thumbnails/42.jpg)
OPITZ CONSULTING Vorlage Powerpoint 2011; Version 1.3; 10.05.2011; TGA, KSH
More independent VMs?
Build Once Run Anywhere?
![Page 43: Vagrant, Ansible, Docker for developers and architectsgotocon.com/dl/goto-berlin-2015/GOTO_Nights/goto_englisch_slide... · Vagrant, Ansible, Docker for developers and architects](https://reader030.vdocuments.site/reader030/viewer/2022013120/5aede45e7f8b9a3669919814/html5/thumbnails/43.jpg)
OPITZ CONSULTING Vorlage Powerpoint 2011; Version 1.3; 10.05.2011; TGA, KSH
Folie nur mit Bilddfasd • TODO: Design und Inhalt
• Dies ist eine Variante des
Haupttemplates für Seiten
mit einem großflächigen
Bild und ohne Textbereich
• Titel: ohne Titel!
• Inhalt:
• Grafik/Diagramm etc. aus
externen Quellen
• Fußzeile: ohne Fußzeile
Bildquelle / URL
Build Ship Run
![Page 44: Vagrant, Ansible, Docker for developers and architectsgotocon.com/dl/goto-berlin-2015/GOTO_Nights/goto_englisch_slide... · Vagrant, Ansible, Docker for developers and architects](https://reader030.vdocuments.site/reader030/viewer/2022013120/5aede45e7f8b9a3669919814/html5/thumbnails/44.jpg)
OPITZ CONSULTING Vorlage Powerpoint 2011; Version 1.3; 10.05.2011; TGA, KSH
BSD Jails / Solaris Zones
Linux Containers
Docker Container / Images
![Page 45: Vagrant, Ansible, Docker for developers and architectsgotocon.com/dl/goto-berlin-2015/GOTO_Nights/goto_englisch_slide... · Vagrant, Ansible, Docker for developers and architects](https://reader030.vdocuments.site/reader030/viewer/2022013120/5aede45e7f8b9a3669919814/html5/thumbnails/45.jpg)
OPITZ CONSULTING Vorlage Powerpoint 2011; Version 1.3; 10.05.2011; TGA, KSH
Docker Overview
Hypervisor
Guest OS
Libs
App 1
Guest OS
Libs
App 2
Guest OS
Libs
App 3
Host Operating System
Virtual Machines
Docker Daemon
Libs
App 1
Libs
App 2
Libs
App 3
Host Operating System (Linux*)
Libs
App 4
Libs
App 5
Libs
App 6
Docker Container
* Windows Server 2016 TP3:
supports docker containers
![Page 46: Vagrant, Ansible, Docker for developers and architectsgotocon.com/dl/goto-berlin-2015/GOTO_Nights/goto_englisch_slide... · Vagrant, Ansible, Docker for developers and architects](https://reader030.vdocuments.site/reader030/viewer/2022013120/5aede45e7f8b9a3669919814/html5/thumbnails/46.jpg)
OPITZ CONSULTING Vorlage Powerpoint 2011; Version 1.3; 10.05.2011; TGA, KSH
docker run –it ubuntu bash
Starting a „bash“
![Page 47: Vagrant, Ansible, Docker for developers and architectsgotocon.com/dl/goto-berlin-2015/GOTO_Nights/goto_englisch_slide... · Vagrant, Ansible, Docker for developers and architects](https://reader030.vdocuments.site/reader030/viewer/2022013120/5aede45e7f8b9a3669919814/html5/thumbnails/47.jpg)
OPITZ CONSULTING Vorlage Powerpoint 2011; Version 1.3; 10.05.2011; TGA, KSH
Inside a docker image
Docker Image
OS base image
Dependencies, e.g.:
JVM
Application Code, e.g.
jar file
![Page 48: Vagrant, Ansible, Docker for developers and architectsgotocon.com/dl/goto-berlin-2015/GOTO_Nights/goto_englisch_slide... · Vagrant, Ansible, Docker for developers and architects](https://reader030.vdocuments.site/reader030/viewer/2022013120/5aede45e7f8b9a3669919814/html5/thumbnails/48.jpg)
OPITZ CONSULTING Vorlage Powerpoint 2011; Version 1.3; 10.05.2011; TGA, KSH
Layered FS
Image: Java
Base Image: Ubuntu
Image: Tomcat
Writable Container: App Code
![Page 49: Vagrant, Ansible, Docker for developers and architectsgotocon.com/dl/goto-berlin-2015/GOTO_Nights/goto_englisch_slide... · Vagrant, Ansible, Docker for developers and architects](https://reader030.vdocuments.site/reader030/viewer/2022013120/5aede45e7f8b9a3669919814/html5/thumbnails/49.jpg)
OPITZ CONSULTING Vorlage Powerpoint 2011; Version 1.3; 10.05.2011; TGA, KSH
Dockerfile: Spring Boot Application Container
FROM rattermeyer/ubuntu-jdk:1.0
maintainer [email protected]
ENV PROJECT_VERSION 0.0.1-SNAPSHOT
ENV PROJECT_NAME todo-list-backend
RUN mkdir /opt/${PROJECT_NAME}
ADD ${PROJECT_NAME}-${PROJECT_VERSION}.jar /opt/${PROJECT_NAME}/
EXPOSE 8080
ENTRYPOINT java -jar /opt/${PROJECT_NAME}/${PROJECT_NAME}-
${PROJECT_VERSION}.jar
Base Image
![Page 50: Vagrant, Ansible, Docker for developers and architectsgotocon.com/dl/goto-berlin-2015/GOTO_Nights/goto_englisch_slide... · Vagrant, Ansible, Docker for developers and architects](https://reader030.vdocuments.site/reader030/viewer/2022013120/5aede45e7f8b9a3669919814/html5/thumbnails/50.jpg)
OPITZ CONSULTING Vorlage Powerpoint 2011; Version 1.3; 10.05.2011; TGA, KSH
Dockerfile: Spring Boot Application Container
FROM rattermeyer/ubuntu-jdk:1.0
maintainer [email protected]
ENV PROJECT_VERSION 0.0.1-SNAPSHOT
ENV PROJECT_NAME todo-list-backend
RUN mkdir /opt/${PROJECT_NAME}
ADD ${PROJECT_NAME}-${PROJECT_VERSION}.jar /opt/${PROJECT_NAME}/
EXPOSE 8080
ENTRYPOINT java -jar /opt/${PROJECT_NAME}/${PROJECT_NAME}-
${PROJECT_VERSION}.jar
Provisioning
![Page 51: Vagrant, Ansible, Docker for developers and architectsgotocon.com/dl/goto-berlin-2015/GOTO_Nights/goto_englisch_slide... · Vagrant, Ansible, Docker for developers and architects](https://reader030.vdocuments.site/reader030/viewer/2022013120/5aede45e7f8b9a3669919814/html5/thumbnails/51.jpg)
OPITZ CONSULTING Vorlage Powerpoint 2011; Version 1.3; 10.05.2011; TGA, KSH
Dockerfile: Spring Boot Application Container
FROM rattermeyer/ubuntu-jdk:1.0
maintainer [email protected]
ENV PROJECT_VERSION 0.0.1-SNAPSHOT
ENV PROJECT_NAME todo-list-backend
RUN mkdir /opt/${PROJECT_NAME}
ADD ${PROJECT_NAME}-${PROJECT_VERSION}.jar /opt/${PROJECT_NAME}/
EXPOSE 8080
ENTRYPOINT java -jar /opt/${PROJECT_NAME}/${PROJECT_NAME}-
${PROJECT_VERSION}.jar
Adding files
![Page 52: Vagrant, Ansible, Docker for developers and architectsgotocon.com/dl/goto-berlin-2015/GOTO_Nights/goto_englisch_slide... · Vagrant, Ansible, Docker for developers and architects](https://reader030.vdocuments.site/reader030/viewer/2022013120/5aede45e7f8b9a3669919814/html5/thumbnails/52.jpg)
OPITZ CONSULTING Vorlage Powerpoint 2011; Version 1.3; 10.05.2011; TGA, KSH
Dockerfile: Spring Boot Application Container
FROM rattermeyer/ubuntu-jdk:1.0
maintainer [email protected]
ENV PROJECT_VERSION 0.0.1-SNAPSHOT
ENV PROJECT_NAME todo-list-backend
RUN mkdir /opt/${PROJECT_NAME}
ADD ${PROJECT_NAME}-${PROJECT_VERSION}.jar /opt/${PROJECT_NAME}/
EXPOSE 8080
ENTRYPOINT java -jar /opt/${PROJECT_NAME}/${PROJECT_NAME}-
${PROJECT_VERSION}.jar
Starting Point
![Page 53: Vagrant, Ansible, Docker for developers and architectsgotocon.com/dl/goto-berlin-2015/GOTO_Nights/goto_englisch_slide... · Vagrant, Ansible, Docker for developers and architects](https://reader030.vdocuments.site/reader030/viewer/2022013120/5aede45e7f8b9a3669919814/html5/thumbnails/53.jpg)
OPITZ CONSULTING Vorlage Powerpoint 2011; Version 1.3; 10.05.2011; TGA, KSH
Summary
Lightweight
Docker Images are much more lightweight than full VMs. The
start takes seconds. The images for distribution are normally
smaller (only Delta, new FS Layer)
Image under version control
Hence easier handling of builds. And thus better suited for a
Continuous Delivery Pipeline
Lots of base images (again)
Don’t rely on environment: Create your own environment
![Page 54: Vagrant, Ansible, Docker for developers and architectsgotocon.com/dl/goto-berlin-2015/GOTO_Nights/goto_englisch_slide... · Vagrant, Ansible, Docker for developers and architects](https://reader030.vdocuments.site/reader030/viewer/2022013120/5aede45e7f8b9a3669919814/html5/thumbnails/54.jpg)
OPITZ CONSULTING Vorlage Powerpoint 2011; Version 1.3; 10.05.2011; TGA, KSH
Use Cases, costs and benefits
![Page 55: Vagrant, Ansible, Docker for developers and architectsgotocon.com/dl/goto-berlin-2015/GOTO_Nights/goto_englisch_slide... · Vagrant, Ansible, Docker for developers and architects](https://reader030.vdocuments.site/reader030/viewer/2022013120/5aede45e7f8b9a3669919814/html5/thumbnails/55.jpg)
OPITZ CONSULTING Vorlage Powerpoint 2011; Version 1.3; 10.05.2011; TGA, KSH
Ansible Control
Machine
Docker Host 1 CD Master Docker Host 2
Docker Daemon Docker Daemon
PB: jenkins-server
JVM
Jenkins
PB= Ansible Playbook
![Page 56: Vagrant, Ansible, Docker for developers and architectsgotocon.com/dl/goto-berlin-2015/GOTO_Nights/goto_englisch_slide... · Vagrant, Ansible, Docker for developers and architects](https://reader030.vdocuments.site/reader030/viewer/2022013120/5aede45e7f8b9a3669919814/html5/thumbnails/56.jpg)
OPITZ CONSULTING Vorlage Powerpoint 2011; Version 1.3; 10.05.2011; TGA, KSH
CD Master
JVM
Jenkins
Docker Host 1 Docker Host 2
Docker Daemon Docker Daemon
Docker Host 1 Docker Host 2
Docker Daemon Docker Daemon
Build
Start Jenkins agent container
Register agent
Execute Build
Create docker Image for application
Push image into docker registry
Removes Jenkins agent container
Jenkins Agent
App
docker
image
![Page 57: Vagrant, Ansible, Docker for developers and architectsgotocon.com/dl/goto-berlin-2015/GOTO_Nights/goto_englisch_slide... · Vagrant, Ansible, Docker for developers and architects](https://reader030.vdocuments.site/reader030/viewer/2022013120/5aede45e7f8b9a3669919814/html5/thumbnails/57.jpg)
OPITZ CONSULTING Vorlage Powerpoint 2011; Version 1.3; 10.05.2011; TGA, KSH
CD Master
JVM
Jenkins
Docker Host 1 Docker Host 2
Docker Daemon Docker Daemon
Docker Host 1 Docker Host 2
Docker Daemon Docker Daemon
Build
App
docker
image
App Container
Start application container on QA
![Page 58: Vagrant, Ansible, Docker for developers and architectsgotocon.com/dl/goto-berlin-2015/GOTO_Nights/goto_englisch_slide... · Vagrant, Ansible, Docker for developers and architects](https://reader030.vdocuments.site/reader030/viewer/2022013120/5aede45e7f8b9a3669919814/html5/thumbnails/58.jpg)
OPITZ CONSULTING Vorlage Powerpoint 2011; Version 1.3; 10.05.2011; TGA, KSH
App
docker
image
App
docker
image
App
docker
image
CD Master
JVM
Jenkins
Docker Host 1
Docker Host 2
Docker Daemon
Docker Daemon
Ansible Master
Prod Docker Host
Docker Daemon
Build
App Container
Docker Host 2
Docker Daemon
Prod Docker Host
Docker Daemon
App Container
Rolling Update in
Production
App
docker
image
![Page 59: Vagrant, Ansible, Docker for developers and architectsgotocon.com/dl/goto-berlin-2015/GOTO_Nights/goto_englisch_slide... · Vagrant, Ansible, Docker for developers and architects](https://reader030.vdocuments.site/reader030/viewer/2022013120/5aede45e7f8b9a3669919814/html5/thumbnails/59.jpg)
OPITZ CONSULTING Vorlage Powerpoint 2011; Version 1.3; 10.05.2011; TGA, KSH
Recap
Vagrant to create development environment
(on developer‘s laptop)
Provision development environment with ansible
Provision CD, test and production environment with
ansible
Build your project in seperate docker containers
Start QA environment based on docker containers
Roll-out to production using ansible
![Page 60: Vagrant, Ansible, Docker for developers and architectsgotocon.com/dl/goto-berlin-2015/GOTO_Nights/goto_englisch_slide... · Vagrant, Ansible, Docker for developers and architects](https://reader030.vdocuments.site/reader030/viewer/2022013120/5aede45e7f8b9a3669919814/html5/thumbnails/60.jpg)
OPITZ CONSULTING Vorlage Powerpoint 2011; Version 1.3; 10.05.2011; TGA, KSH
Folie nur mit Bilddfasd • TODO: Design und Inhalt
• Dies ist eine Variante des
Haupttemplates für Seiten
mit einem großflächigen
Bild und ohne Textbereich
• Titel: ohne Titel!
• Inhalt:
• Grafik/Diagramm etc. aus
externen Quellen
• Fußzeile: ohne Fußzeile
Bildquelle / URL
Outlook
![Page 61: Vagrant, Ansible, Docker for developers and architectsgotocon.com/dl/goto-berlin-2015/GOTO_Nights/goto_englisch_slide... · Vagrant, Ansible, Docker for developers and architects](https://reader030.vdocuments.site/reader030/viewer/2022013120/5aede45e7f8b9a3669919814/html5/thumbnails/61.jpg)
OPITZ CONSULTING Vorlage Powerpoint 2011; Version 1.3; 10.05.2011; TGA, KSH
Ecosystem
Noel Pennington, Sunflower
![Page 62: Vagrant, Ansible, Docker for developers and architectsgotocon.com/dl/goto-berlin-2015/GOTO_Nights/goto_englisch_slide... · Vagrant, Ansible, Docker for developers and architects](https://reader030.vdocuments.site/reader030/viewer/2022013120/5aede45e7f8b9a3669919814/html5/thumbnails/62.jpg)
OPITZ CONSULTING Vorlage Powerpoint 2011; Version 1.3; 10.05.2011; TGA, KSH
Many new projects
Few experiences in enterprise
environments
Today hip, tomorrow out
![Page 63: Vagrant, Ansible, Docker for developers and architectsgotocon.com/dl/goto-berlin-2015/GOTO_Nights/goto_englisch_slide... · Vagrant, Ansible, Docker for developers and architects](https://reader030.vdocuments.site/reader030/viewer/2022013120/5aede45e7f8b9a3669919814/html5/thumbnails/63.jpg)
OPITZ CONSULTING Vorlage Powerpoint 2011; Version 1.3; 10.05.2011; TGA, KSH
Folie nur mit Bilddfasd • TODO: Design und Inhalt
• Dies ist eine Variante des
Haupttemplates für Seiten
mit einem großflächigen
Bild und ohne Textbereich
• Titel: ohne Titel!
• Inhalt:
• Grafik/Diagramm etc. aus
externen Quellen
• Fußzeile: ohne Fußzeile
Bildquelle / URL
Questions?
![Page 64: Vagrant, Ansible, Docker for developers and architectsgotocon.com/dl/goto-berlin-2015/GOTO_Nights/goto_englisch_slide... · Vagrant, Ansible, Docker for developers and architects](https://reader030.vdocuments.site/reader030/viewer/2022013120/5aede45e7f8b9a3669919814/html5/thumbnails/64.jpg)
OPITZ CONSULTING Vorlage Powerpoint 2011; Version 1.3; 10.05.2011; TGA, KSH
Kontakt 1. fach: • Diese Folie wird als vorletzte
Folie genutzt, um den
individuellen Bezug zum
Referenten herzustellen.
• Als Foto muss ein
quadratisches Foto des
Referenten in qualitativ
hochwertiger Form vorliegen.
• Das Foto geht über 3
Rasterbreiten.
• Die Daten der Adresse sollten
vollst. eingegeben werden
Contact details
Richard Attermeyer
Senior Solution Architect
OPITZ CONSULTING Deutschland GmbH
Telefon +49 2261 60 01-1713
Mobile +49 173 727 9004 Design: • Das Farbschema ist im
Design als „OC 2009“
hinterlegt.
• Ebenso sind die Schriftarten
als „OC 2009“ hinterlegt.
• Die Standardfarben sind:
youtube.com/opitzconsulting
@OC_WIRE
slideshare.net/opitzconsulting
xing.com/net/opitzconsulting
![Page 65: Vagrant, Ansible, Docker for developers and architectsgotocon.com/dl/goto-berlin-2015/GOTO_Nights/goto_englisch_slide... · Vagrant, Ansible, Docker for developers and architects](https://reader030.vdocuments.site/reader030/viewer/2022013120/5aede45e7f8b9a3669919814/html5/thumbnails/65.jpg)
OPITZ CONSULTING Vorlage Powerpoint 2011; Version 1.3; 10.05.2011; TGA, KSH
Image references
„Computer Problems“ by CollegeDegrees360 is licensed under CC BY 2.0
Git Logo by Jason Long is licensed under the Creative Commons Attribution 3.0 Unported
License.
“Gucker” by H.P. Brinkmann is licensed under CC BY 2.0