DevOps by examples Giulio Vian http://blog.casavian.eu/ giulio.dev@casavian.eu @giulio_vian http://www.getlatestversion.it/
1990 ? 1992 2014 1995 freelance 1999 2015 TFS Aggregator 2010 2014 2016
Most recent project © 2016 IMG Universe, LLC. All Rights Reserved
This Session 100/200-level Grasp the essentials of the DevOps approach. (well …, some essentials) Leave open questions to the end
What we will talk about? DevOps intro Demos Wrap-up Environment hosting the app The Application itself Deployment Dynamic configuration Wrap-up
Your turn Azure Visual Studio Team Services (VSTS) ASP.NET Linux (Ubuntu)
«Appetizer»
DevOps is a job? NO!
DevOps is a product? NO!
DevOps is a culture, movement or practice Wikipedia (2017) DevOps is a term used to refer to a set of practices that emphasizes the collaboration and communication of both software developers and other information- technology (IT) professionals while automating the process of software delivery and infrastructure changes. DevOps represents a change in IT culture, focusing on rapid IT service delivery through the adoption of agile, lean practices in the context of a system-oriented approach. DevOps emphasizes people (and culture), and seeks to improve collaboration between operations and development teams. DevOps implementations utilize technology — especially automation tools that can leverage an increasingly programmable and dynamic infrastructure from a life cycle perspective. DevOps is the union of people, process, and products to enable continuous delivery of value to our end users. Gartner http://www.gartner.com/it-glossary/devops/ DevOps is a term used to refer to a set of practices that emphasize the collaboration and communication of both software developers and information technology (IT) professionals while automating the process of software delivery and infrastructure changes. It aims at establishing a culture and environment, where building, testing, and releasing software can happen rapidly, frequently, and more reliably. Wikipedia (2017) Microsoft (Donovan Brown)
Continuous Delivery evolution… Source: Jez Humble © 2010
…rooted in Agile Principles Individuals and interactions over processes and tools Working software over comprehensive documentation Customer collaboration over contract negotiation Responding to change over following a plan http://agilemanifesto.org/
«Main course» Where? Infrastructure-as-Code What? Build & Package How? Deploy
Execution environment Operating System O.S. Modules Local Services, Libraries Application Network & External Services Data The 1975 book _Algorithms + Data Structures = Programs_ of Turing Award winner Niklaus Wirth is still relevant.
Execution environment (alt) Base container Custom Container Application (in container) Network & External Services (e.g. Kubernetes) Data Out-of-scope
Execution environment – Comments Setup times vs. launch times Capacity planning Running costs (Buy vs. Make)
Infrastructure-as-Code Azure Resource Manager Code Automation
Infrastructure-as-Code – Comments Declarative vs. Imperative Version Control Continuous Integration Dynamic vs. Static Azure Resource Manager Declarative Json-based Extensible (script, DSC) Entire infrastructure AWS CloudFormation Terraform Docker Not much declarative Single container Swarm, Kubernetes, Mesos, … Ansible, Puppet, Chef, CFEngine, …
Application Web page showing DB data Environment Configuration
Build & Packaging Collect everything
Build & Packaging – Comments Version Control Continuous Integration Semantic Versioning Artifacts Images (Docker, AMI, Azure VM images)
Deploy VSTS Release Management Controlled Automation
Secrets .gitignore Centralized Version Control Distinct repositories Build time Signing Deploy time Credentials Run time Tokens Avoid exposures git push hook Static analysis .gitignore Centralized Version Control Distinct repositories Azure Key Vault, AWS Key Management Service, etc.
Deploy – Comments Category Integrated (dynamic) Release cadence Dev / QA / Prod Integrated (dynamic) Release cadence Feature toggles http://martinfowler.com/articles/feature-toggles.html Source: Pete Hodgson
Dynamic Configuration Feature Toggle
Additional DevOps topics (out-of-scope) Application Monitoring Troubleshooting Feedback loop …and more Ops Dev
«Dessert»
People (Photo: DoD)
Automation (Photo: Alexander Dummer)
Resources (Photo: Elya)
Call to action (Photo: Francesco Canu)
Bibliografy & References https://github.com/giuliov/DevOps-by-examples http://www.slideshare.net/giuliov/presentations http://martinfowler.com/articles/feature-toggles.html https://leanpub.com/build https://launchdarkly.com/ http://agilemanifesto.org/ https://azure.microsoft.com/en-us/services/application-insights/ https://github.com/tfsaggregator/tfsaggregator https://github.com/aspnet https://azure.microsoft.com/en-us/services/key-vault/ https://aws.amazon.com/kms/ https://blogs.msdn.microsoft.com/buckh/2016/09/30/controlling-exposure-through-feature-flags-in-vs- team-services/
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 Phoenix Project — G.Kim, K.Behr, G.Spafford (IT Revolution Press) https://www.amazon.com/Phoenix-Project- DevOps-Helping-Business/dp/0988262509/
To know more (cont’d) 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/ Continuous Delivery with Visual Studio ALM 2015 — M.Olausson, J.Ehn (Apress) http://www.amazon.com/Continuous- Delivery-Visual-Studio-2015/dp/1484212738/
Partial checklist Where is configuration stored? How is configuration updated? Is production configuration isolated and secured? Where are the secrets and who can access them? How versions are tracked? Who authorizes changes and how? How data is preserved on updates? How data schema and module interfaces updates? Using environment images or scripts? How big is the deploy window? How are the tracked activities and errors? How are operational data is collected from production?
Fine delle trasmissioni
Demo Screenshots Nota con VSTS cloud non significa pubblico!
Infrastructure-as-Code
Azure Portal
Resource Groups
Resulting Resource Group
Visual Studio Team Services – Project home
Visual Studio Team Services Release Management
Create/Update Resource Group
Install packages
Environment creation in progress
Resulting Environment
Application
Version Control
Home page
Query “C”
Build & Packaging
Continuous Integration
Semantic Versioning
App build script
Deploy
App deploy script – Database
App deploy script – Copy files to Target
App deploy script – Run final setup script
App deploy – configuration data
App deploy – source packages
Deploying the app
Deploying the app – pick a version
App deploy log
App deployed
Dynamic Configuration
Toggle feature script – generate new config files
Toggle feature deploy script – deploy config changes
New configuration data
Backup slides Nota con VSTS cloud non significa pubblico!
DevOps is a culture, movement or practice DevOps is a culture, movement or practice that emphasizes the collaboration and communication of both software developers and other information-technology (IT) professionals while automating the process of software delivery and infrastructure changes. http://www.gartner.com/it-glossary/devops/ DevOps is a term used to refer to a set of practices that emphasize the collaboration and communication of both software developers and information technology (IT) professionals while automating the process of software delivery and infrastructure changes. It aims at establishing a culture and environment, where building, testing, and releasing software can happen rapidly, frequently, and more reliably. Wikipedia (2017) Wikipedia (2015)
Environments Integration Dev test Laboratory QA Staging Production
Rollout dimensions Timeframe Size Patch Module Application System Less then a week One week One month A few month Patch Module Application System Size
Rollout by steps Database tier Application tier Presentation tier Cllient Web Application tier Service tier Database tier Mainframe