SlideShare a Scribd company logo
DevOps Risk Mitigation
www.immobilienscout24.de
Berlin | 23.07.2014 | Schlomo Schapiro
Systems Architect, Open Source Evangelist
License: http://creativecommons.org/licenses/by-nc-nd/3.0/
Test Driven Infrastructure
@schlomoschapiro
Expensive
Fix
Cheap
Fix
Costs Of Finding
Bugs In Production
Plan
Design
Budget
Develop Test
RUN
DEV
Plan
Design
Budget
Develop Test RUNOPS
TIME
Plan
Design
Budget
Develop Test
Plan
Design
Budget
Develop Test RUN
Proxy
config
Database
borked
„Buy Now“
button broken
MTA drop
all mail
Load Balancer
Configuration
Everything costs
only 0 €
Login possible
without password
NFS not
available
DB Replication
stopped
No ads
shown
Broken
CSS / JS
Tomcat won't
start/stop
Service user
not defined
sudoers
invalid
DevOps: Respect & Learning
DEV learn
from OPS to
think about:
●
Resources (CPU, RAM, Disk)
●
Services (Start, Stop, Status)
●
Dependencies (Start DB before App)
●
Logfiles (Rotate, Remove)
●
Disk Space
●
Monitoring and Alarming
●
...
OPS learn
from DEV to
think about:
●
Incremental Improvement
●
Infrastructure as Code
●
Version Control System
●
Coding (OO, Functions, Libraries …)
●
Code Quality
●
Unit & Integration Tests
●
Test Automation
●
...
Untested
=
Broken
Unit Tests
Test the smallest possible components in an
artifical environment.
System Tests
Test the entire application in a real(istic)
environment together with other
applications.
Part of build process
Syntax checks
 Scripts
 Config Files
 Data Files
Unit tests for functions/libs
Run program with test data
 Check result
 Check program behaviour
with wrong/broken test data
Also run on Developer desktop
Quick feedback (~ seconds)
Install on test server
Run tests from outside
 HTTP calls
 Send emails
 Try to login
Run tests from inside
 Remote Exec (rsh, ssh …)
http://go.schapiro.org/rshpitfall
 Service Start, Stop & Status
 Modify server to create
good & bad test scenarios
 Reboot
Unit Tests System Tests
Unit
Tests
%prep
%setup -q
%install
install … %{buildroot}/…
install … %{buildroot}/…
%files
%defattr(-,root,root,-)
/...
BuildRequires: sudo
%build
set -e
visudo -c -f sudoers
%install
install -m 0440 sudoers -D 
%{buildroot}/etc/suoders.d/%{name}
%files%defattr(-,root,root,-)
/etc/suoders.d/%{name}
BuildRequires: PyYAML, pylint
%build
set -e
# syntax checks
bash -n my_script.sh
# Should be valid python code
pylint -E yum-repo-propagate
# should be valid YAML file
python -c "↩
import yaml↩
yaml.safe_load(open('config.yaml'))↩
"
System
Tests
http://impreza-gt-club.ch/V2.0/Tests/WRX08/Koch2.jpg
Build
Auto-
mation
Source
Code
(SVN)
Monitor
Changes
Build Server
Run
Build
Job
●
Check out source
●
Run Unit Tests
●
Create RPM
●
Source
Code DEV
YUM
Repo
Upload
PRO
YUM
Repo
Propagate
RPM
Test Server
Deploy
and
Run
TestJob
yum
Prod Server
Deploy
to PROD
yum
Build
Auto-
mation
Source
Code
(SVN)
Monitor
Changes
Build Server
Run
Build
Job
●
Check out source
●
Run Unit Tests
●
Create RPM
●
Source
Code DEV
YUM
Repo
Upload
PRO
YUM
Repo
Propagate
RPM
Test Server
Deploy
and
Run
TestJob
yum
Prod Server
Deploy
to PROD
yum
SAN mount service
Test via rsh
Mock SAN devices
with losetup
service start, stop
mounts/umounts
Error handling
HTTP Proxy Configuration
X-Forwarded-For header spoofs source
Check result for ERR_ACCESS_DENIED
Run tests for all function groups!
Test Server
GET http://external.com/
X-Forwarded-For: 10.11.12.01
502 Bad Gateway✔
GET http://external.com/
X-Forwarded-For: 10.34.56.01
403 Forbidden
ERR_ACCESS_DENIED by proxy server
✘
✘
VM Provisioning & Kickstart Installation
Test via HTTP API
Create broken VMs and check error reports
Create valid VM and install Linux OS
Scrape VM screen via OCR
http://github.com/Immobilienscout24/lab-manager-light
34 35 36
2 3
53
87 88 89 90 91 92 93 94 95 96 97
TIME
Continous Live Deployment
Deploy every application when it is ready.
Automate the delivery chain from source till production.
Low Risk – Lots of Fun
http://go.schapiro.org/slides
Kontakt:
Immobilien Scout GmbH
Andreasstraße 10
10243 Berlin
Fon: +49 30 243 01-1229
Email: schlomo.schapiro@immobilienscout24.de
URL: www.immobilienscout24.de
Thank you very much!
Please contact me for further
questions and discussions.

