SlideShare a Scribd company logo
1 of 25
Download to read offline
Implementing DevOps Automation
Best Practices and Common Mistakes
Given by Derek C. Ashmore
Agile+DevOps East 2023
November 8, 2023
©2023 Derek C. Ashmore, All Rights Reserved 1
Who am I?
• Professional Geek
since 1987
• AWS since 2010
• Azure since 2017
• Specialties
• Application
Transformation
• Infrastructure
Automation
• Yes – I still code!
©2023 Derek C. Ashmore, All Rights Reserved 2
Discussion Resources
• This slide deck
– https://www.slideshare.net/derekashmore/presentations
• Slide deck has hyper-links!
– Don’t bother writing down URLs
• I take questions
– For those online, contact me on LinkedIn
©2023 Derek C. Ashmore, All Rights Reserved 3
Agenda
Intro and
Level Set
DevOps Best
Practices
DevOps
Management
Summary /
Q&A
©2023 Derek C. Ashmore, All Rights Reserved 4
DevOps Managed Infrastructure
• 99+% Infrastructure as Code (IaC)
• Manual changes
– Increase errors
– Increase unwanted differences between
environments
– Increase admin workload
• Scripted/Coded changes
– Larger upfront cost, but…..
– Less busywork
– Leverage Others Work
– Decreases Errors
– Errors fixed in one place
– Eliminates unwanted differences
– Change history (with source control)
©2023 Derek C. Ashmore, All Rights Reserved 5
Tales from the Field
• Large Consumer Product Firm
– Rebuilds entire cloud footprint every
two weeks
• Large Fast-food Franchise
– Easy to add new business unit spokes
– Security / Guardrails built in
– Internet ingress/egress
– On premises network connectivity
• Large Financial Institution
– Mobile App Cloud and application
footprint
• blue/green capability
©2023 Derek C. Ashmore, All Rights Reserved
DevOps Automation Categories
➢Network / non-application specific infrastructure
▪ Virtual Networks/VPCs and subnets
▪ Route tables, Network peering
▪ Security groups / NSGs
➢Application infrastructure
▪ Relational databases
▪ Serverless constructs
➢Security privileges and policies
▪ IAM Roles and privilege grants
➢Virtual machine image production
▪ Produce machine images for teams to use
▪ Docker image production is similar conceptually
©2023 Derek C. Ashmore, All Rights Reserved 7
Agenda
Intro and
Level Set
DevOps Best
Practices
DevOps
Management
Summary /
Q&A
©2023 Derek C. Ashmore, All Rights Reserved 8
Discipline is Key
➢Discipline required differs per maturity level
➢Source Code Management
➢Source Code Structure
➢Deployment Management (CI/CD Pipelines)
➢Avoid Manual Changes
➢Testing Strategy
©2023 Derek C. Ashmore, All Rights Reserved 9
Automation Usage Evolution
• In the beginning
– Use Source Control
• As #Coders grow
– Feature branches
– CI/CD Pipelines
• As #Configurations grow
– Separate repo for modules
– Implement versioning
• Never use main/master!
• Further reading
©2023 Derek C. Ashmore, All Rights Reserved
Feature Branching
• DevOps Team Discipline is Key
• Feature Branches
– Never edit main/master directly!
– Update using Pull Requests
• Should live less than one day!
– Single targeted enhancement
– One developer only
– Long-lived branches prone to
merge conflicts
– Squash commits on merge
• Further reading
©2023 Derek C. Ashmore, All Rights Reserved
Code in Reusable Modules
➢Advantages are
▪ Small blast radius
▪ More easily tested
▪ Economies of scale
➢Example reusable modules
▪ Kubernetes Cluster
▪ Virtual Machine
▪ Virtual Networks and Subnets
▪ S3/Storage accounts
▪ Serverless services/functions
➢100+ Modules in all
▪ Used in 400+ pipelines
➢Tested in merge to master
©2023 Derek C. Ashmore, All Rights Reserved 12
CI/CD Pipelines
• Provides consistent runtime
environment
– Software version
– Cloud security policy
• Audit history / Admin security
• Pipeline approvals
– Force Plan/Dry-Run execution
– Force manual approval before
changing the environment
©2023 Derek C. Ashmore, All Rights Reserved
Manual Intervention Requirements
➢Some companies require manual intervention
▪ Often dictated by company policy
▪ Examples include
▪ Requiring DNS entries to be manually entered
▪ Separate group allocates security privileges
▪ On-premises connectivity
➢IaC depending on manual intervention cannot have automated tests
▪ Localize the manual intervention requirements
©2023 Derek C. Ashmore, All Rights Reserved 14
Accommodating Manual Processes
©2023 Derek C. Ashmore, All Rights Reserved 15
Infrastructure Code Testing
➢IaC is code!
▪ Housed in source control
▪ Often changed and released
▪ Needs testing like any other code
➢IaC change can have negative impact
▪ Environment outages
▪ End-user internet connectivity outage
▪ Application outages
▪ Testing team delayed for four days
➢Testing IaC can minimize negative impact
©2023 Derek C. Ashmore, All Rights Reserved 16
Infrastructure Code Testing Differences
➢IaC != Application Code
▪ IaC requires external resources (e.g. Cloud) to run
▪ In-process unit testing often not possible
➢Limited localized (in-process) testing
▪ Generally limited to syntax checks
▪ Terraform validation
▪ Ansible Dry Runs
▪ IDE syntax checks
➢Most testing is “integration” testing
©2023 Derek C. Ashmore, All Rights Reserved 17
Infrastructure Code Testing Challenges
➢Friction
▪ Harder to write/maintain
➢Dependencies
▪ Managed by other teams
➢Testing costs
▪ Use Sandbox – tear-down after tests
➢Manual intervention requirements
▪ Not possible to automate tests
©2023 Derek C. Ashmore, All Rights Reserved 18
Lack of Discipline Causes…
➢Unplanned Work
▪ Change due to automatic upgrades
▪ Unintended consequences
➢Accidental over-writing changes of others
▪ Merge conflicts
▪ Changes deployed from unmerged branches
➢Increased defect rate
➢Configuration Drift caused by manual change
©2023 Derek C. Ashmore, All Rights Reserved 19
Frequent Mistakes in the Field…
➢Lack of testing for common IaC code
▪ Testing for one use of common code is not sufficient!
▪ Often breaks other consumers of the common code
➢Creating a blast radius for IaC that’s too large
▪ Can’t make targeted changes without unintended consequences
➢Treating common IaC code as an enforcement mechanism
▪ Decouple policy enforcement and naming conventions
▪ Common IaC is a productivity enhancer only
©2023 Derek C. Ashmore, All Rights Reserved 20
Agenda
Intro and
Level Set
DevOps Best
Practices
DevOps
Management
Summary /
Q&A
©2023 Derek C. Ashmore, All Rights Reserved 21
Management is different too!
• Instead of
– Manual reviews/approvals
• Automate guardrails
• Automate testing
• Whitelist cloud services
• Consider continuous
delivery/deployment
– Capacity planning up front
• Monitor cost increases and
investigate
– Mandating policy changes by
edict
• Automate policy enforcement
©2023 Derek C. Ashmore, All Rights Reserved
Things that Don’t work
• Adding Manual
Approvals/Reviews
– Kills velocity and productivity
– Stops innovation
– Creates bottlenecks
• Forcing manual procedures
– Attempt to “expedite”
– Creates technical debt
©2023 Derek C. Ashmore, All Rights Reserved
Things that Work!
• Declare War on manual approvals
– Favor automated guardrails
– Automate oversight
• Decentralize Cloud Management
– Let app teams manage app infrastructure
• Don’t be a bottleneck
– Leave App teams to innovate
• Create a Service Catalog
– Automate whitelisting of services
– Create reasonable process for new services
• Legal reviews (HIPPA, GDPR, etc.)
• Fund automation
– You won’t make it manually!
• DevOps Team Discipline
– Automation needs SDLC just like applications
– Source management is key
©2023 Derek C. Ashmore, All Rights Reserved
Thank you!
• Derek Ashmore:
– Blog: www.derekashmore.com
– LinkedIn: www.linkedin.com/in/derekashmore
• Connect Invites from attendees welcome
– Twitter: https://twitter.com/Derek_Ashmore
– GitHub: https://github.com/Derek-Ashmore
– Book: http://dvtpress.com/
• Please fill out the evaluation form!
©2023 Derek C. Ashmore, All Rights Reserved 25

