Limerick DotNet-Azure User Group (LDNA) 18 January 2018 Meetup (https://www.meetup.com/Limerick-DotNet/events/246446337/)
There and Back Again (My DevOps journey)
Talking about my company's DevOps journey, from the initial brown-field all-manual state, to our current partially automated situation and the strategic destination of a fully automated and monitored process.
3. What we will talk about?
Introduction
Initial state
Infrastructure-as-Code
Mindset
Terraform
IaaS in the Cloud
Configuration Management
Continuous Delivery
Recap
3
200-level
Visual and practical
Deck on SlideShare
Bibliography at the end
7. No green-field
3 Active Directory domains
3 test environments
2 production environments
All manually built
TeraByte-size SQL instances
VPN connections
Centralized version control
18. Stay organized
/ repo root
modules terraform modules
utility general purpose
shared common to multiple applications or environments
application_name internal or public application
non-production can be rebuilt any moment
shared common to multiple environments
e.g. deploy agents, jumpbox
qa Integration test
uat User acceptance test
perf Load testing
production everything here is critical
legacy hand made infrastructure e.g. TFS
shared common to main and dr e.g. networking
live PRODUCTION ENVIRONMENTS
dr Disaster recovery site
19. Three steps to import
Define as regular resources
Add safety clause
lifecycle {
prevent_destroy = true
}
Include in state
terraform import
20. Changing names
TF deletes and rebuild resource
There can be more than one? Consider:
Security Group Rules
Virtual Machine Extensions
More is better
environment-tier-role-instance
21. State management
Myth: State is map of reality
Setup in shared, locked place
Azure Storage or AWS S3
Some changes not sensed
Learn to use
terraform state
28. Fake it and retry
Powershell Remote
Powershell DSC
29. Powershell
Search, search, search
Careful with StackOverflow
Desired State Configuration
Declarative configuration
Module management
Install-Module is just the first step
Testing
Pester
Limited use
30. Desired State Configuration (DSC)
Configuration FourthCoffee
{
# Install the IIS role
WindowsFeature IIS
{
Ensure = "Present"
Name = "Web-Server"
}
# Install the ASP .NET 4.5 role
WindowsFeature AspNet45
{
Ensure = "Present"
Name = "Web-Asp-Net45"
}
#...
}
Reboots
Modes
Local / Push
Pull
ConfigurationMode
ApplyOnly
ApplyAndMonitor
ApplyAndAutocorrect
PowerShell Gallery
35. Pipelines unfolding
one pipeline is not enough for all of us…
Integral deploy
Über-arching test and deploy
Partial paths
Just DB or App
Hotfix path
Other operations
Disaster Recovery
42. To know more
Terraform - Up and Running: Writing
Infrastructure as Code — Y.Brikman
(O′Reilly)
https://www.amazon.co.uk/gp/product/14
91977086/
The DSC Book — Don Jones and
Melissa Januszko (O′Reilly)
https://leanpub.com/the-dsc-book
42
43. To know more
Continuous Delivery: Reliable Software
Releases through Build, Test, and
Deployment Automation — J.Humble,
D.Farley (Addison-Wesley)
https://www.amazon.com/Continuous-
Delivery/dp/0321601912/
The DevOps Handbook — G.Kim, P.Debois,
J.Willis, J.Humble (IT Revolution Press)
https://www.amazon.com/DevOps-Handbook-
World-Class-Reliability-
Organizations/dp/1942788002/
43
44. To know more (cont’d)
DevOps on the Microsoft Stack — Wouter de
Kort (Apress)
https://www.amazon.com/DevOps-Microsoft-Stack-Wouter-
Kort/dp/1484214471/
Beginning Build and Release Management with
TFS 2017 and VSTS — Chandrasekara, Chaminda
(Apress)
http://www.apress.com/gp/book/9781484228104
Refactoring Databases — Scott J Ambler and
Pramod J. Sadalage (Addison-Wesley)
https://www.amazon.com/Refactoring-Databases-
Evolutionary-paperback-Addison-Wesley/dp/0321774515/
44
46. Bene+dic, Domine, creaturam istam cerevisae,
quam ex adipe frumenti producere dignatus es:
ut sit remedium salutare humano generi:
et praesta per invocationem nominis tui sancti, ut,
quicumque ex ea biberint, sanitatem corporis,
et animae tutelam percipiant.
Beer is a
blessed thing
Editor's Notes
Detonator plunger
Read the book
Similar “aha” moment with Ansible
Read the book
Similar “aha” moment with Ansible
No, state is metadata e.g. Terraform dependencies
Read the book
Similar “aha” moment with Ansible
If at first she says no, try againIf you meet with defeat, try again(Dean Martin “Try Again” 1954)