Puppet Camp Melbourne Nov 2014 - A Build Engineering Team’s Journey of Infrastructure as Code

P
Peter LeschevSenior Team Lead - Build & Deploy Engineering at Atlassian
Puppet Camp Melbourne Nov 2014 - A Build Engineering Team’s Journey of Infrastructure as Code
Peter Leschev 
@peterleschev 
Husband, Father of 3 & Atlassian 
Build Engineering
A Build Engineering 
Team’s Journey of 
Infrastructure as Code 
Nov-2014
Build Engineering today @ 
Atlassian 
• Build platform & services used internally within the company 
• 90k builds per month 
• 43k automated tests just for JIRA 
• Developers expect a reliable infrastructure & fast CI feedback
Build Engineering today @ 
Atlassian 
• 1000 build agents (own hardware + EC2 instances) 
• include SCM clients, JDKs, JVM build tools, databases, headless 
browser testing, python builds, NodeJS, installers & more 
• Maintain 20 AMIs of various build configurations 
• 8 Bamboo Servers 
• maven.atlassian.com / 6 Nexus instances 
• Monitoring - opsview / graphite / statsd
Build Engineering today @ 
Atlassian
Infrastructure as Code 
= Puppet + SCM ?
4 years ago... 
• Manually maintained snowflakes 
• Started using puppet
Production rollout 
puppetmaster 
build agents
Production rollout failure 
puppetmaster 
build agents
Confidence of Change 
HIGH 
NONE 
Lifecycle of an infra change 
confidence 
Dev Rollout Soak in Prod
Puppet Camp Melbourne Nov 2014 - A Build Engineering Team’s Journey of Infrastructure as Code
atlassian.com/git
Style in Pull Requests
Puppet Lint https://github.com/rodjek/puppet-lint 
Tim Sharpe 
@rodjek 
• Automated style checking 
• Setup automated build that runs checks & posts results 
• Setup ratchet build to detect regressions
Confidence of Change 
HIGH 
NONE 
initial + Code review 
Lifecycle of an infra change 
confidence 
Dev Code review Rollout Soak in Prod
Using Staging for Development 
• Coding on Puppet Master 
• Culture of manually modifying 
production - Configuration Drift 
• Impact on Builds 
puppetmaster 
build agents 
staging puppet environment
Vagrant http://www.vagrantup.com/ 
Mitchell Hashimoto 
@mitchellh 
• Easily spin up Infrastructure locally on your laptop 
• Reproducible / disposable environments 
• Machine provisioning via Virtual Box / VMWare / AWS 
• Configuration applied via Shell Scripts / Puppet / Chef 
• Develop and test infrastructure changes locally
Vagrant 
Vagrantfile 
vagrant basebox 
http://www.vagrantup.com/ 
Mitchell Hashimoto 
@mitchellh
Vagrant 
Spins up a local VM to a known state 
Make some puppet changes and then run: 
Destroy the VM when done 
to apply your changes 
SSH into your VM using: 
to check your changes 
http://www.vagrantup.com/ 
Mitchell Hashimoto 
@mitchellh
Confidence of Change 
HIGH 
NONE 
initial + Code review + Vagrant 
Lifecycle of an infra change 
confidence 
Dev Code review Rollout Soak in Prod
Vagrant != Production 
• Vagrant basebox differences with production machines 
• Originally using publicly available vagrant baseboxes 
• Installed packages biggest differences 
• Generating a basebox manually was a painful process
Packer http://packer.io 
Mitchell Hashimoto 
@mitchellh 
Vagrant box 
for Virtualbox 
packer template 
JSON 
Vagrant box 
for AWS
Basebox generation via CI 
• Latest basebox generated in CI & published to fileshare 
• No need to generate baseboxes locally
Confidence in Change 
HIGH 
NONE 
initial + Code review + Vagrant + Packer 
Lifecycle of an infra change 
confidence 
Dev Code review Rollout Soak in Prod
Developing locally 
Rolling out to staging 
Rolling out to production 
Broken build agents!
Cucumber https://github.com/cucumber/aruba 
• Behaviour Driven Development
Cucumber & Vagrant 
Vagrant 
Custom Provisioner 
Virtual Box 
VM 
puppet apply 
cucumber *.features 
via ssh
Disadvantages 
• Requires cucumber dependencies to be installed on 
tested VM 
• Tests run within the VM making testing firewall rules 
harder
Confidence in Change 
HIGH 
NONE 
initial + Code review + Vagrant + Packer + Cukes 
Lifecycle of an infra change 
confidence 
Dev Code review Rollout Soak in Prod
But it works on my machine! 
“ – Every Developer”
Continuous Integration 
• ‘From scratch’ provisioning 
• Confidence that you can rebuild in disaster
The Pets: you give nice names, 
you stroke them, and when they get ill, 
you nurse them back to health, 
taking a long time over it 
The Cattle: you give them numbers. When 
they get ill, you shoot them 
– Tim Bell, CERN ” 
“
Confidence in Change 
HIGH 
NONE 
initial + Code review + Vagrant + Packer + Cukes + CI 
Lifecycle of an infra change 
confidence 
Dev Code review CI & Rollout Soak in Prod
Provisioning from scratch 
is slow
Spread out CI 
provision VM #1 
Moved from sequential 
to parallel provisioning 
provision VM #2 
provision VM #3 
provision VM #4 
provision VM #1 
provision VM #2 provision VM #3 
provision VM #4
There are so many 
MacPros you can steal
The ones 
I had my 
eye on....
Profiling Puppet Runs 
Add “--evaltrace” to puppet apply 
+ = 
Collect and show the 
longest occurrences of: 
“Evaluated in ([d.]+) seconds”
Profiling Cucumber runs 
http://itshouldbeuseful.wordpress.com/2010/11/10/find-your-slowest-running-cucumber-features/
Delta Provisioning 
• Provision locally & for CI 
• Faster & different class of problems found 
• Matches production state 
‘from scratch’ provision delta provision 
provision VM 
export VM fileshare 
import VM box 
provision VM 
on success
Confidence in Change 
HIGH 
NONE 
initial + Code review + Vagrant + Packer + Cukes + CI 
+ Delta CI 
Lifecycle of an infra change 
confidence 
Dev Code review CI & Rollout Soak in Prod
Broken builds 
master
Branch builds 
BUILDENG-5669 
master 
BUILDENG-5670
Confidence in Change 
HIGH 
NONE 
initial + Code review + Vagrant + Packer + Cukes 
+ CI + Delta CI + Branch CI 
Lifecycle of an infra change 
confidence 
Dev Branch CI Code review CI & Rollout Soak in Prod
Slow builds
Vagrant-AWS https://github.com/mitchellh/vagrant-aws
Vagrant-AWS https://github.com/mitchellh/vagrant-aws 
• MacPros no longer required 
• They were limited in supply & old 
• 2x speed improvement 
• Only limited by our credit card limit
Catalog Diff 
Step 1: Generate a hash of a node’s catalog 
puppet master --logdest console --compile HOSTNAME 
HOSTNAME.json 
- Sort elements 
- Remove timestamps 
- Generate shasum 
f50db91e6461f5bdcb56769a8f77da1fac26943d
Catalog Diff 
Step 2: Compare the hash of master versus your branch 
to avoid unnecessary provisioning 
Example 1: 
master branch 
f50db91e6461f5bdcb56769a8f77da1fac26943d = f50db91e6461f5bdcb56769a8f77da1fac26943d 
Hash is the same, no build required 
Example 2: 
master branch 
f50db91e6461f5bdcb56769a8f77da1fac26943d != 18033e4d21b78bab6deb3ae1ff3c147ade5a37ca 
Hash is different, build required
Catalog Diff 
Step 3: Profit! 
Reduction in 
feedback time 
+ 
$$$ saved 
Images: http://pixabay.com/p-30984/ https://www.flickr.com/photos/williamnyk/3598113750/
Puppet Camp Melbourne Nov 2014 - A Build Engineering Team’s Journey of Infrastructure as Code
Infrequent Releases
Painful Puppet Rollouts 
• Puppet runs impacted running builds 
• Disabling all the build agents 
• Performing the roll out 
• git clone / librarian-puppet / symlink update on puppetmaster 
• Manually kick off puppet on all the build agents 
• Enabling all the build agents 
• Set of Puppet environments for every bamboo server
Graceful Service restarts 
+ 
Bamboo Agent JVM process watches 
for touch file & shutdowns when Idle 
(written as a Bamboo Plugin)
Puppet Environments 
• BEFORE - Multiple puppet envs for each Bamboo Server 
• jbac_staging 
• jbac_production 
• cbac_staging 
• cbac_production 
• etc 
• AFTER - Changed to use ‘staging’ & ‘production’ only
Updates on Puppetmaster 
• BEFORE: Manually on puppetmaster 
• git clone the puppet tree 
• run librarian-puppet to pull external modules 
• Update staging / production symlink 
• AFTER: Bamboo build which performs the above steps 
automatically
Bot automation - ‘open prs’
Less Human interaction 
+ 
More automation 
= 
Higher Confidence
Less Human Effort 
= 
Increased frequency 
of releases
Confidence in Change 
HIGH 
NONE 
initial + Code review + Vagrant + Packer 
+ Cukes + CI + Delta CI + Branch CI 
+ Frequent Releases 
Lifecycle of an infra change 
confidence 
Dev Branch CI Code review CI & Rollout Soak in Prod
I’m scared! 
“– Peter Leschev, 3.5” years ago 
Should I be scared? 
“ – Peter Leschev, 3 months a”go
Hipchat integration
Confidence in Change 
HIGH 
NONE 
initial + Code review + Vagrant + Packer 
+ Cukes + CI + Delta CI + Branch CI 
+ Frequent Releases + Notification 
Lifecycle of an infra change 
confidence 
Dev Branch CI Code review CI & Rollout Soak in Prod
Confidence in Change 
HIGH 
NONE 
before after 
Lifecycle of an infra change 
confidence 
Dev Branch CI Code review CI & Rollout Soak in Prod
Confidence in Change 
or 
Finding & fixing 
problems sooner rather 
than later
Snowflakes 
Pets 
Cattle 
Stateless Machines
We’re still on the Journey 
Come join us! 
atlassian.com/jobs
one more thing…
Puppet Module for 
Sonatype Nexus 
• https://forge.puppetlabs.com/atlassian/nexus_rest 
• Configure Nexus using Custom Puppet Provider Types 
rather than XML files
Thank you!
Questions?
Puppet Camp Melbourne Nov 2014 - A Build Engineering Team’s Journey of Infrastructure as Code
1 of 73