More Related Content

Similar to Implementing DevOps Automation Best Practices and Common Mistakes

Writing microservices in java java one-2015-10-28
Writing microservices in java java one-2015-10-28Writing microservices in java java one-2015-10-28
Writing microservices in java java one-2015-10-28Derek Ashmore
 
Refactoring Into Microservices. Chicago Coders Conference 2017-06-26
Refactoring Into Microservices. Chicago Coders Conference 2017-06-26Refactoring Into Microservices. Chicago Coders Conference 2017-06-26
Refactoring Into Microservices. Chicago Coders Conference 2017-06-26Derek Ashmore
 
Microservices for Java Architects (Indianapolis, April 15, 2015)
Microservices for Java Architects (Indianapolis, April 15, 2015)Microservices for Java Architects (Indianapolis, April 15, 2015)
Microservices for Java Architects (Indianapolis, April 15, 2015)Derek Ashmore
 
Microservices for java architects coders-conf-2015-05-15
Microservices for java architects coders-conf-2015-05-15Microservices for java architects coders-conf-2015-05-15
Microservices for java architects coders-conf-2015-05-15Derek Ashmore
 
Secure DevOps Workflow at Dell with Enterprise Application Access (EAA)
Secure DevOps Workflow at Dell with Enterprise Application Access (EAA)Secure DevOps Workflow at Dell with Enterprise Application Access (EAA)
Secure DevOps Workflow at Dell with Enterprise Application Access (EAA)Akamai Developers & Admins
 