More Related Content

PDF
The Role of GitOps in IT Strategy - June 2021 - Schlomo Schapiro
PDF
Want Digitalisation, have Cloud - DevSecOps Days 2021 - Schlomo Schapiro
PDF
Automated Governance - Continous Lifecycle 2019 - Schlomo Schapiro
PDF
Open Source Contribution Policy at DB Systel - Schlomo Schapiro - AK Open Sou...
PDF
Kubernetes - Shifting the mindset from servers to containers - microxchg 201...
PDF
DevOps ist normal - DevOps Essentials 2019 - Schlomo Schapiro
PDF
GUUG FFG 2017 - DevOps for Everybody - How the entire company can benefit fro...
PDF
Telekom Techtalk - Practical DevOps
The Role of GitOps in IT Strategy - June 2021 - Schlomo Schapiro
Want Digitalisation, have Cloud - DevSecOps Days 2021 - Schlomo Schapiro
Automated Governance - Continous Lifecycle 2019 - Schlomo Schapiro
Open Source Contribution Policy at DB Systel - Schlomo Schapiro - AK Open Sou...
Kubernetes - Shifting the mindset from servers to containers - microxchg 201...
DevOps ist normal - DevOps Essentials 2019 - Schlomo Schapiro
GUUG FFG 2017 - DevOps for Everybody - How the entire company can benefit fro...
Telekom Techtalk - Practical DevOps

What's hot (9)

PDF
Net Conf Israel - Intro & Building Cloud Native Apps with .NET Core 3.0 and K...
PDF
Vered Flis: Because performance matters! Architecture Next 20
PDF
Building Serverless Web Applications with OpenWhisk
PDF
Create Alexa Skills using IBM Watson Conversation and Apache OpenWhisk
PDF
Generative models in the arts
PDF
Cloud native principles
PDF
Nir Doboviski: In Space No One Can Hear Microservices Scream – a Microservice...
PDF
use case ibm k8s_service+devops
PDF
GitHub Actions 101
Net Conf Israel - Intro & Building Cloud Native Apps with .NET Core 3.0 and K...
Vered Flis: Because performance matters! Architecture Next 20
Building Serverless Web Applications with OpenWhisk
Create Alexa Skills using IBM Watson Conversation and Apache OpenWhisk
Generative models in the arts
Cloud native principles
Nir Doboviski: In Space No One Can Hear Microservices Scream – a Microservice...
use case ibm k8s_service+devops
GitHub Actions 101
Ad

Viewers also liked (6)

PDF
Viele Server - Wenig Arbeit: Betriebsautomation bei ImmobilienScout24
PDF
OSDC 2016 - Hybrid Cloud - A Cloud Migration Strategy
PDF
DevOps, Agile and Open Source at ImmobilienScout24
PDF
PyCon 2013 - Open Source Sponsoring - und den Chef damit überzeugen
PDF
GUUG FFG 2017 - DevOps for Everybody - A Workplace Strategy for the Digital Age
PDF
Rational Theology of Judaism - Introduction
Viele Server - Wenig Arbeit: Betriebsautomation bei ImmobilienScout24
OSDC 2016 - Hybrid Cloud - A Cloud Migration Strategy
DevOps, Agile and Open Source at ImmobilienScout24
PyCon 2013 - Open Source Sponsoring - und den Chef damit überzeugen
GUUG FFG 2017 - DevOps for Everybody - A Workplace Strategy for the Digital Age
Rational Theology of Judaism - Introduction
Ad

Similar to EuroPython 2014 Devops Risk Mitigation (20)