Recommended

Atlassian Roadshow 2016 - DevOps Session by
Atlassian Roadshow 2016 - DevOps SessionAtlassian Roadshow 2016 - DevOps Session
Atlassian Roadshow 2016 - DevOps SessionSourcesense
3K views12 slides
Continuous integration by
Continuous integrationContinuous integration
Continuous integrationAndrey Zhupanenko
1.2K views17 slides
AWS DevOps Event - AWS Services enabling DevOps - Continuous Integration & Au... by
AWS DevOps Event - AWS Services enabling DevOps - Continuous Integration & Au...AWS DevOps Event - AWS Services enabling DevOps - Continuous Integration & Au...
AWS DevOps Event - AWS Services enabling DevOps - Continuous Integration & Au...Ian Massingham
1.9K views28 slides
Deploying systems using AWS DevOps tools by
Deploying systems using AWS DevOps toolsDeploying systems using AWS DevOps tools
Deploying systems using AWS DevOps toolsMassTLC
1.5K views39 slides
Docker, Continuous Integration, and You by
Docker, Continuous Integration, and YouDocker, Continuous Integration, and You
Docker, Continuous Integration, and YouAtlassian
2.6K views35 slides
10+ Deploys Per Day: Dev and Ops Cooperation at Flickr by
10+ Deploys Per Day: Dev and Ops Cooperation at Flickr10+ Deploys Per Day: Dev and Ops Cooperation at Flickr
10+ Deploys Per Day: Dev and Ops Cooperation at FlickrJohn Allspaw
1M views78 slides

