Sascha Möllering | ZANOX.de AG

Continuous Delivery and Infrastructure
as Code
About me

Sascha Möllering
Software Engineering Team Lead
sascha.moellering@zanox.com
http://www.der-maschinenstuermer.de/

@sascha242
TABLE OF CONTENTS
•
•
•
•
•
•

Problem?
Solution!
Continuous Delivery
Infrastructure as Code
Chef and JBoss
Q&A
TABLE OF CONTENTS
•
•
•
•
•
•

Problem?
Solution!
Continuous Delivery
Infrastructure as Code
Chef and JBoss
Q&A
Problem?
• Situation two years ago:
– Manual server setup
– Manual deployment
– Deployed files contain a lot of changes
– Rollbacks difficult
– Time slots for deployments (biweekly)
– Windows environment
– ...
TABLE OF CONTENTS
•
•
•
•
•
•

Problem?
Solution!
Continuous Delivery
Infrastructure as Code
Chef and JBoss
Q&A
Solution!
• Now:
– Automated deployments
– Infrastructure as Code
– Only small changes
– Rollbacks are easy
– Deploy whenever you want!
– Linux environment
– ...
DELIVER
HIGH QUALITY SOFTWARE
AT LOW RISK
FAST,
ANYTIME
BY THE PRODUCT
TEAMS THEMSELVES!!!
Solution!
•
•
•
•
•

Etsy
Github
Flickr
Facebook
Amazon

25 deployments / day
40 deployments / day
60 deployments / day
Up to 100 deployments / day
Deployment every 11.6 sec
TABLE OF CONTENTS
•
•
•
•
•
•

Problem?
Solution!
Continuous Delivery
Infrastructure as Code
Chef and JBoss
Q&A
Continuous Delivery

„Reduce the cost, time, and
risk of delivering
incremental changes to
users“
(Jez Humble, Adopting continuous
delivery)
Continuous Delivery

Releasing frequently =>
Reduce the risk of release
(John Allspaw, Ops Meta-Metrics)
Continuous Delivery
• Standardize
– Naming conventions
– Platform
– Infrastructure

• Fully automated release processes to
Live-System
• Empower teams to release by
themselves
Continuous Delivery
•
•
•
•

Automate all the tests
Introduce ATDD/BDD patterns
Static code analysis
Automated quality gates
Continuous Delivery
Continuous Delivery
Continuous Delivery

Metrics
Monitoring

Alerting
Continuous Delivery

Metrics
Monitoring

Alerting
Continuous Delivery

Monitoring
Continuous Delivery

Monitoring
TABLE OF CONTENTS
•
•
•
•
•
•

Problem?
Solution!
Continuous Delivery
Infrastructure as Code
Chef and JBoss
Q&A
Infrastructure as Code
• Infrastructure is treated like code
– tag, branch and release
– testing

• Predictable outcome
• Removing manual steps
• Tools like Chef or Puppet
Infrastructure as Code
"Chef is like a little system admin
robot ... you tell it how you want your
system configured, and it will do all
the dirty work.”
Infrastructure as Code
Infrastructure as Code
Infrastructure as Code
Infrastructure as Code
Infrastructure as Code
TABLE OF CONTENTS
•
•
•
•
•
•

Problem?
Solution!
Continuous Delivery
Infrastructure as Code
Chef and JBoss
Q&A
Chef & JBoss
Java Magazin 11.12:
Automatisierung nach Chef-Rezept
Automatisiertes Deployment von
JBoss Middleware
AWSAktuell:
Elastic JBoss AS 7 clustering in
AWS using EC2, S3, ELB and Chef
Chef & JBoss
• Automatic deployment of JBoss AS using
Chef
• Components:
•
•
•
•
•

JBoss EAP 5/6 preconfigured in SVN
Jmxtrans for monitoring
DataSources managed in SVN
Stage is a system-property
Twiddle is used to apply node-specific
configurations
Chef & JBoss
Chef & JBoss
Chef & JBoss
EAP 5:

EAP 6:
Chef & JBoss
• Wrapper around twiddle.sh
• Parameters piped into a txt-file
• After server-start:
• Txt-file analyzed
• If file contains twiddle-commands
• Twiddle-commands executed
Chef & JBoss

Fabric
Chef & JBoss
• Fabric
– Python library and command-line tool
– Streamlining the use of SSH
– Application deployment
– Used to deploy apps from Nexus
– https://github.com/fabric/fabric
Lessons learned
•
•
•
•
•
•

Infrastructure as Code is hard
Continuous Delivery is hard
But: mindset change is even harder
Safety net is necessary
Continuous improvement
There is no „silver bullet“
Continuous Delivery and Infrastructure as Code

Continuous Delivery and Infrastructure as Code

Editor's Notes

  • #16 ATDD: Acceptance Test Driven DevelopmentBDD: BehaviorDriven Development
  • #19 ATDD: Acceptance Test Driven DevelopmentBDD: BehaviorDriven Development
  • #21 Bislang:nochkeinenharten Blocker beiVerletzung der definiertenKriterien in Sonar (coming soon)
  • #22 ATDD: Acceptance Test Driven DevelopmentBDD: BehaviorDriven Development
  • #23 SchwarzerStrich: Deployment
  • #24 ATDD: Acceptance Test Driven DevelopmentBDD: BehaviorDriven Development
  • #25 ATDD: Acceptance Test Driven DevelopmentBDD: BehaviorDriven Development
  • #31 AWS integration really goodAWS Opsworks is based on ChefAzure supportKnife Plugins fürandereAnbieterimplementierbar
  • #32 AWS integration really goodAWS Opsworks is based on Chef
  • #34 Vagrant für TestsIn der Vagrant-Configkönnen Cookbooks eingetragenwerden