PDF
OSDC 2014 Test Driven Infrastructure
PDF
OSDC 2014: Schlomo Schapiro - Test Driven Infrastructure
PDF
PyCon 2013 Test Driven Infrastructure
PDF
A developers' journey into building automated tests for IT from the ground up
PDF
SE 2015 DevOps Risk Mitigation - Test Driven Infrastructure
PDF
The road to continuous deployment (PHPCon Poland 2016)
PPTX
Containerize your Blackbox tests
PDF
Atmosphere 2018: Yury Tsarev - TEST DRIVEN INFRASTRUCTURE FOR HIGHLY PERFORMI...
PPTX
Testing for infra code using test-kitchen,docker,chef
PDF
The road to continuous deployment (DomCode September 2016)
PDF
Microservice Automated Testing on Kubernetes
PDF
The DevSecOps Builder’s Guide to the CI/CD Pipeline
PPTX
Test-Driven Infrastructure with Ansible, Test Kitchen, Serverspec and RSpec
PDF
OSDC 2016 - Continous Integration in Data Centers - Further 3 Years later by ...
PPTX
Resilience Testing
PDF
How to test infrastructure code: automated testing for Terraform, Kubernetes,...
PDF
Extensible dev secops pipelines with Jenkins, Docker, Terraform, and a kitche...
PPTX
Introduction to Devops (Melbourne University)
PDF
Dennis Benkert - The Dog Ate My Deployment - Symfony Usergroup Berlin March ...
 
PPTX
Test-Driven Infrastructure with Puppet, Test Kitchen, Serverspec and RSpec
OSDC 2014 Test Driven Infrastructure
OSDC 2014: Schlomo Schapiro - Test Driven Infrastructure
PyCon 2013 Test Driven Infrastructure
A developers' journey into building automated tests for IT from the ground up
SE 2015 DevOps Risk Mitigation - Test Driven Infrastructure
The road to continuous deployment (PHPCon Poland 2016)
Containerize your Blackbox tests
Atmosphere 2018: Yury Tsarev - TEST DRIVEN INFRASTRUCTURE FOR HIGHLY PERFORMI...
Testing for infra code using test-kitchen,docker,chef
The road to continuous deployment (DomCode September 2016)
Microservice Automated Testing on Kubernetes
The DevSecOps Builder’s Guide to the CI/CD Pipeline
Test-Driven Infrastructure with Ansible, Test Kitchen, Serverspec and RSpec
OSDC 2016 - Continous Integration in Data Centers - Further 3 Years later by ...
Resilience Testing
How to test infrastructure code: automated testing for Terraform, Kubernetes,...
Extensible dev secops pipelines with Jenkins, Docker, Terraform, and a kitche...
Introduction to Devops (Melbourne University)
Dennis Benkert - The Dog Ate My Deployment - Symfony Usergroup Berlin March ...
 
Test-Driven Infrastructure with Puppet, Test Kitchen, Serverspec and RSpec

More from Schlomo Schapiro (15)

PDF
The Role of GitOps in IT-Strategy v2 - July 2022 - Schlomo Schapiro
PDF
The GitOps Journey - Schlomo Schapiro - Berlin DevOps Meetup 2021-11
PDF
The Role of GitOps in IT-Strategy - November 2021 - Schlomo Schapiro - Contin...
PDF
Schlomo Schapiro - Why I like to use the proprietary Cloud services without f...
PDF
The GitOps Journey - GitOpsCon EU 2021 - Schlomo Schapiro
PDF
Compliant by Default - Digitaler Wandel - 14.08.2019 - Schlomo Schapiro
PDF
The Devops Driving School - DevOps Gathering 2019 - Schlomo Schapiro
PDF
Compliant by Default - Continuous Delivery at DB Systel - 16.10.2018 - Schlom...
PDF
DevOps + Continuous Delivery + Cloud: The Three Drivers of Enterprise Agility...
PDF
Root for all - measuring DevOps adoption - microxchg 2018 - Schlomo Schapiro
PDF
WARNING is a waste of my time
PDF
EuroPython 2014 YAML Reader Lightning Talk
PDF
PyCon 2013 - Distributed Monitoring Configuration
PDF
LinuxTag 2013 Relax and Recover - Disaster Recovery for UEFI Systems
PDF
Linux tag 2013 Data Center Automation with YADT
The Role of GitOps in IT-Strategy v2 - July 2022 - Schlomo Schapiro
The GitOps Journey - Schlomo Schapiro - Berlin DevOps Meetup 2021-11
The Role of GitOps in IT-Strategy - November 2021 - Schlomo Schapiro - Contin...
Schlomo Schapiro - Why I like to use the proprietary Cloud services without f...
The GitOps Journey - GitOpsCon EU 2021 - Schlomo Schapiro
Compliant by Default - Digitaler Wandel - 14.08.2019 - Schlomo Schapiro
The Devops Driving School - DevOps Gathering 2019 - Schlomo Schapiro
Compliant by Default - Continuous Delivery at DB Systel - 16.10.2018 - Schlom...
DevOps + Continuous Delivery + Cloud: The Three Drivers of Enterprise Agility...
Root for all - measuring DevOps adoption - microxchg 2018 - Schlomo Schapiro
WARNING is a waste of my time
EuroPython 2014 YAML Reader Lightning Talk
PyCon 2013 - Distributed Monitoring Configuration
LinuxTag 2013 Relax and Recover - Disaster Recovery for UEFI Systems
Linux tag 2013 Data Center Automation with YADT