More Related Content

What's hot

Spinnaker Microsrvices by
Spinnaker MicrosrvicesSpinnaker Microsrvices
Spinnaker MicrosrvicesAmbassador Labs
1.2K views21 slides
Release the Monkeys ! Testing in the Wild at Netflix by
Release the Monkeys !  Testing in the Wild at NetflixRelease the Monkeys !  Testing in the Wild at Netflix
Release the Monkeys ! Testing in the Wild at NetflixGareth Bowles
3.9K views40 slides
Mock Servers - Fake All the Things! by
Mock Servers - Fake All the Things!Mock Servers - Fake All the Things!
Mock Servers - Fake All the Things!Atlassian
20.3K views129 slides
Atlassian Connect on Serverless Platforms: Low Cost Add-Ons by
Atlassian Connect on Serverless Platforms: Low Cost Add-OnsAtlassian Connect on Serverless Platforms: Low Cost Add-Ons
Atlassian Connect on Serverless Platforms: Low Cost Add-OnsAtlassian
11.1K views66 slides
Is Serverless The New Swiss Cheese? - AWS Seattle User Group by
Is Serverless The New Swiss Cheese? - AWS Seattle User GroupIs Serverless The New Swiss Cheese? - AWS Seattle User Group
Is Serverless The New Swiss Cheese? - AWS Seattle User GroupChase Douglas
163 views88 slides
Chef Actions: Delightful near real-time activity tracking! by
Chef Actions: Delightful near real-time activity tracking!Chef Actions: Delightful near real-time activity tracking!
Chef Actions: Delightful near real-time activity tracking!James Casey
1.7K views29 slides

What's hot(20)

