SlideShare ist ein Scribd-Unternehmen logo
1 von 26
Automatisierte Deployments mit ansible
Vorstellung
23.05.2017 Automatisierte Deployments mit ansible
Thorben Hischke
Senior Architect
• Dipl.-Inf. (FH), seit 2007 bei Netpioneer GmbH / diva-e
• Schwerpunkt CMS (Imperia, Polopoly, FirstSpirit)
• Integration und Kundenzufriedenheit
2
Vision
„Ich möchte meine Software qualitätsgesichert per
Knopfdruck live bringen. Die Besucher meiner
Webseite darf dadurch nicht beeinträchtigt werden.“
23.05.2017 Automatisierte Deployments mit ansible 3
A/B - Deployment
„The blue-green deployment approach does this by ensuring you have two
production environments, as identical as possible. At any time one of them, let's say
blue for the example, is live. As you prepare a new release of your software you do
your final stage of testing in the green environment. Once the software is working in
the green environment, you switch the router so that all incoming requests go to the
green environment - the blue one is now idle.“
Quelle: https://martinfowler.com/bliki/BlueGreenDeployment.html
23.05.2017 Automatisierte Deployments mit ansible 4
A/B – Deployment – Variante 1
23.05.2017 Automatisierte Deployments mit ansible 5
A/B – Deployment – Variante 2
23.05.2017 Automatisierte Deployments mit ansible 6
A/B – Deployment – Variante 3
23.05.2017 Automatisierte Deployments mit ansible 7
Architektur - Skizze
23.05.2017 Automatisierte Deployments mit ansible 8
Warum Provisionierungs-Werkzeuge?
Automatisierbar
23.05.2017 Automatisierte Deployments mit ansible 9
1
2
3
Konfiguration wird beschrieben ☛„Infrastructure-as-Code“
• lesbar
• versionierbar
Reproduzierbar
• Server befinden sich in einem identischem Zustand
• kein „auf dem dritten Server war die Config noch nicht angepasst“
Provisionierungs-Werkzeuge
23.05.2017 Automatisierte Deployments mit ansible 10
Ansible - Pro
umfangreiche Module, Rollen sind wiederverwendbar
23.05.2017 Automatisierte Deployments mit ansible 11
1
2
3
4
leichter Einstieg, steile Leinkurve
nur SSH und Python werden benötigt
Push-Prinzip, Agent wird nicht benötigt
Ansible - Contra
23.05.2017 Automatisierte Deployments mit ansible 12
Keine Abstraktion über OS-Grenzen hinweg
1
2
3
4
flexible Programmierung („Wo habe ich diese #X?!-Variable definiert?“)
Editor-Unterstützung
YAML
Ein simples Beispiel
- hosts: webservers vars: http_port: 80 max_clients: 200 remote_user: root tasks: - name: ensure apache is at the latest
version yum: name=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 (and enable it at boot) service: name=httpd state=started
enabled=yes handlers: - name: restart apache service: name=httpd state=restarted
23.05.2017 Automatisierte Deployments mit ansible 13
Inventory
23.05.2017 Automatisierte Deployments mit ansible 14
Playbooks - playbook-vagrant-app.yml
23.05.2017 Automatisierte Deployments mit ansible 15
Roles - common
23.05.2017 Automatisierte Deployments mit ansible 16
Templates – nginx.conf
23.05.2017 Automatisierte Deployments mit ansible 17
Playbooks ausführen
23.05.2017 Automatisierte Deployments mit ansible 18
23.05.2017 Automatisierte Deployments mit ansible 19
Ansible – best practice - Projektstruktur
Ansible bietet eine grosse Flexibilität in der Art,
wie man sein Projekt strukturiert. Eine
gemeinsame Struktur über die Projekte hinweg
erleichtert dem Team den Alltag ungemein.
23.05.2017 Automatisierte Deployments mit ansible 20
Ansible – best practice - Variablen
23.05.2017 Automatisierte Deployments mit ansible 21
Ansible – best practice - Dokumentation
23.05.2017 Automatisierte Deployments mit ansible 22
Alles gut jetzt, oder ... ?!?
23.05.2017 Automatisierte Deployments mit ansible 23
Quellen
23.05.2017 Automatisierte Deployments mit ansible 24
https://github.com/thischke/Entwicklertag2017
https://www.slideshare.net/thischke/continuous-delivery-with-ansible
@thischke
23.05.2017
Vielen Dank für Ihre
Aufmerksamkeit.
See You Next Time
Adresse
diva-e Digital Value Enterprise GmbH
Office Karlsruhe
Ihr Kontakt
Thorben Hischke
Senior Architect
T +49 721 920 60 740
M +49 151 528 78 942
thorben.hischke@diva-e.com
www.diva-e.com
diva-e. You can’t buy it. You can’t make it.
And you sure can’t fake it.
23.05.2017 Automatisierte Deployments mit ansible 26

Weitere ähnliche Inhalte

Ähnlich wie Continuous Delivery with ansible

Einführung in Puppet und Vagrant
Einführung in Puppet und VagrantEinführung in Puppet und Vagrant
Einführung in Puppet und Vagrants0enke
 
Steinzeit war gestern! Wege der Cloud-nativen Evolution.
Steinzeit war gestern! Wege der Cloud-nativen Evolution.Steinzeit war gestern! Wege der Cloud-nativen Evolution.
Steinzeit war gestern! Wege der Cloud-nativen Evolution.QAware GmbH
 
Continuous Delivery für Cloud-native Anwendungen auf Cloud-nativer Infrastruktur
Continuous Delivery für Cloud-native Anwendungen auf Cloud-nativer InfrastrukturContinuous Delivery für Cloud-native Anwendungen auf Cloud-nativer Infrastruktur
Continuous Delivery für Cloud-native Anwendungen auf Cloud-nativer InfrastrukturQAware GmbH
 
Das dreckige Dutzend - ADF Migration nach 12c in der IKB - DOAG 2014.
Das dreckige Dutzend - ADF Migration nach 12c in der IKB - DOAG 2014.Das dreckige Dutzend - ADF Migration nach 12c in der IKB - DOAG 2014.
Das dreckige Dutzend - ADF Migration nach 12c in der IKB - DOAG 2014.Torsten Kleiber
 
CodeTalks Vortrag: Automatisierung mit Ansible & Jenkins @ LeanIX Enterprise ...
CodeTalks Vortrag: Automatisierung mit Ansible & Jenkins @ LeanIX Enterprise ...CodeTalks Vortrag: Automatisierung mit Ansible & Jenkins @ LeanIX Enterprise ...
CodeTalks Vortrag: Automatisierung mit Ansible & Jenkins @ LeanIX Enterprise ...LeanIX GmbH
 
SCD13: Shopware goes responsive
SCD13: Shopware goes responsiveSCD13: Shopware goes responsive
SCD13: Shopware goes responsiveshopware AG
 
070-685 Zertifizierungsprüfung deutsch
070-685 Zertifizierungsprüfung deutsch070-685 Zertifizierungsprüfung deutsch
070-685 Zertifizierungsprüfung deutschholgerschmitz2011
 
200 verteilte Oracle- Server mit Ansible ausrollen
200 verteilte Oracle- Server mit Ansible ausrollen200 verteilte Oracle- Server mit Ansible ausrollen
200 verteilte Oracle- Server mit Ansible ausrollenUwe Küchler
 
Einführung Progressive Web App
Einführung Progressive Web AppEinführung Progressive Web App
Einführung Progressive Web AppSebastian Blum
 
OSMC 2016: Open Monitoring Distribution 2016+ by Gerhard Laußer
OSMC 2016: Open Monitoring Distribution 2016+ by Gerhard Laußer   OSMC 2016: Open Monitoring Distribution 2016+ by Gerhard Laußer
OSMC 2016: Open Monitoring Distribution 2016+ by Gerhard Laußer NETWAYS
 
Mehrserver Lösungen
Mehrserver LösungenMehrserver Lösungen
Mehrserver LösungenAvarteq
 
Cloud Provisioning mit Juju
Cloud Provisioning mit JujuCloud Provisioning mit Juju
Cloud Provisioning mit JujuFrank Müller
 
Architektur und Automation als Enabler für DevOps
Architektur und Automation als Enabler für DevOpsArchitektur und Automation als Enabler für DevOps
Architektur und Automation als Enabler für DevOpsmatfsw
 
Azure Notebooks
Azure NotebooksAzure Notebooks
Azure NotebooksTEitelberg
 
Vagrant, Puppet, Docker für Entwickler und Architekten
Vagrant, Puppet, Docker für Entwickler und ArchitektenVagrant, Puppet, Docker für Entwickler und Architekten
Vagrant, Puppet, Docker für Entwickler und ArchitektenOPITZ CONSULTING Deutschland
 

Ähnlich wie Continuous Delivery with ansible (20)

Einführung in Puppet und Vagrant
Einführung in Puppet und VagrantEinführung in Puppet und Vagrant
Einführung in Puppet und Vagrant
 
Steinzeit war gestern! Wege der Cloud-nativen Evolution.
Steinzeit war gestern! Wege der Cloud-nativen Evolution.Steinzeit war gestern! Wege der Cloud-nativen Evolution.
Steinzeit war gestern! Wege der Cloud-nativen Evolution.
 
Node.js
Node.jsNode.js
Node.js
 
Continuous Delivery für Cloud-native Anwendungen auf Cloud-nativer Infrastruktur
Continuous Delivery für Cloud-native Anwendungen auf Cloud-nativer InfrastrukturContinuous Delivery für Cloud-native Anwendungen auf Cloud-nativer Infrastruktur
Continuous Delivery für Cloud-native Anwendungen auf Cloud-nativer Infrastruktur
 
Das dreckige Dutzend - ADF Migration nach 12c in der IKB - DOAG 2014.
Das dreckige Dutzend - ADF Migration nach 12c in der IKB - DOAG 2014.Das dreckige Dutzend - ADF Migration nach 12c in der IKB - DOAG 2014.
Das dreckige Dutzend - ADF Migration nach 12c in der IKB - DOAG 2014.
 
CodeTalks Vortrag: Automatisierung mit Ansible & Jenkins @ LeanIX Enterprise ...
CodeTalks Vortrag: Automatisierung mit Ansible & Jenkins @ LeanIX Enterprise ...CodeTalks Vortrag: Automatisierung mit Ansible & Jenkins @ LeanIX Enterprise ...
CodeTalks Vortrag: Automatisierung mit Ansible & Jenkins @ LeanIX Enterprise ...
 
SCD13: Shopware goes responsive
SCD13: Shopware goes responsiveSCD13: Shopware goes responsive
SCD13: Shopware goes responsive
 
070-685 Zertifizierungsprüfung deutsch
070-685 Zertifizierungsprüfung deutsch070-685 Zertifizierungsprüfung deutsch
070-685 Zertifizierungsprüfung deutsch
 
200 verteilte Oracle- Server mit Ansible ausrollen
200 verteilte Oracle- Server mit Ansible ausrollen200 verteilte Oracle- Server mit Ansible ausrollen
200 verteilte Oracle- Server mit Ansible ausrollen
 
Einführung Progressive Web App
Einführung Progressive Web AppEinführung Progressive Web App
Einführung Progressive Web App
 
OSMC 2016: Open Monitoring Distribution 2016+ by Gerhard Laußer
OSMC 2016: Open Monitoring Distribution 2016+ by Gerhard Laußer   OSMC 2016: Open Monitoring Distribution 2016+ by Gerhard Laußer
OSMC 2016: Open Monitoring Distribution 2016+ by Gerhard Laußer
 
Mehrserver Lösungen
Mehrserver LösungenMehrserver Lösungen
Mehrserver Lösungen
 
Cloud Provisioning mit Juju
Cloud Provisioning mit JujuCloud Provisioning mit Juju
Cloud Provisioning mit Juju
 
Testing tools
Testing toolsTesting tools
Testing tools
 
Architektur und Automation als Enabler für DevOps
Architektur und Automation als Enabler für DevOpsArchitektur und Automation als Enabler für DevOps
Architektur und Automation als Enabler für DevOps
 
Infra coders meetup
Infra coders meetupInfra coders meetup
Infra coders meetup
 
Reactive Programming
Reactive ProgrammingReactive Programming
Reactive Programming
 
Automatisierung mit grunt
Automatisierung mit gruntAutomatisierung mit grunt
Automatisierung mit grunt
 
Azure Notebooks
Azure NotebooksAzure Notebooks
Azure Notebooks
 
Vagrant, Puppet, Docker für Entwickler und Architekten
Vagrant, Puppet, Docker für Entwickler und ArchitektenVagrant, Puppet, Docker für Entwickler und Architekten
Vagrant, Puppet, Docker für Entwickler und Architekten
 

Continuous Delivery with ansible

  • 2. Vorstellung 23.05.2017 Automatisierte Deployments mit ansible Thorben Hischke Senior Architect • Dipl.-Inf. (FH), seit 2007 bei Netpioneer GmbH / diva-e • Schwerpunkt CMS (Imperia, Polopoly, FirstSpirit) • Integration und Kundenzufriedenheit 2
  • 3. Vision „Ich möchte meine Software qualitätsgesichert per Knopfdruck live bringen. Die Besucher meiner Webseite darf dadurch nicht beeinträchtigt werden.“ 23.05.2017 Automatisierte Deployments mit ansible 3
  • 4. A/B - Deployment „The blue-green deployment approach does this by ensuring you have two production environments, as identical as possible. At any time one of them, let's say blue for the example, is live. As you prepare a new release of your software you do your final stage of testing in the green environment. Once the software is working in the green environment, you switch the router so that all incoming requests go to the green environment - the blue one is now idle.“ Quelle: https://martinfowler.com/bliki/BlueGreenDeployment.html 23.05.2017 Automatisierte Deployments mit ansible 4
  • 5. A/B – Deployment – Variante 1 23.05.2017 Automatisierte Deployments mit ansible 5
  • 6. A/B – Deployment – Variante 2 23.05.2017 Automatisierte Deployments mit ansible 6
  • 7. A/B – Deployment – Variante 3 23.05.2017 Automatisierte Deployments mit ansible 7
  • 8. Architektur - Skizze 23.05.2017 Automatisierte Deployments mit ansible 8
  • 9. Warum Provisionierungs-Werkzeuge? Automatisierbar 23.05.2017 Automatisierte Deployments mit ansible 9 1 2 3 Konfiguration wird beschrieben ☛„Infrastructure-as-Code“ • lesbar • versionierbar Reproduzierbar • Server befinden sich in einem identischem Zustand • kein „auf dem dritten Server war die Config noch nicht angepasst“
  • 11. Ansible - Pro umfangreiche Module, Rollen sind wiederverwendbar 23.05.2017 Automatisierte Deployments mit ansible 11 1 2 3 4 leichter Einstieg, steile Leinkurve nur SSH und Python werden benötigt Push-Prinzip, Agent wird nicht benötigt
  • 12. Ansible - Contra 23.05.2017 Automatisierte Deployments mit ansible 12 Keine Abstraktion über OS-Grenzen hinweg 1 2 3 4 flexible Programmierung („Wo habe ich diese #X?!-Variable definiert?“) Editor-Unterstützung YAML
  • 13. Ein simples Beispiel - hosts: webservers vars: http_port: 80 max_clients: 200 remote_user: root tasks: - name: ensure apache is at the latest version yum: name=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 (and enable it at boot) service: name=httpd state=started enabled=yes handlers: - name: restart apache service: name=httpd state=restarted 23.05.2017 Automatisierte Deployments mit ansible 13
  • 15. Playbooks - playbook-vagrant-app.yml 23.05.2017 Automatisierte Deployments mit ansible 15
  • 16. Roles - common 23.05.2017 Automatisierte Deployments mit ansible 16
  • 17. Templates – nginx.conf 23.05.2017 Automatisierte Deployments mit ansible 17
  • 20. Ansible – best practice - Projektstruktur Ansible bietet eine grosse Flexibilität in der Art, wie man sein Projekt strukturiert. Eine gemeinsame Struktur über die Projekte hinweg erleichtert dem Team den Alltag ungemein. 23.05.2017 Automatisierte Deployments mit ansible 20
  • 21. Ansible – best practice - Variablen 23.05.2017 Automatisierte Deployments mit ansible 21
  • 22. Ansible – best practice - Dokumentation 23.05.2017 Automatisierte Deployments mit ansible 22
  • 23. Alles gut jetzt, oder ... ?!? 23.05.2017 Automatisierte Deployments mit ansible 23
  • 24. Quellen 23.05.2017 Automatisierte Deployments mit ansible 24 https://github.com/thischke/Entwicklertag2017 https://www.slideshare.net/thischke/continuous-delivery-with-ansible @thischke
  • 25. 23.05.2017 Vielen Dank für Ihre Aufmerksamkeit. See You Next Time Adresse diva-e Digital Value Enterprise GmbH Office Karlsruhe Ihr Kontakt Thorben Hischke Senior Architect T +49 721 920 60 740 M +49 151 528 78 942 thorben.hischke@diva-e.com www.diva-e.com
  • 26. diva-e. You can’t buy it. You can’t make it. And you sure can’t fake it. 23.05.2017 Automatisierte Deployments mit ansible 26