Application Deployment Patterns in the Cloud - NOVA Cloud and Software Engine...
Application Deployment Patterns in the Cloud - NOVA Cloud and Software Engine...Application Deployment Patterns in the Cloud - NOVA Cloud and Software Engine...
Application Deployment Patterns in the Cloud - NOVA Cloud and Software Engine...Derek Ashmore
 
Microservices with Terraform, Docker and the Cloud. DevOps Wet 2018
Microservices with Terraform, Docker and the Cloud. DevOps Wet 2018Microservices with Terraform, Docker and the Cloud. DevOps Wet 2018
Microservices with Terraform, Docker and the Cloud. DevOps Wet 2018Derek Ashmore
 
Microservices for Java Architects (Madison-Milwaukee, April 28-9, 2015)
Microservices for Java Architects (Madison-Milwaukee, April 28-9, 2015)Microservices for Java Architects (Madison-Milwaukee, April 28-9, 2015)
Microservices for Java Architects (Madison-Milwaukee, April 28-9, 2015)Derek Ashmore
 
Microservices for Java Architects (Chicago, April 21, 2015)
Microservices for Java Architects (Chicago, April 21, 2015)Microservices for Java Architects (Chicago, April 21, 2015)
Microservices for Java Architects (Chicago, April 21, 2015)Derek Ashmore
 
DevOps / Agile Tools Seminar 2013
DevOps / Agile Tools Seminar 2013DevOps / Agile Tools Seminar 2013
DevOps / Agile Tools Seminar 2013Ethan Ram
 
Platform Engineering for the Modern Oracle World
Platform Engineering for the Modern Oracle WorldPlatform Engineering for the Modern Oracle World
Platform Engineering for the Modern Oracle WorldSimon Haslam
 
Microservices for Architects - Atlanta 2018-03-28
Microservices for Architects - Atlanta 2018-03-28Microservices for Architects - Atlanta 2018-03-28
Microservices for Architects - Atlanta 2018-03-28Derek Ashmore
 
Microservices for java architects schamburg-2015-05-19
Microservices for java architects schamburg-2015-05-19Microservices for java architects schamburg-2015-05-19
Microservices for java architects schamburg-2015-05-19Derek Ashmore
 
Fundamentals of computer systems
Fundamentals of computer systemsFundamentals of computer systems
Fundamentals of computer systemsSajitha Pathirana
 
7 Secrets to Becoming a Citrix Hero
7 Secrets to Becoming a Citrix Hero7 Secrets to Becoming a Citrix Hero
7 Secrets to Becoming a Citrix HeroeG Innovations
 
Untangling DevOps - A high-level overview and how we got here
Untangling DevOps -  A high-level overview and how we got hereUntangling DevOps -  A high-level overview and how we got here
Untangling DevOps - A high-level overview and how we got hereBarton George
 
Experience in teaching devops
Experience in teaching devopsExperience in teaching devops
Experience in teaching devopsLen Bass
 
Twelve Factor - Designing for Change
Twelve Factor - Designing for ChangeTwelve Factor - Designing for Change
Twelve Factor - Designing for ChangeEric Wyles
 
Continuous Delivery: Rapid and Reliable Releases with DevOps Practices
Continuous Delivery: Rapid and Reliable Releases with DevOps PracticesContinuous Delivery: Rapid and Reliable Releases with DevOps Practices
Continuous Delivery: Rapid and Reliable Releases with DevOps PracticesTechWell
 