Release the Monkeys ! Testing in the Wild at Netflix by Gareth Bowles
Release the Monkeys !  Testing in the Wild at NetflixRelease the Monkeys !  Testing in the Wild at Netflix
Release the Monkeys ! Testing in the Wild at Netflix
Gareth Bowles3.9K views
Mock Servers - Fake All the Things! by Atlassian
Mock Servers - Fake All the Things!Mock Servers - Fake All the Things!
Mock Servers - Fake All the Things!
Atlassian20.3K views
Atlassian Connect on Serverless Platforms: Low Cost Add-Ons by Atlassian
Atlassian Connect on Serverless Platforms: Low Cost Add-OnsAtlassian Connect on Serverless Platforms: Low Cost Add-Ons
Atlassian Connect on Serverless Platforms: Low Cost Add-Ons
Atlassian11.1K views
Is Serverless The New Swiss Cheese? - AWS Seattle User Group by Chase Douglas
Is Serverless The New Swiss Cheese? - AWS Seattle User GroupIs Serverless The New Swiss Cheese? - AWS Seattle User Group
Is Serverless The New Swiss Cheese? - AWS Seattle User Group
Chase Douglas163 views
Chef Actions: Delightful near real-time activity tracking! by James Casey
Chef Actions: Delightful near real-time activity tracking!Chef Actions: Delightful near real-time activity tracking!
Chef Actions: Delightful near real-time activity tracking!
James Casey1.7K views
Build a JIRA Server Add-on as a Microservice - You Can Do It! by Atlassian
Build a JIRA Server Add-on as a Microservice - You Can Do It!Build a JIRA Server Add-on as a Microservice - You Can Do It!
Build a JIRA Server Add-on as a Microservice - You Can Do It!
Atlassian11.2K views
Ed Elliott - Practical DSC in Azure by WinOps Conf
Ed Elliott - Practical DSC in AzureEd Elliott - Practical DSC in Azure
Ed Elliott - Practical DSC in Azure
WinOps Conf550 views
Bringing Server Add-ons to the Cloud and Back Again by Atlassian
Bringing Server Add-ons to the Cloud and Back AgainBringing Server Add-ons to the Cloud and Back Again
Bringing Server Add-ons to the Cloud and Back Again
Atlassian10.7K views
Getting Started with Spring Boot by David Kiss
Getting Started with Spring BootGetting Started with Spring Boot
Getting Started with Spring Boot
David Kiss1.1K views
Software Delivery at Warp Speed: Five Essential Techniques by Atlassian
Software Delivery at Warp Speed: Five Essential TechniquesSoftware Delivery at Warp Speed: Five Essential Techniques
Software Delivery at Warp Speed: Five Essential Techniques
Atlassian14.8K views
Introduction to Infrastructure as Code & Automation / Introduction to Chef by All Things Open
Introduction to Infrastructure as Code & Automation / Introduction to ChefIntroduction to Infrastructure as Code & Automation / Introduction to Chef
Introduction to Infrastructure as Code & Automation / Introduction to Chef
All Things Open1.6K views
Continous integration and delivery for single page applications by Sunil Dalal
Continous integration and delivery for single page applicationsContinous integration and delivery for single page applications
Continous integration and delivery for single page applications
Sunil Dalal1.1K views
How Atlassian's Build Engineering Team Has Scaled to 150k Builds Per Month an... by Peter Leschev
How Atlassian's Build Engineering Team Has Scaled to 150k Builds Per Month an...How Atlassian's Build Engineering Team Has Scaled to 150k Builds Per Month an...
How Atlassian's Build Engineering Team Has Scaled to 150k Builds Per Month an...
Peter Leschev5.2K views
Day 3 - DevOps Culture - Continuous Integration & Continuous Deployment on th... by Amazon Web Services
Day 3 - DevOps Culture - Continuous Integration & Continuous Deployment on th...Day 3 - DevOps Culture - Continuous Integration & Continuous Deployment on th...
Day 3 - DevOps Culture - Continuous Integration & Continuous Deployment on th...
Amazon Web Services3.8K views
Serverless Delivery by Casey Lee
Serverless DeliveryServerless Delivery
Serverless Delivery
Casey Lee1.4K views
How to Build a Better JIRA Add-on by Atlassian
How to Build a Better JIRA Add-onHow to Build a Better JIRA Add-on
How to Build a Better JIRA Add-on
Atlassian17.8K views
WinOps Conf 2016 - Michael Greene - Release Pipelines by WinOps Conf
WinOps Conf 2016 - Michael Greene - Release PipelinesWinOps Conf 2016 - Michael Greene - Release Pipelines
WinOps Conf 2016 - Michael Greene - Release Pipelines
WinOps Conf1.2K views
Continuous Delivery using AWS CodePipeline, AWS Lambda & AWS ElasticBeanstalk by Thomas Shaw
Continuous Delivery using AWS CodePipeline, AWS Lambda & AWS ElasticBeanstalkContinuous Delivery using AWS CodePipeline, AWS Lambda & AWS ElasticBeanstalk
Continuous Delivery using AWS CodePipeline, AWS Lambda & AWS ElasticBeanstalk
Thomas Shaw1.7K views
Puppet Release Workflows at Jive Software by Puppet
Puppet Release Workflows at Jive SoftwarePuppet Release Workflows at Jive Software
Puppet Release Workflows at Jive Software
Puppet3.3K views

Viewers also liked

Turning Human Capital into High Performance Organizational Capital by
Turning Human Capital into High Performance Organizational CapitalTurning Human Capital into High Performance Organizational Capital
Turning Human Capital into High Performance Organizational CapitalJohn Willis
966 views87 slides
KANBAN FOR IT OPS (DRAGOS DUMITRIU) - LKCE13 by
KANBAN FOR IT OPS (DRAGOS DUMITRIU) - LKCE13KANBAN FOR IT OPS (DRAGOS DUMITRIU) - LKCE13
KANBAN FOR IT OPS (DRAGOS DUMITRIU) - LKCE13Lean Kanban Central Europe
1.6K views26 slides
Providing CI / CD as a Service - AWS Summit Sydney April 2015 by
Providing CI / CD as a Service - AWS Summit Sydney April 2015Providing CI / CD as a Service - AWS Summit Sydney April 2015
Providing CI / CD as a Service - AWS Summit Sydney April 2015Peter Leschev
4.1K views45 slides
All daydevops 2016 - Turning Human Capital into High Performance Organizati... by
All daydevops   2016 - Turning Human Capital into High Performance Organizati...All daydevops   2016 - Turning Human Capital into High Performance Organizati...
All daydevops 2016 - Turning Human Capital into High Performance Organizati...John Willis
1.5K views89 slides
Puppet Camp Sydney Feb 2014 - A Build Engineering Team’s Journey of Infrastru... by
Puppet Camp Sydney Feb 2014 - A Build Engineering Team’s Journey of Infrastru...Puppet Camp Sydney Feb 2014 - A Build Engineering Team’s Journey of Infrastru...
Puppet Camp Sydney Feb 2014 - A Build Engineering Team’s Journey of Infrastru...Peter Leschev
3.9K views64 slides
Infrastructure as Code Maturity Model v1 by
Infrastructure as Code Maturity Model v1Infrastructure as Code Maturity Model v1
Infrastructure as Code Maturity Model v1Gary Stafford
2.4K views29 slides

