Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 76

Stephanie Herr

DevOps:
What it is & why you should care
Agenda
• DevOps
• Why DevOps?
• DevOps Practices
• DevOps and Databases
• Demo
Stephanie Herr
Redgate, Database DevOps Product Manager
Stephanie.Herr@redgate.com
@SQLStephanie @Redgate
Our Production Deployments
1. Stop IIS
2. Check db sessions
3. Change db to single-user mode
4. Take a full backup
5. Open my T-SQL script in SSMS and run it
6. Copy over the app files
7. Restart IIS
8. Click around on a few things
9. Turn db back to multi-user
DevOps
Agile Manifesto
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
12 Principles behind the Agile Manifesto

http://agilemanifesto.org/principles.html
Agile Principles
1. Our highest priority is to satisfy the customer
through early and continuous delivery of
valuable software.

http://agilemanifesto.org/principles.html
Agile Principles
3. Deliver working software frequently, from
a couple of weeks to a couple of months, with
a preference to the shorter timescale.

http://agilemanifesto.org/principles.html
Agile Principles
4. Business people and developers must
work together daily throughout the project.

http://agilemanifesto.org/principles.html
Scrum

https://www.scrum.org/Resources/What-is-Scrum
http://www.cardinalsolutions.com/blog/2015/05/assuring-quality-in-the-new-agile-world
http://www.agilemodeling.com/essays/costOfChange.htm
Background Agile 2007-2008
Patrick
Cloud and Debois 
PaaS Agile Sys
Admin GG 2007
Infrastruct Ops =
as code comp
advantage

2009
2007 – 2010 Velocity:
Lean DevOps 10+ deploys
/ day

2013
2009
The Phoenix
DevOpsDays
Project 2010 – 2011
Tools / 2010
Gartner / Continuous #DevOps
Vendors Integration
/
Continuous
Delivery http://itrevolution.com/the-convergence-of-devops
https://www.ibm.com/developerworks/library/se-devops/part1
http://itrevolution.com/the-history-of-devops
What is DevOps?
Ch9 – Microsoft – Introduction to DevOps

https://channel9.msdn.com/Series/DevOps-Fundamentals/Introduction-to-DevOps
Ch9 – Microsoft – Introduction to DevOps

https://channel9.msdn.com/Series/DevOps-Fundamentals/Introduction-to-DevOps
Ch9 – Microsoft – Introduction to DevOps

https://channel9.msdn.com/Series/DevOps-Fundamentals/Introduction-to-DevOps
http://www.slideshare.net/GrantFritchey/building-an-automated-database-deployment-pipeline
https://commons.wikimedia.org/wiki/File:Mocking_Bird_Argument.jpg
http://www.slideshare.net/GrantFritchey/building-an-automated-database-deployment-pipeline
https://commons.wikimedia.org/wiki/File:Mocking_Bird_Argument.jpg
http://www.slideshare.net/GrantFritchey/building-an-automated-database-deployment-pipeline
https://commons.wikimedia.org/wiki/File:Mocking_Bird_Argument.jpg
https://medium.com/point-nine-news/do-you-speak-devtools-73237550bf4f
https://www.javacodegeeks.com/2015/12/devops-myth-efficiency-part.html
Surprise!
Broad Agreement on the Definition of DevOps
“DevOps exists to help the business win
Broad scope, but centered on IT
Foundations in Agile and Lean
Culture is very important
Feedback is fuel for innovation
Automation helps”
https://devops.com/2015/05/13/surprise-broad-agreement-on-the-definition-of-devops
DevOps by Patrick Debois – Feb 2011

http://www.slideshare.net/jedi4ever/devops-paris-jug-2011
DevOps by Patrick Debois – Feb 2011

http://www.slideshare.net/jedi4ever/devops-paris-jug-2011
DevOps in the right perspective
devops : collaboration, optimization devops 'lite' : when people zoom
across the whole organisation. Even in on 'just' dev and ops
beyond IT (HR, Finance...) and
company borders (Suppliers)

http://www.jedi.be/blog/2012/05/12/codifying-devops-area-practices
My favorite definition of DevOps
“DevOps is the union of people, process, and
products to enable continuous delivery of value
to our end users.”
Donovan Brown
Principal DevOps Manager
Microsoft