Similar to Implementing DevOps Automation Best Practices and Common Mistakes (20)

Writing microservices in java java one-2015-10-28
Writing microservices in java java one-2015-10-28Writing microservices in java java one-2015-10-28
Writing microservices in java java one-2015-10-28
 
Refactoring Into Microservices. Chicago Coders Conference 2017-06-26
Refactoring Into Microservices. Chicago Coders Conference 2017-06-26Refactoring Into Microservices. Chicago Coders Conference 2017-06-26
Refactoring Into Microservices. Chicago Coders Conference 2017-06-26
 
Microservices for Java Architects (Indianapolis, April 15, 2015)
Microservices for Java Architects (Indianapolis, April 15, 2015)Microservices for Java Architects (Indianapolis, April 15, 2015)
Microservices for Java Architects (Indianapolis, April 15, 2015)
 
Microservices for java architects coders-conf-2015-05-15
Microservices for java architects coders-conf-2015-05-15Microservices for java architects coders-conf-2015-05-15
Microservices for java architects coders-conf-2015-05-15
 
Secure DevOps Workflow at Dell with Enterprise Application Access (EAA)
Secure DevOps Workflow at Dell with Enterprise Application Access (EAA)Secure DevOps Workflow at Dell with Enterprise Application Access (EAA)
Secure DevOps Workflow at Dell with Enterprise Application Access (EAA)
 
Application Deployment Patterns in the Cloud - NOVA Cloud and Software Engine...
Application Deployment Patterns in the Cloud - NOVA Cloud and Software Engine...Application Deployment Patterns in the Cloud - NOVA Cloud and Software Engine...
Application Deployment Patterns in the Cloud - NOVA Cloud and Software Engine...
 
Microservices with Terraform, Docker and the Cloud. DevOps Wet 2018
Microservices with Terraform, Docker and the Cloud. DevOps Wet 2018Microservices with Terraform, Docker and the Cloud. DevOps Wet 2018
Microservices with Terraform, Docker and the Cloud. DevOps Wet 2018
 
Microservices for Java Architects (Madison-Milwaukee, April 28-9, 2015)
Microservices for Java Architects (Madison-Milwaukee, April 28-9, 2015)Microservices for Java Architects (Madison-Milwaukee, April 28-9, 2015)
Microservices for Java Architects (Madison-Milwaukee, April 28-9, 2015)
 
Microservices for Java Architects (Chicago, April 21, 2015)
Microservices for Java Architects (Chicago, April 21, 2015)Microservices for Java Architects (Chicago, April 21, 2015)
Microservices for Java Architects (Chicago, April 21, 2015)
 
DevOps / Agile Tools Seminar 2013
DevOps / Agile Tools Seminar 2013DevOps / Agile Tools Seminar 2013
DevOps / Agile Tools Seminar 2013
 
Platform Engineering for the Modern Oracle World
Platform Engineering for the Modern Oracle WorldPlatform Engineering for the Modern Oracle World
Platform Engineering for the Modern Oracle World
 
Microservices for Architects - Atlanta 2018-03-28
Microservices for Architects - Atlanta 2018-03-28Microservices for Architects - Atlanta 2018-03-28
Microservices for Architects - Atlanta 2018-03-28
 
Microservices for java architects schamburg-2015-05-19
Microservices for java architects schamburg-2015-05-19Microservices for java architects schamburg-2015-05-19
Microservices for java architects schamburg-2015-05-19
 
Fundamentals of computer systems
Fundamentals of computer systemsFundamentals of computer systems
Fundamentals of computer systems
 
7 Secrets to Becoming a Citrix Hero
7 Secrets to Becoming a Citrix Hero7 Secrets to Becoming a Citrix Hero
7 Secrets to Becoming a Citrix Hero
 
Untangling DevOps - A high-level overview and how we got here
Untangling DevOps -  A high-level overview and how we got hereUntangling DevOps -  A high-level overview and how we got here
Untangling DevOps - A high-level overview and how we got here
 
Experience in teaching devops
Experience in teaching devopsExperience in teaching devops
Experience in teaching devops
 
Twelve Factor - Designing for Change
Twelve Factor - Designing for ChangeTwelve Factor - Designing for Change
Twelve Factor - Designing for Change
 
Continuous Delivery: Rapid and Reliable Releases with DevOps Practices
Continuous Delivery: Rapid and Reliable Releases with DevOps PracticesContinuous Delivery: Rapid and Reliable Releases with DevOps Practices
Continuous Delivery: Rapid and Reliable Releases with DevOps Practices
 