Viewers also liked(12)

Turning Human Capital into High Performance Organizational Capital by John Willis
Turning Human Capital into High Performance Organizational CapitalTurning Human Capital into High Performance Organizational Capital
Turning Human Capital into High Performance Organizational Capital
John Willis966 views
Providing CI / CD as a Service - AWS Summit Sydney April 2015 by Peter Leschev
Providing CI / CD as a Service - AWS Summit Sydney April 2015Providing CI / CD as a Service - AWS Summit Sydney April 2015
Providing CI / CD as a Service - AWS Summit Sydney April 2015
Peter Leschev4.1K views
All daydevops 2016 - Turning Human Capital into High Performance Organizati... by John Willis
All daydevops   2016 - Turning Human Capital into High Performance Organizati...All daydevops   2016 - Turning Human Capital into High Performance Organizati...
All daydevops 2016 - Turning Human Capital into High Performance Organizati...
John Willis1.5K views
Puppet Camp Sydney Feb 2014 - A Build Engineering Team’s Journey of Infrastru... by Peter Leschev
Puppet Camp Sydney Feb 2014 - A Build Engineering Team’s Journey of Infrastru...Puppet Camp Sydney Feb 2014 - A Build Engineering Team’s Journey of Infrastru...
Puppet Camp Sydney Feb 2014 - A Build Engineering Team’s Journey of Infrastru...
Peter Leschev3.9K views
Infrastructure as Code Maturity Model v1 by Gary Stafford
Infrastructure as Code Maturity Model v1Infrastructure as Code Maturity Model v1
Infrastructure as Code Maturity Model v1
Gary Stafford2.4K views
Deming to devops - Devops DC June 2015 by John Willis
Deming to devops   - Devops DC June 2015 Deming to devops   - Devops DC June 2015
Deming to devops - Devops DC June 2015
John Willis2.3K views
AWS re:Invent 2016: Chalk Talk: Succeeding at Infrastructure-as-Code (GPSCT312) by Amazon Web Services
AWS re:Invent 2016: Chalk Talk: Succeeding at Infrastructure-as-Code (GPSCT312)AWS re:Invent 2016: Chalk Talk: Succeeding at Infrastructure-as-Code (GPSCT312)
AWS re:Invent 2016: Chalk Talk: Succeeding at Infrastructure-as-Code (GPSCT312)
Amazon Web Services1.3K views
Dockerizing CS50: From Cluster to Cloud to Appliance to Container by David Ma... by Docker, Inc.
Dockerizing CS50: From Cluster to Cloud to Appliance to Container by David Ma...Dockerizing CS50: From Cluster to Cloud to Appliance to Container by David Ma...
Dockerizing CS50: From Cluster to Cloud to Appliance to Container by David Ma...
Docker, Inc.5.5K views
Immutable Awesomeness by John Willis and Josh Corman by Docker, Inc.
Immutable Awesomeness by John Willis and Josh CormanImmutable Awesomeness by John Willis and Josh Corman
Immutable Awesomeness by John Willis and Josh Corman
Docker, Inc.5.2K views
Infrastructure as code: running microservices on AWS using Docker, Terraform,... by Yevgeniy Brikman
Infrastructure as code: running microservices on AWS using Docker, Terraform,...Infrastructure as code: running microservices on AWS using Docker, Terraform,...
Infrastructure as code: running microservices on AWS using Docker, Terraform,...
Yevgeniy Brikman177.5K views

Similar to Puppet Camp Melbourne Nov 2014 - A Build Engineering Team’s Journey of Infrastructure as Code

How Atlassian's Build Engineering Team Has Scaled to 150k Builds Per Month an... by
How Atlassian's Build Engineering Team Has Scaled to 150k Builds Per Month an...How Atlassian's Build Engineering Team Has Scaled to 150k Builds Per Month an...
How Atlassian's Build Engineering Team Has Scaled to 150k Builds Per Month an...Peter Leschev
700 views101 slides
Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a... by
Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a...Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a...
Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a...Lean IT Consulting
72 views62 slides
Continuous Delivery, Continuous Integration by
Continuous Delivery, Continuous Integration Continuous Delivery, Continuous Integration
Continuous Delivery, Continuous Integration Amazon Web Services
3.6K views59 slides
Trusting the Unknown by
Trusting the UnknownTrusting the Unknown
Trusting the UnknownJesse Houwing
11 views43 slides
Trusting the Unknown by
Trusting the UnknownTrusting the Unknown
Trusting the Unknownssuser37f369
6 views43 slides
DCEU 18: Building Your Development Pipeline by
DCEU 18: Building Your Development PipelineDCEU 18: Building Your Development Pipeline
DCEU 18: Building Your Development PipelineDocker, Inc.
1.6K views57 slides

Similar to Puppet Camp Melbourne Nov 2014 - A Build Engineering Team’s Journey of Infrastructure as Code(20)

