Kopf frei für’s Produkt – Automatisierung mit Ansible und Jenkins
CodeTalks Conference, Hamburg
Oktober 2014
Über uns
2
André Christ Gründer & CTO
Dr. Daniel Pozzi SW Architekt
Agenda
3
Kopf frei für welches Produkt?
Weshalb Automatisierung?
Was sind die „Lessons Learned“?
Wie wurde es mit Jenkins & Ansible umgesetzt?
Typisches Bild für IT Landschaften in Unternehmen: Fehlende Transparenz
4
Redundanz Kopfmonopole Risiken
leanIX eine leicht zu nutzende SaaS-Plattform für das IT Architektur-Management
5
Fact Sheets & Tagging
Kontext-basierte Suche
API, Import & Export
Kommentierung
IT Inventory Kollaborationsplattform Interaktives Reporting
Activity Stream & Benachrichtigungen
Subscription
Print & Export (PDF)
Best Practice Reports
Interaktive Anpassung
Agenda
6
Kopf frei für welches Produkt?
Weshalb Automatisierung?
Wie wurde es mit Jenkins & Ansible umgesetzt?
Was sind die „Lessons Learned“?
Starke Nachfrage namhafter Kunden nach frischem Ansatz
7
2012 2013 2014 2015
> 50 Kunden
Skalierung der Platform
2012 2014 2013
“MVP” Enterprise
Integration / SSO Single Page
JS App Professionalisierung
Build-Umgebung Qualitäts &
Servicemangement
9
Statische Dokumentation?
• Zu wenig Ressourcen
• Nicht wiederholbar
• Schnell veraltet
Agenda
10
Kopf frei für welches Produkt?
Weshalb Automatisierung?
Wie wurde es mit Jenkins & Ansible umgesetzt?
Was sind die „Lessons Learned“?
Anwendungsfälle
11
DevOps
Code, Build & Test Provision & Deploy WebEx & Trial-Phase
Warum Jenkins & Ansible?
12
Einfach
Erweiterbar
Skalierbar
Flexibel
Open Source
Community
Gute Weboberfläche Einfache Syntax (YAML)
Continuous Integration (CI) & Continuous Delivery (CD)
Zahlreiche Plugins Zahlreiche Module
Verteiltes Build System Pull-Mode anstatt SSH-Push
Konfiguration von Jobs Kapselung durch Rollen
MIT License MIT License
Sehr aktiv (seit 2011) Starkes Wachstum (seit 2012)
Orchestrierung von Admin-Aufgaben
Einbindung in den Gesamtprozess
13
Deploy to Staging
Development Branch
Build Automated
Tests
Business Tests
Merge to Production
Deploy to Production
In Production
GitFlow xUnit + Selenium
GitFlow BrowserStack
Ansible Architektur
14
Tasks
Install Package
Copy file
Apply template
Rollen
Linux Basis
Apache
MySQL
PHP
Application 1
...
Playbooks
Provision DB Server
Deploy Web App
...
Hosts
SVR-DE-TEST
SVR-DE-DEV
SVR-DE-PROD
SVR-US-PROD
Beispiel für Live-Demo
CI Server Webserver
1 Jenkins führt Ansible playbook aus
2 Ansible … installiert Apache auf Linux System … erstellt vhost … deployed HTML-Seite aus template
1
2
Live-Demo
16
Ansible: Ausführung des Playbooks
17
#
# Provisions the demo web server
#
---
- hosts: web
sudo: true
roles:
- {role: 'init'}
- {role: 'apache2'}
- {role: 'webbox'}
/ansible/provision_web.yml
$ ansible_playbook provision_web.yml –I hosts/web -v
Ansible: Apache Rolle (Auszug)
18
[…]
- name: Install Apache
sudo: yes
apt: pkg=apache2 state=latest
- name: Install Apache Modules
command: a2enmod {{item}} creates="/etc/apache2/mods-enabled/{{item}}.load"
notify: restart apache
with_items: apache_modules
[…]
/ansible/roles/apache2/tasks/install.yml
Ansible: Hosts Datei
19
#
# Gruppe mit Hosts (DNS-Name & Parameter)
#
[web]
web-box.dev ansible_ssh_user=vagrant […]
web.leanix.net ansible_ssh_user=root
[db]
db-box.dev ansible_ssh_user=vagrant […]
db.leanix.net ansible_ssh_user=root
Roles/apache2/tasks/install.yml
Agenda
20
Kopf frei für welches Produkt?
Weshalb Automatisierung?
Wie wurde es mit Jenkins & Ansible umgesetzt?
Was sind die „Lessons Learned“?
Erste Hürden und Problemlösungen
21
• Ansible v1 nicht unter Windows
• Für bestimmte Tasks müssen Bilbliotheken auf Ziel-Maschine vorhanden sein
• Parallele Ausführung führt zu Locking von Packetmanagern
Nutzung via Vagrant
In Tasks bzw. Rollen check auf Installierte Pakete Erst prüfen, ob Paket installiert werden muss
Was haben wir davon?
22
20 Tage
3 Std
30 Min
Aufwand für die Einrichtung, Lernen, Stolperfallen von Ansible & Jenkins
Ramp-Up eines neuen Mitarbeiters bis zum ersten Commit
Zeit bis ein neuer leanIX Node „from scratch“ produktiv ist (bei installiertem OS)
23
DANKE! Follow us @leanix_net
Download Beispiel Code github.com/leanix/codetalks_2014_demo
Zu kompliziert??? - Bei LeanIX moderne Anwendungen für Unternehmen entwickeln!
Backup
24
leanIX integriert sich in ein Ökosystem für modernes IT Management
25
Collaboration- & Document Mgmt
IT Service Management & Help Desk
Requirements- & Business Process Mgmt
Project Portfolio- and Ressource-Management
Selected products to illustrate
Out-of-the-box Integrationen
REST API & SDKs
developer.leanix.net
Verständliche Reports und flexible Sichten ermöglichen eine umfassende IT Transparenz
26
Heatmaps Roadmaps Costs Metrics
Application Landscape
Interface Landscape
Application Sourcing Map
Application Roadmap
Technology Vendor Support
Project Roadmap
Operations Cost by Capability
Operations Cost by Provider
Project Cost & Status
Application Portfolio
Application Lifecycle Development
Application Age Structure
Nahtlose Einbindung der Geschäftsprozesse sichert Visibilität bei den Fachseiten
27
Sync
Top Related