http://donovanbrown.com/post/what-is-devops
DevOps Values – CALMS
Culture
Automation
Lean
Measurement
Sharing

https://puppet.com/blog/devops-principles-for-it-managers
The Three Ways:
The Principles Underpinning DevOps by Gene Kim

http://itrevolution.com/the-three-ways-principles-underpinning-devops
The Three Ways:
The Principles Underpinning DevOps by Gene Kim

http://itrevolution.com/the-three-ways-principles-underpinning-devops
The Three Ways:
The Principles Underpinning DevOps by Gene Kim

http://itrevolution.com/the-three-ways-principles-underpinning-devops
The Three Ways:
The Principles Underpinning DevOps by Gene Kim

http://itrevolution.com/the-three-ways-principles-underpinning-devops
Why DevOps?
Benefits
1.Faster time-to-market/delivery times that
improves ROI
2.Engaged, empowered cross-discipline teams
3.Stable/reliable operating environments
4.Early detection and faster correction of defects
5.Improved quality

http://www.gallop.net/blog/6-compelling-business-benefits-of-devops
https://www.infoq.com/articles/devops-lessons-microsoft
“Technology Is Wiping Out Companies Faster than Ever”

https://www.technologyreview.com/s/519226/technology-is-wiping-out-companies-faster-than-ever
2016 State of DevOps Report

https://puppet.com/
resources/white-
paper/ 2016-state-of-
devops-report
https://puppet.com/resources/white-paper/2016-state-of-devops-report
9 Ways IT Automation Makes You More Successful
Business Needs Predictability Agility &
Avoiding downtime Consistency Confidence
Fast response to
Easy policy Better code quality software vulnerability
enforcement announcements
Quicker recovery
Visibility, auditability Scalability
and accountability
The confidence to
level up

https://puppet.com/resources/white-paper/9-ways-it-automation-makes-you-more-successful
DevOps
Practices
DevOps Practices
Automated Provisioning, Infrastructure as Code
Small frequent changes
Version Control
Continuous Integration (including automated testing)
Continuous Delivery / Release Management
Measuring metrics
Feature flags (develop on trunk), Canary Releases,
Dark Launches https://dzone.com/articles/devops-devops-principles
https://www.youtube.com/watch?v=LdOe18KhtT4
DevOps Measurements
Deployment frequency
Lead time for changes
Change failure rate
Mean time to recover (MTTR)

https://puppet.com/resources/white-paper/2016-state-of-devops-report
https://puppet.com/resources/white-paper/2016-state-of-devops-report
What DevOps Taught Me About Agile
Agile needs automation to really boost velocity
The gap between “potentially releasable” and “actually released” can be
vast
Product Owner and stakeholder feedback is great but real customer
feedback is the true test of value delivered
Application architecture matters
Small batch size is really important for fast feedback cycles and
reducing release risk
Agile teams need DevOps practices, and DevOps needs Agile’s teaming
model and connection to business value to drive better results

https://blog.scrum.org/devops-taught-agile-vice-versa
Anti-patterns
Management just saying we’re doing DevOps
Just changing job titles to DevOps
Just merging dev and ops teams or creating a separate DevOps team
Committing is done
My responsibility ends here
Devs blaming Ops; Ops blaming Devs
Ops not involved early
DevOps means Developers Managing Production
It’s not just automation or a tool (or set of tools)
https://theagileadmin.com/what-is-devops
https://dzone.com/articles/devops-anti-patterns-warning
https://blog.devopsguys.com/2013/02/20/twelve-devops-anti-patterns
DevOps and
Databases
The State of Database DevOps Report
Has your organization already adopted, or Describe your team
do you plan to adopt, a DevOps approach?

Consider to be the greatest drawback in


80% traditional siloed db development practices?

The biggest driver for including the


database is to increase the speed of
delivery of database changes
http://www.red-gate.com/solutions/database-devops/report
http://www.red-gate.com/solutions/database-devops/report
Database Challenges
1. Secure and protect Production data (change is risky)
2. Production data vs reference data
3. Test data
4. The DBA (unfamiliar with tools)
5. Environment differences
6. Dependencies
7. Multiple applications may access the same db
8. Database drift (aka – Hot fixes directly to Prod)
9. Maintaining backwards compatibility
10. How will you rollback (roll forward)?
Delivery Pipeline
Development

Create table Orders