Recently uploaded (20)

PDF
Tenda Login Guide: Access Your Router in 5 Easy Steps
PDF
Testing WebRTC applications at scale.pdf
PDF
Slides PDF The World Game (s) Eco Economic Epochs.pdf
PPT
tcp ip networks nd ip layering assotred slides
PDF
Automated vs Manual WooCommerce to Shopify Migration_ Pros & Cons.pdf
PDF
Paper PDF World Game (s) Great Redesign.pdf
DOCX
Unit-3 cyber security network security of internet system
PDF
The New Creative Director: How AI Tools for Social Media Content Creation Are...
PPTX
Introduction to Information and Communication Technology
PPTX
innovation process that make everything different.pptx
PPTX
Job_Card_System_Styled_lorem_ipsum_.pptx
PDF
💰 𝐔𝐊𝐓𝐈 𝐊𝐄𝐌𝐄𝐍𝐀𝐍𝐆𝐀𝐍 𝐊𝐈𝐏𝐄𝐑𝟒𝐃 𝐇𝐀𝐑𝐈 𝐈𝐍𝐈 𝟐𝟎𝟐𝟓 💰
PDF
RPKI Status Update, presented by Makito Lay at IDNOG 10
PDF
SASE Traffic Flow - ZTNA Connector-1.pdf
PPTX
E -tech empowerment technologies PowerPoint
PPTX
artificial intelligence overview of it and more
PPTX
CHE NAA, , b,mn,mblblblbljb jb jlb ,j , ,C PPT.pptx
PDF
FINAL CALL-6th International Conference on Networks & IOT (NeTIOT 2025)
PPTX
Internet___Basics___Styled_ presentation
PPTX
Power Point - Lesson 3_2.pptx grad school presentation
Tenda Login Guide: Access Your Router in 5 Easy Steps
Testing WebRTC applications at scale.pdf
Slides PDF The World Game (s) Eco Economic Epochs.pdf
tcp ip networks nd ip layering assotred slides
Automated vs Manual WooCommerce to Shopify Migration_ Pros & Cons.pdf
Paper PDF World Game (s) Great Redesign.pdf
Unit-3 cyber security network security of internet system
The New Creative Director: How AI Tools for Social Media Content Creation Are...
Introduction to Information and Communication Technology
innovation process that make everything different.pptx
Job_Card_System_Styled_lorem_ipsum_.pptx
💰 𝐔𝐊𝐓𝐈 𝐊𝐄𝐌𝐄𝐍𝐀𝐍𝐆𝐀𝐍 𝐊𝐈𝐏𝐄𝐑𝟒𝐃 𝐇𝐀𝐑𝐈 𝐈𝐍𝐈 𝟐𝟎𝟐𝟓 💰
RPKI Status Update, presented by Makito Lay at IDNOG 10
SASE Traffic Flow - ZTNA Connector-1.pdf
E -tech empowerment technologies PowerPoint
artificial intelligence overview of it and more
CHE NAA, , b,mn,mblblblbljb jb jlb ,j , ,C PPT.pptx
FINAL CALL-6th International Conference on Networks & IOT (NeTIOT 2025)
Internet___Basics___Styled_ presentation
Power Point - Lesson 3_2.pptx grad school presentation