How Atlassian's Build Engineering Team Has Scaled to 150k Builds Per Month an... by Peter Leschev
How Atlassian's Build Engineering Team Has Scaled to 150k Builds Per Month an...How Atlassian's Build Engineering Team Has Scaled to 150k Builds Per Month an...
How Atlassian's Build Engineering Team Has Scaled to 150k Builds Per Month an...
Peter Leschev700 views
Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a... by Lean IT Consulting
Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a...Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a...
Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a...
Continuous Delivery, Continuous Integration by Amazon Web Services
Continuous Delivery, Continuous Integration Continuous Delivery, Continuous Integration
Continuous Delivery, Continuous Integration
Amazon Web Services3.6K views
DCEU 18: Building Your Development Pipeline by Docker, Inc.
DCEU 18: Building Your Development PipelineDCEU 18: Building Your Development Pipeline
DCEU 18: Building Your Development Pipeline
Docker, Inc.1.6K views
Docker and Puppet for Continuous Integration by Giacomo Vacca
Docker and Puppet for Continuous IntegrationDocker and Puppet for Continuous Integration
Docker and Puppet for Continuous Integration
Giacomo Vacca5.8K views
(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre... by Amazon Web Services
(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...
(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...
Steamlining your puppet development workflow by Tomas Doran
Steamlining your puppet development workflowSteamlining your puppet development workflow
Steamlining your puppet development workflow
Tomas Doran4.5K views
Puppet Camp New York 2014: Streamlining Puppet Development Workflow by Puppet
Puppet Camp New York 2014: Streamlining Puppet Development Workflow Puppet Camp New York 2014: Streamlining Puppet Development Workflow
Puppet Camp New York 2014: Streamlining Puppet Development Workflow
Puppet1.9K views
Developing in the Cloud by Ryan Cuprak
Developing in the CloudDeveloping in the Cloud
Developing in the Cloud
Ryan Cuprak1.1K views
Containerising bootiful microservices javaeeconf by Ivan Vasyliev
Containerising bootiful microservices javaeeconfContainerising bootiful microservices javaeeconf
Containerising bootiful microservices javaeeconf
Ivan Vasyliev363 views
Cloud-Native Builds & Deployments in Bitbucket Pipelines by Atlassian
Cloud-Native Builds & Deployments in Bitbucket PipelinesCloud-Native Builds & Deployments in Bitbucket Pipelines
Cloud-Native Builds & Deployments in Bitbucket Pipelines
Atlassian9.4K views
Continous Delivering a PHP application by Javier López
Continous Delivering a PHP applicationContinous Delivering a PHP application
Continous Delivering a PHP application
Javier López2.6K views
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools by Amazon Web Services
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer ToolsDevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
Amazon Web Services1.1K views
InSpec at DevOps ATL Meetup January 22, 2020 by Mandi Walls
InSpec at DevOps ATL Meetup January 22, 2020InSpec at DevOps ATL Meetup January 22, 2020
InSpec at DevOps ATL Meetup January 22, 2020
Mandi Walls214 views
Practical Cloud & Workflow Orchestration by Chris Dagdigian
Practical Cloud & Workflow OrchestrationPractical Cloud & Workflow Orchestration
Practical Cloud & Workflow Orchestration
Chris Dagdigian28K views
Creating Scalable JVM/Java Apps on Heroku by Joe Kutner
Creating Scalable JVM/Java Apps on HerokuCreating Scalable JVM/Java Apps on Heroku
Creating Scalable JVM/Java Apps on Heroku
Joe Kutner1.2K views
Continuous Delivery the hard way with Kubernetes by Luke Marsden
Continuous Delivery the hard way with KubernetesContinuous Delivery the hard way with Kubernetes
Continuous Delivery the hard way with Kubernetes
Luke Marsden3.8K views
Continuous Delivery the Hard Way with Kubernetes by Weaveworks
Continuous Delivery the Hard Way with Kubernetes Continuous Delivery the Hard Way with Kubernetes
Continuous Delivery the Hard Way with Kubernetes
Weaveworks912 views

Recently uploaded

SAP Automation Using Bar Code and FIORI.pdf by
SAP Automation Using Bar Code and FIORI.pdfSAP Automation Using Bar Code and FIORI.pdf
SAP Automation Using Bar Code and FIORI.pdfVirendra Rai, PMP
23 views38 slides
Business Analyst Series 2023 - Week 3 Session 5 by
Business Analyst Series 2023 -  Week 3 Session 5Business Analyst Series 2023 -  Week 3 Session 5
Business Analyst Series 2023 - Week 3 Session 5DianaGray10
248 views20 slides
Vertical User Stories by
Vertical User StoriesVertical User Stories
Vertical User StoriesMoisés Armani Ramírez
14 views16 slides
Uni Systems for Power Platform.pptx by
Uni Systems for Power Platform.pptxUni Systems for Power Platform.pptx
Uni Systems for Power Platform.pptxUni Systems S.M.S.A.
56 views21 slides
ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ... by
ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ...ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ...
ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ...Jasper Oosterveld
18 views49 slides
Democratising digital commerce in India-Report by
Democratising digital commerce in India-ReportDemocratising digital commerce in India-Report
Democratising digital commerce in India-ReportKapil Khandelwal (KK)
15 views161 slides

Recently uploaded(20)

SAP Automation Using Bar Code and FIORI.pdf by Virendra Rai, PMP
SAP Automation Using Bar Code and FIORI.pdfSAP Automation Using Bar Code and FIORI.pdf
SAP Automation Using Bar Code and FIORI.pdf
Business Analyst Series 2023 - Week 3 Session 5 by DianaGray10
Business Analyst Series 2023 -  Week 3 Session 5Business Analyst Series 2023 -  Week 3 Session 5
Business Analyst Series 2023 - Week 3 Session 5
DianaGray10248 views
ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ... by Jasper Oosterveld
ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ...ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ...
ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ...
The details of description: Techniques, tips, and tangents on alternative tex... by BookNet Canada
The details of description: Techniques, tips, and tangents on alternative tex...The details of description: Techniques, tips, and tangents on alternative tex...
The details of description: Techniques, tips, and tangents on alternative tex...
BookNet Canada127 views
Serverless computing with Google Cloud (2023-24) by wesley chun
Serverless computing with Google Cloud (2023-24)Serverless computing with Google Cloud (2023-24)
Serverless computing with Google Cloud (2023-24)
wesley chun11 views
Case Study Copenhagen Energy and Business Central.pdf by Aitana
Case Study Copenhagen Energy and Business Central.pdfCase Study Copenhagen Energy and Business Central.pdf
Case Study Copenhagen Energy and Business Central.pdf
Aitana16 views
Data Integrity for Banking and Financial Services by Precisely
Data Integrity for Banking and Financial ServicesData Integrity for Banking and Financial Services
Data Integrity for Banking and Financial Services
Precisely21 views
Piloting & Scaling Successfully With Microsoft Viva by Richard Harbridge
Piloting & Scaling Successfully With Microsoft VivaPiloting & Scaling Successfully With Microsoft Viva
Piloting & Scaling Successfully With Microsoft Viva
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas... by Bernd Ruecker
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...
Bernd Ruecker37 views

Puppet Camp Melbourne Nov 2014 - A Build Engineering Team’s Journey of Infrastructure as Code

  • 2. Peter Leschev @peterleschev Husband, Father of 3 & Atlassian Build Engineering
  • 3. A Build Engineering Team’s Journey of Infrastructure as Code Nov-2014
  • 4. Build Engineering today @ Atlassian • Build platform & services used internally within the company • 90k builds per month • 43k automated tests just for JIRA • Developers expect a reliable infrastructure & fast CI feedback
  • 5. Build Engineering today @ Atlassian • 1000 build agents (own hardware + EC2 instances) • include SCM clients, JDKs, JVM build tools, databases, headless browser testing, python builds, NodeJS, installers & more • Maintain 20 AMIs of various build configurations • 8 Bamboo Servers • maven.atlassian.com / 6 Nexus instances • Monitoring - opsview / graphite / statsd
  • 7. Infrastructure as Code = Puppet + SCM ?
  • 8. 4 years ago... • Manually maintained snowflakes • Started using puppet
  • 10. Production rollout failure puppetmaster build agents
  • 11. Confidence of Change HIGH NONE Lifecycle of an infra change confidence Dev Rollout Soak in Prod
  • 14. Style in Pull Requests
  • 15. Puppet Lint https://github.com/rodjek/puppet-lint Tim Sharpe @rodjek • Automated style checking • Setup automated build that runs checks & posts results • Setup ratchet build to detect regressions
  • 16. Confidence of Change HIGH NONE initial + Code review Lifecycle of an infra change confidence Dev Code review Rollout Soak in Prod
  • 17. Using Staging for Development • Coding on Puppet Master • Culture of manually modifying production - Configuration Drift • Impact on Builds puppetmaster build agents staging puppet environment
  • 18. Vagrant http://www.vagrantup.com/ Mitchell Hashimoto @mitchellh • Easily spin up Infrastructure locally on your laptop • Reproducible / disposable environments • Machine provisioning via Virtual Box / VMWare / AWS • Configuration applied via Shell Scripts / Puppet / Chef • Develop and test infrastructure changes locally
  • 19. Vagrant Vagrantfile vagrant basebox http://www.vagrantup.com/ Mitchell Hashimoto @mitchellh
  • 20. Vagrant Spins up a local VM to a known state Make some puppet changes and then run: Destroy the VM when done to apply your changes SSH into your VM using: to check your changes http://www.vagrantup.com/ Mitchell Hashimoto @mitchellh
  • 21. Confidence of Change HIGH NONE initial + Code review + Vagrant Lifecycle of an infra change confidence Dev Code review Rollout Soak in Prod
  • 22. Vagrant != Production • Vagrant basebox differences with production machines • Originally using publicly available vagrant baseboxes • Installed packages biggest differences • Generating a basebox manually was a painful process
  • 23. Packer http://packer.io Mitchell Hashimoto @mitchellh Vagrant box for Virtualbox packer template JSON Vagrant box for AWS
  • 24. Basebox generation via CI • Latest basebox generated in CI & published to fileshare • No need to generate baseboxes locally
  • 25. Confidence in Change HIGH NONE initial + Code review + Vagrant + Packer Lifecycle of an infra change confidence Dev Code review Rollout Soak in Prod
  • 26. Developing locally Rolling out to staging Rolling out to production Broken build agents!
  • 27. Cucumber https://github.com/cucumber/aruba • Behaviour Driven Development
  • 28. Cucumber & Vagrant Vagrant Custom Provisioner Virtual Box VM puppet apply cucumber *.features via ssh
  • 29. Disadvantages • Requires cucumber dependencies to be installed on tested VM • Tests run within the VM making testing firewall rules harder
  • 30. Confidence in Change HIGH NONE initial + Code review + Vagrant + Packer + Cukes Lifecycle of an infra change confidence Dev Code review Rollout Soak in Prod
  • 31. But it works on my machine! “ – Every Developer”
  • 32. Continuous Integration • ‘From scratch’ provisioning • Confidence that you can rebuild in disaster
  • 33. The Pets: you give nice names, you stroke them, and when they get ill, you nurse them back to health, taking a long time over it The Cattle: you give them numbers. When they get ill, you shoot them – Tim Bell, CERN ” “
  • 34. Confidence in Change HIGH NONE initial + Code review + Vagrant + Packer + Cukes + CI Lifecycle of an infra change confidence Dev Code review CI & Rollout Soak in Prod
  • 36. Spread out CI provision VM #1 Moved from sequential to parallel provisioning provision VM #2 provision VM #3 provision VM #4 provision VM #1 provision VM #2 provision VM #3 provision VM #4
  • 37. There are so many MacPros you can steal
  • 38. The ones I had my eye on....
  • 39. Profiling Puppet Runs Add “--evaltrace” to puppet apply + = Collect and show the longest occurrences of: “Evaluated in ([d.]+) seconds”
  • 40. Profiling Cucumber runs http://itshouldbeuseful.wordpress.com/2010/11/10/find-your-slowest-running-cucumber-features/
  • 41. Delta Provisioning • Provision locally & for CI • Faster & different class of problems found • Matches production state ‘from scratch’ provision delta provision provision VM export VM fileshare import VM box provision VM on success
  • 42. Confidence in Change HIGH NONE initial + Code review + Vagrant + Packer + Cukes + CI + Delta CI Lifecycle of an infra change confidence Dev Code review CI & Rollout Soak in Prod
  • 44. Branch builds BUILDENG-5669 master BUILDENG-5670
  • 45. Confidence in Change HIGH NONE initial + Code review + Vagrant + Packer + Cukes + CI + Delta CI + Branch CI Lifecycle of an infra change confidence Dev Branch CI Code review CI & Rollout Soak in Prod
  • 48. Vagrant-AWS https://github.com/mitchellh/vagrant-aws • MacPros no longer required • They were limited in supply & old • 2x speed improvement • Only limited by our credit card limit
  • 49. Catalog Diff Step 1: Generate a hash of a node’s catalog puppet master --logdest console --compile HOSTNAME HOSTNAME.json - Sort elements - Remove timestamps - Generate shasum f50db91e6461f5bdcb56769a8f77da1fac26943d
  • 50. Catalog Diff Step 2: Compare the hash of master versus your branch to avoid unnecessary provisioning Example 1: master branch f50db91e6461f5bdcb56769a8f77da1fac26943d = f50db91e6461f5bdcb56769a8f77da1fac26943d Hash is the same, no build required Example 2: master branch f50db91e6461f5bdcb56769a8f77da1fac26943d != 18033e4d21b78bab6deb3ae1ff3c147ade5a37ca Hash is different, build required
  • 51. Catalog Diff Step 3: Profit! Reduction in feedback time + $$$ saved Images: http://pixabay.com/p-30984/ https://www.flickr.com/photos/williamnyk/3598113750/
  • 54. Painful Puppet Rollouts • Puppet runs impacted running builds • Disabling all the build agents • Performing the roll out • git clone / librarian-puppet / symlink update on puppetmaster • Manually kick off puppet on all the build agents • Enabling all the build agents • Set of Puppet environments for every bamboo server
  • 55. Graceful Service restarts + Bamboo Agent JVM process watches for touch file & shutdowns when Idle (written as a Bamboo Plugin)
  • 56. Puppet Environments • BEFORE - Multiple puppet envs for each Bamboo Server • jbac_staging • jbac_production • cbac_staging • cbac_production • etc • AFTER - Changed to use ‘staging’ & ‘production’ only
  • 57. Updates on Puppetmaster • BEFORE: Manually on puppetmaster • git clone the puppet tree • run librarian-puppet to pull external modules • Update staging / production symlink • AFTER: Bamboo build which performs the above steps automatically
  • 58. Bot automation - ‘open prs’
  • 59. Less Human interaction + More automation = Higher Confidence
  • 60. Less Human Effort = Increased frequency of releases
  • 61. Confidence in Change HIGH NONE initial + Code review + Vagrant + Packer + Cukes + CI + Delta CI + Branch CI + Frequent Releases Lifecycle of an infra change confidence Dev Branch CI Code review CI & Rollout Soak in Prod
  • 62. I’m scared! “– Peter Leschev, 3.5” years ago Should I be scared? “ – Peter Leschev, 3 months a”go
  • 64. Confidence in Change HIGH NONE initial + Code review + Vagrant + Packer + Cukes + CI + Delta CI + Branch CI + Frequent Releases + Notification Lifecycle of an infra change confidence Dev Branch CI Code review CI & Rollout Soak in Prod
  • 65. Confidence in Change HIGH NONE before after Lifecycle of an infra change confidence Dev Branch CI Code review CI & Rollout Soak in Prod
  • 66. Confidence in Change or Finding & fixing problems sooner rather than later
  • 67. Snowflakes Pets Cattle Stateless Machines
  • 68. We’re still on the Journey Come join us! atlassian.com/jobs
  • 70. Puppet Module for Sonatype Nexus • https://forge.puppetlabs.com/atlassian/nexus_rest • Configure Nexus using Custom Puppet Provider Types rather than XML files