PCB Design and Data Management
PCB Design and Data ManagementPCB Design and Data Management
PCB Design and Data Management
 

Recently uploaded

Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfFerryKemperman
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....kzayra69
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...Technogeeks
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)jennyeacort
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 

Recently uploaded (20)

Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdf
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 

Implementing DevOps Automation Best Practices and Common Mistakes

  • 1. Implementing DevOps Automation Best Practices and Common Mistakes Given by Derek C. Ashmore Agile+DevOps East 2023 November 8, 2023 ©2023 Derek C. Ashmore, All Rights Reserved 1
  • 2. Who am I? • Professional Geek since 1987 • AWS since 2010 • Azure since 2017 • Specialties • Application Transformation • Infrastructure Automation • Yes – I still code! ©2023 Derek C. Ashmore, All Rights Reserved 2
  • 3. Discussion Resources • This slide deck – https://www.slideshare.net/derekashmore/presentations • Slide deck has hyper-links! – Don’t bother writing down URLs • I take questions – For those online, contact me on LinkedIn ©2023 Derek C. Ashmore, All Rights Reserved 3
  • 4. Agenda Intro and Level Set DevOps Best Practices DevOps Management Summary / Q&A ©2023 Derek C. Ashmore, All Rights Reserved 4
  • 5. DevOps Managed Infrastructure • 99+% Infrastructure as Code (IaC) • Manual changes – Increase errors – Increase unwanted differences between environments – Increase admin workload • Scripted/Coded changes – Larger upfront cost, but….. – Less busywork – Leverage Others Work – Decreases Errors – Errors fixed in one place – Eliminates unwanted differences – Change history (with source control) ©2023 Derek C. Ashmore, All Rights Reserved 5
  • 6. Tales from the Field • Large Consumer Product Firm – Rebuilds entire cloud footprint every two weeks • Large Fast-food Franchise – Easy to add new business unit spokes – Security / Guardrails built in – Internet ingress/egress – On premises network connectivity • Large Financial Institution – Mobile App Cloud and application footprint • blue/green capability ©2023 Derek C. Ashmore, All Rights Reserved
  • 7. DevOps Automation Categories ➢Network / non-application specific infrastructure ▪ Virtual Networks/VPCs and subnets ▪ Route tables, Network peering ▪ Security groups / NSGs ➢Application infrastructure ▪ Relational databases ▪ Serverless constructs ➢Security privileges and policies ▪ IAM Roles and privilege grants ➢Virtual machine image production ▪ Produce machine images for teams to use ▪ Docker image production is similar conceptually ©2023 Derek C. Ashmore, All Rights Reserved 7
  • 8. Agenda Intro and Level Set DevOps Best Practices DevOps Management Summary / Q&A ©2023 Derek C. Ashmore, All Rights Reserved 8
  • 9. Discipline is Key ➢Discipline required differs per maturity level ➢Source Code Management ➢Source Code Structure ➢Deployment Management (CI/CD Pipelines) ➢Avoid Manual Changes ➢Testing Strategy ©2023 Derek C. Ashmore, All Rights Reserved 9
  • 10. Automation Usage Evolution • In the beginning – Use Source Control • As #Coders grow – Feature branches – CI/CD Pipelines • As #Configurations grow – Separate repo for modules – Implement versioning • Never use main/master! • Further reading ©2023 Derek C. Ashmore, All Rights Reserved
  • 11. Feature Branching • DevOps Team Discipline is Key • Feature Branches – Never edit main/master directly! – Update using Pull Requests • Should live less than one day! – Single targeted enhancement – One developer only – Long-lived branches prone to merge conflicts – Squash commits on merge • Further reading ©2023 Derek C. Ashmore, All Rights Reserved
  • 12. Code in Reusable Modules ➢Advantages are ▪ Small blast radius ▪ More easily tested ▪ Economies of scale ➢Example reusable modules ▪ Kubernetes Cluster ▪ Virtual Machine ▪ Virtual Networks and Subnets ▪ S3/Storage accounts ▪ Serverless services/functions ➢100+ Modules in all ▪ Used in 400+ pipelines ➢Tested in merge to master ©2023 Derek C. Ashmore, All Rights Reserved 12
  • 13. CI/CD Pipelines • Provides consistent runtime environment – Software version – Cloud security policy • Audit history / Admin security • Pipeline approvals – Force Plan/Dry-Run execution – Force manual approval before changing the environment ©2023 Derek C. Ashmore, All Rights Reserved
  • 14. Manual Intervention Requirements ➢Some companies require manual intervention ▪ Often dictated by company policy ▪ Examples include ▪ Requiring DNS entries to be manually entered ▪ Separate group allocates security privileges ▪ On-premises connectivity ➢IaC depending on manual intervention cannot have automated tests ▪ Localize the manual intervention requirements ©2023 Derek C. Ashmore, All Rights Reserved 14
  • 15. Accommodating Manual Processes ©2023 Derek C. Ashmore, All Rights Reserved 15
  • 16. Infrastructure Code Testing ➢IaC is code! ▪ Housed in source control ▪ Often changed and released ▪ Needs testing like any other code ➢IaC change can have negative impact ▪ Environment outages ▪ End-user internet connectivity outage ▪ Application outages ▪ Testing team delayed for four days ➢Testing IaC can minimize negative impact ©2023 Derek C. Ashmore, All Rights Reserved 16
  • 17. Infrastructure Code Testing Differences ➢IaC != Application Code ▪ IaC requires external resources (e.g. Cloud) to run ▪ In-process unit testing often not possible ➢Limited localized (in-process) testing ▪ Generally limited to syntax checks ▪ Terraform validation ▪ Ansible Dry Runs ▪ IDE syntax checks ➢Most testing is “integration” testing ©2023 Derek C. Ashmore, All Rights Reserved 17
  • 18. Infrastructure Code Testing Challenges ➢Friction ▪ Harder to write/maintain ➢Dependencies ▪ Managed by other teams ➢Testing costs ▪ Use Sandbox – tear-down after tests ➢Manual intervention requirements ▪ Not possible to automate tests ©2023 Derek C. Ashmore, All Rights Reserved 18
  • 19. Lack of Discipline Causes… ➢Unplanned Work ▪ Change due to automatic upgrades ▪ Unintended consequences ➢Accidental over-writing changes of others ▪ Merge conflicts ▪ Changes deployed from unmerged branches ➢Increased defect rate ➢Configuration Drift caused by manual change ©2023 Derek C. Ashmore, All Rights Reserved 19
  • 20. Frequent Mistakes in the Field… ➢Lack of testing for common IaC code ▪ Testing for one use of common code is not sufficient! ▪ Often breaks other consumers of the common code ➢Creating a blast radius for IaC that’s too large ▪ Can’t make targeted changes without unintended consequences ➢Treating common IaC code as an enforcement mechanism ▪ Decouple policy enforcement and naming conventions ▪ Common IaC is a productivity enhancer only ©2023 Derek C. Ashmore, All Rights Reserved 20
  • 21. Agenda Intro and Level Set DevOps Best Practices DevOps Management Summary / Q&A ©2023 Derek C. Ashmore, All Rights Reserved 21
  • 22. Management is different too! • Instead of – Manual reviews/approvals • Automate guardrails • Automate testing • Whitelist cloud services • Consider continuous delivery/deployment – Capacity planning up front • Monitor cost increases and investigate – Mandating policy changes by edict • Automate policy enforcement ©2023 Derek C. Ashmore, All Rights Reserved
  • 23. Things that Don’t work • Adding Manual Approvals/Reviews – Kills velocity and productivity – Stops innovation – Creates bottlenecks • Forcing manual procedures – Attempt to “expedite” – Creates technical debt ©2023 Derek C. Ashmore, All Rights Reserved
  • 24. Things that Work! • Declare War on manual approvals – Favor automated guardrails – Automate oversight • Decentralize Cloud Management – Let app teams manage app infrastructure • Don’t be a bottleneck – Leave App teams to innovate • Create a Service Catalog – Automate whitelisting of services – Create reasonable process for new services • Legal reviews (HIPPA, GDPR, etc.) • Fund automation – You won’t make it manually! • DevOps Team Discipline – Automation needs SDLC just like applications – Source management is key ©2023 Derek C. Ashmore, All Rights Reserved
  • 25. Thank you! • Derek Ashmore: – Blog: www.derekashmore.com – LinkedIn: www.linkedin.com/in/derekashmore • Connect Invites from attendees welcome – Twitter: https://twitter.com/Derek_Ashmore – GitHub: https://github.com/Derek-Ashmore – Book: http://dvtpress.com/ • Please fill out the evaluation form! ©2023 Derek C. Ashmore, All Rights Reserved 25