EuroPython 2014 Devops Risk Mitigation

  • 1. DevOps Risk Mitigation www.immobilienscout24.de Berlin | 23.07.2014 | Schlomo Schapiro Systems Architect, Open Source Evangelist License: http://creativecommons.org/licenses/by-nc-nd/3.0/ Test Driven Infrastructure @schlomoschapiro
  • 4. Plan Design Budget Develop Test Plan Design Budget Develop Test RUN Proxy config Database borked „Buy Now“ button broken MTA drop all mail Load Balancer Configuration Everything costs only 0 € Login possible without password NFS not available DB Replication stopped No ads shown Broken CSS / JS Tomcat won't start/stop Service user not defined sudoers invalid
  • 5. DevOps: Respect & Learning DEV learn from OPS to think about: ● Resources (CPU, RAM, Disk) ● Services (Start, Stop, Status) ● Dependencies (Start DB before App) ● Logfiles (Rotate, Remove) ● Disk Space ● Monitoring and Alarming ● ... OPS learn from DEV to think about: ● Incremental Improvement ● Infrastructure as Code ● Version Control System ● Coding (OO, Functions, Libraries …) ● Code Quality ● Unit & Integration Tests ● Test Automation ● ...
  • 7. Unit Tests Test the smallest possible components in an artifical environment. System Tests Test the entire application in a real(istic) environment together with other applications.
  • 8. Part of build process Syntax checks  Scripts  Config Files  Data Files Unit tests for functions/libs Run program with test data  Check result  Check program behaviour with wrong/broken test data Also run on Developer desktop Quick feedback (~ seconds) Install on test server Run tests from outside  HTTP calls  Send emails  Try to login Run tests from inside  Remote Exec (rsh, ssh …) http://go.schapiro.org/rshpitfall  Service Start, Stop & Status  Modify server to create good & bad test scenarios  Reboot Unit Tests System Tests
  • 10. %prep %setup -q %install install … %{buildroot}/… install … %{buildroot}/… %files %defattr(-,root,root,-) /...
  • 11. BuildRequires: sudo %build set -e visudo -c -f sudoers %install install -m 0440 sudoers -D %{buildroot}/etc/suoders.d/%{name} %files%defattr(-,root,root,-) /etc/suoders.d/%{name}
  • 12. BuildRequires: PyYAML, pylint %build set -e # syntax checks bash -n my_script.sh # Should be valid python code pylint -E yum-repo-propagate # should be valid YAML file python -c "↩ import yaml↩ yaml.safe_load(open('config.yaml'))↩ "
  • 14. Build Auto- mation Source Code (SVN) Monitor Changes Build Server Run Build Job ● Check out source ● Run Unit Tests ● Create RPM ● Source Code DEV YUM Repo Upload PRO YUM Repo Propagate RPM Test Server Deploy and Run TestJob yum Prod Server Deploy to PROD yum
  • 15. Build Auto- mation Source Code (SVN) Monitor Changes Build Server Run Build Job ● Check out source ● Run Unit Tests ● Create RPM ● Source Code DEV YUM Repo Upload PRO YUM Repo Propagate RPM Test Server Deploy and Run TestJob yum Prod Server Deploy to PROD yum
  • 16. SAN mount service Test via rsh Mock SAN devices with losetup service start, stop mounts/umounts Error handling
  • 17. HTTP Proxy Configuration X-Forwarded-For header spoofs source Check result for ERR_ACCESS_DENIED Run tests for all function groups! Test Server GET http://external.com/ X-Forwarded-For: 10.11.12.01 502 Bad Gateway✔ GET http://external.com/ X-Forwarded-For: 10.34.56.01 403 Forbidden ERR_ACCESS_DENIED by proxy server ✘ ✘
  • 18. VM Provisioning & Kickstart Installation Test via HTTP API Create broken VMs and check error reports Create valid VM and install Linux OS Scrape VM screen via OCR http://github.com/Immobilienscout24/lab-manager-light
  • 19. 34 35 36 2 3 53 87 88 89 90 91 92 93 94 95 96 97 TIME Continous Live Deployment Deploy every application when it is ready. Automate the delivery chain from source till production.
  • 20. Low Risk – Lots of Fun http://go.schapiro.org/slides
  • 21. Kontakt: Immobilien Scout GmbH Andreasstraße 10 10243 Berlin Fon: +49 30 243 01-1229 Email: schlomo.schapiro@immobilienscout24.de URL: www.immobilienscout24.de Thank you very much! Please contact me for further questions and discussions.