( OrderID int
, OrderDate datetime
, salesrep int
, customerid int
, status tnyint
)

Create procedure GetOrders Dev


@o datetime
As
Begin
Select *
from orders
Where orderdate > @o

using System;
using
System.Collections.Generic;
using System.Text;
using eBay.Service.Core.Sdk;
using eBay.Service.Core.Soap;
namespace Trading_Samples
{
class Program
{
static void Main(string[]
args)
{
MakeGetOrders();
Console.ReadLine();
Delivery Pipeline
Development Continuous Integration

Create table Orders


( OrderID int
, OrderDate datetime
, salesrep int
, customerid int
, status tnyint
)

Create procedure GetOrders Dev


@o datetime
As
Begin
Select *
from orders
Where orderdate > @o

using System;
using
System.Collections.Generic;
using System.Text;
using eBay.Service.Core.Sdk;
using eBay.Service.Core.Soap;
namespace Trading_Samples Build Test
{
class Program
{
static void Main(string[] Commit Publish
args)
{
MakeGetOrders();
Console.ReadLine();
Delivery Pipeline
Development Continuous Integration Testing

Create table Orders Alter table Orders


( OrderID int Add status tinyint;
, OrderDate datetime
, salesrep int
, customerid int Create procedure
, status tnyint GetOrders
) …..

Create procedure GetOrders Dev QA


@o datetime
As
Begin
Select *
from orders
Where orderdate > @o

using System;
using
System.Collections.Generic;
using System.Text;
using eBay.Service.Core.Sdk;
using eBay.Service.Core.Soap;
namespace Trading_Samples Build Test
{
class Program
{
static void Main(string[] Commit Publish
args)
{
MakeGetOrders();
Console.ReadLine();
Delivery Pipeline
Development Continuous Integration Testing Production

Create table Orders Alter table Orders Alter table Orders


( OrderID int Add status tinyint; Add status tinyint;
, OrderDate datetime
, salesrep int Create procedure
, customerid int Create procedure
GetOrders GetOrders
, status tnyint
) ….. …..

Create procedure GetOrders Dev QA Prod


@o datetime
As
Begin
Select *
from orders
Where orderdate > @o

using System;
using
System.Collections.Generic;
using System.Text;
using eBay.Service.Core.Sdk;
using eBay.Service.Core.Soap;
namespace Trading_Samples Build Test
{
class Program
{
static void Main(string[] Commit Publish
args)
{
MakeGetOrders();
Console.ReadLine();
Delivery Pipeline
Development

Create table Orders


( OrderID int
, OrderDate datetime
, salesrep int
, customerid int
, status tnyint
)

Create procedure GetOrders Dev


@o datetime
As
Begin
Select *
from orders
Where orderdate > @o

using System;
using
System.Collections.Generic;
using System.Text;
using eBay.Service.Core.Sdk;
using eBay.Service.Core.Soap;
namespace Trading_Samples
{
class Program
{
static void Main(string[]
args)
{
MakeGetOrders();
Console.ReadLine();
Delivery Pipeline
Development

Create table Orders


( OrderID int
, OrderDate datetime
, salesrep int
, customerid int
, status tnyint
)

Create procedure GetOrders Dev


@o datetime
As
Begin
Select *
from orders
Where orderdate > @o

using System;
using
System.Collections.Generic;
using System.Text;
using eBay.Service.Core.Sdk;
using eBay.Service.Core.Soap;
namespace Trading_Samples
{
class Program
{
static void Main(string[]
args)
{
MakeGetOrders();
Console.ReadLine();
Delivery Pipeline
Development Continuous Integration

Create table Orders


( OrderID int
, OrderDate datetime
, salesrep int
, customerid int
, status tnyint
)

Create procedure GetOrders Dev


@o datetime
As
Begin
Select *
from orders
Where orderdate > @o Test
Build

using System;
using Commit Publish
System.Collections.Generic;
using System.Text;
using eBay.Service.Core.Sdk;
using eBay.Service.Core.Soap;
namespace Trading_Samples
{
class Program
{
static void Main(string[]
args)
{
MakeGetOrders();
Console.ReadLine();
Delivery Pipeline
Development Continuous Integration Testing

Create table Orders


( OrderID int
, OrderDate datetime
, salesrep int
, customerid int
, status tnyint
)
Alter table Orders
Create procedure GetOrders Dev Add status tinyint;
@o datetime
As Create procedure
Begin GetOrders
Select *
from orders
….. QA
Where orderdate > @o Test
Build

using System;
using Commit Publish
System.Collections.Generic;
using System.Text;
using eBay.Service.Core.Sdk;
using eBay.Service.Core.Soap;
namespace Trading_Samples
{
class Program
{
static void Main(string[]
args)
{
MakeGetOrders();
Console.ReadLine();
Delivery Pipeline
Development Continuous Integration Testing Production

Create table Orders


( OrderID int
, OrderDate datetime
, salesrep int
, customerid int
, status tnyint
)
Alter table Orders
Alter table Orders
Add status tinyint;
Create procedure GetOrders Dev Add status tinyint;
@o datetime
Create procedure
As Create procedure
Begin GetOrders
GetOrders
Select *
from orders
….. QA
…..
Prod
Where orderdate > @o Test
Build

using System;
using Commit Publish
System.Collections.Generic;
using System.Text;
using eBay.Service.Core.Sdk;
using eBay.Service.Core.Soap;
namespace Trading_Samples
{
class Program
{
static void Main(string[]
args)
{
MakeGetOrders();
Console.ReadLine();
2 approaches
to database versioning and deployment
State-based Migrations-based
State-based approach

V1 V2
CREATE TABLE Orders (
CREATE TABLE Orders (
OrderId int,
OrderId int,
CustomerID int,
CustomerID int )
LastEdited datetime2 )

CREATE PROC GetOrders AS CREATE PROC GetOrders AS


SELECT OrderId, CustomerID SELECT OrderId, CustomerID,
FROM Orders LastEdited
FROM Orders
State-based approach – Deployments

V1 V2
</>
Compare and dynamically
generate the deployment script
Migrations-based approach

V1 V2
ALTER PROC GetOrders AS
ALTER TABLE Orders SELECT CustomerID, LastEdited
ADD COLUMN LastEdited datetime2 FROM Orders
Migrations-based – Deployments

V1 V2

Concatenate migration scripts


State vs Migrations
State-based Migrations-based
When it comes to production As soon as you have multiple
deployments, however, there's changes on a single aspect of an
nothing more reliable than keeping object, ordering and the ability to
track of exactly the scripts you detect which change needs to be
intend to run, and running them, made gets very complicated.
without trying to compare state and - Gerg Drapers, Microsoft, Data
guess. Dude
- Paul Stovell, Creator of Octopus - https://blogs.msdn.microsoft.com
Deploy /gertd/2009/06/05/declarative-
- https://octopus.com/docs/deployi database-development
ng-applications/sql-server-
databases
Demo
Automating
database
deployments
“Database releases should be boring”
Jonathan Hickford
Redgate DLM Product Manager
Conclusion
It won’t happen overnight
Changing your culture is hard

Five things your operations team doesn’t tell you about DevOps
- https://dzone.com/articles/five-things-your-operations-team-doesnt-tell-you-a

GOTO 2016: DevOps - The Good, The Bad, The Ugly - Jeff Smith
- https://www.youtube.com/watch?v=qLUt6bwNnks

Why DevOps is burning out Developers


- http://www.infoworld.com/article/3009004/devops/why-devops-is-burning-out-developers.html
Velocity 2009 - John Allspaw and Paul Hammond, "10+ Deploys Per Day: Dev and Ops Coordination”
How to get started
Learn more
• Velocity 2009: 10+ Deploys Per Day: Dev & Ops Cooperation at Flicker
• Puppet – Get started with DevOps: A Guide for IT Managers (registration)
• IBM DevOps distilled by Gene Kim (resources at end)
• Redgate Database DevOps
Why do you want to do DevOps?
Start to think about your business
DBAs talk to Devs & Devs talk to DBAs/Ops
Thank you!

Any questions?

Stephanie.Herr@red-gate.com
@SQLStephanie @Redgate
What is DevOps? – Microsoft
DevOps is more than a technology or a tool set.
It’s a mindset that requires cultural evolution. It is
people, process and the right tools to make your
application lifecycle faster and more predictable.

https://www.microsoft.com/en/server-cloud/solutions/development-operations.aspx
https://channel9.msdn.com/Series/DevOps-Fundamentals/Introduction-to-DevOps#time=04m30s

You might also like