31
Yaniv Yehuda Uri Margalit Database Continuous Delivery

Database continuous delivery

Embed Size (px)

DESCRIPTION

Wikipedia defines Continuous Delivery as a design practice used in software development to automate and improve the process of software delivery. That is well known and very true, but less known and still very true is that the same practices should be applied on to the database development, by using Database Enforced Change Management.

Citation preview

Page 1: Database continuous delivery

Yaniv YehudaUri Margalit

Database Continuous Delivery

Page 2: Database continuous delivery

2

• You will be on mute for the duration of the event

• We are now talking so please type a message in the Questions box in the Control Panel if you can’t hear us (please check your speakers and GoToWebinar audio settings first)

• There will be a Q+A session at the end, you can start submitting you questions on the Q&A bar on your gotowebinar dashboard.

• A recording of the full webinar will be put up online

Before We Begin

Page 3: Database continuous delivery

3

Presenters

Yaniv Yehuda• CTO, Co-Founder at DBmaestro

Uri Margalit• Director of Products at DBmaestro

Page 4: Database continuous delivery

Streamline Database Development Process

Reduce DatabaseDevelopment Costs

Instill Change Policy Enforcement

Mitigate Deployment Risks

Automate Deployment Process

Reduce Deployment cost by 95%

YY

DBmaestro: DevOps for Database

Page 5: Database continuous delivery

5

• Doing better with less• Reacting quickly to market needs• Getting ahead of competition

• Just can’t wait 6 months for that next release…• Agile Development• Process Automation• DevOps

Agile world…

Page 6: Database continuous delivery

6

Continuous Integration

Continuous Delivery

Continuous Deployment

!

?

Continuous *what*?

Page 7: Database continuous delivery

7

• Principles and practices• Been around for a while• Focus on streamlining development

• Developers integrate code into shared repository• Each check-in is verified• Automated builds• Automated tests• High visibility

• Easier & quicker to find problems, less back tracks => short integrations

What is Continuous Integration?

Page 8: Database continuous delivery

8

• Next step after continuous integration• Becoming lean, and even more Agile

• Make sure each change is releasable • Develop-> build-> test-> move to staging-> acceptance test

• Build a process to release with a push of a button• Deploy to production-> test production

• Actual deployment to production in manually actuated

=> Ensure risk mitigation and high efficiency

And Continuous Delivery?

Page 9: Database continuous delivery

9

Continuous Delivery

Image from Wikipedia

Fail

Pass

Page 10: Database continuous delivery

10

• Automating changes all the way to production• Develop-> build-> test-> move to staging-> acceptance test->

deploy to production-> test production

• Makes sense for Facebook, Amazon, i.e. - for large SAAS solutions.• A/B test new features• Stream traffic to new releases etc…

• Not for everyone…

Continuous Deployment

Page 11: Database continuous delivery

11

• More rapid changes• Fewer changes backed out• Better collaboration• Fewer defects

• Ultimately better service • Happy customers • Profitability

How Do I Measure Success?

Page 12: Database continuous delivery

12

• Automate “everything”• Move the process upstream• Create the deployment pipeline

To summarize…

Page 13: Database continuous delivery

13

But…

Page 14: Database continuous delivery

14

• The database holds your essential information

• Changes can impact the entire system• Need to be synchronized with other changes• Often overlooked

Database is a Key Component

Page 15: Database continuous delivery

15

• Old adage but true• The database is often “forgotten” and

therefore can become the weakest link• Essential from a compliance point of view• Should be the strongest link

• “Using NoSQL can eliminate the step of data migrations and schema changes, often manual steps or exceptions to a continuous delivery workflow” http://en.wikipedia.org/wiki/Continuous_delivery

(Rarely a practical option…)

The Weakest Link In a Chain

Page 16: Database continuous delivery

16

• There is more to a database than SQL scripts• Schema structure• Code• Content and meta-content• Internal dependencies• …

• Ensure that changes are not made without authorization

• Ensure no out-of-process changes

Reaching Inside the Database

Page 17: Database continuous delivery

17

• Silos exist…• Don’t always communicate effectively• Need to share knowledge• Need to follow same procedures & best

practices

Developers and DBAs

Page 18: Database continuous delivery

18

Two isolated Processes

Version Control Process (file based)

Development Process

Check-Out Script

Modify Script

Get updated Script from DB

Check-In Script

Compile Scriptin DB

Debug Scriptin DB

?

??

?

A

A’

Page 19: Database continuous delivery

19

• Major challenge… • Risky if done incorrectly…

• Conflicts & Merges• Code overrides• Outdated update scripts

• Need Impact analysis processes• Traceability and transparency• Audit and compliance

• Automating problems into production is a major risk!!!

Database deployment automation

Page 20: Database continuous delivery

20

• Start in the beginning • Build quality in from the beginning• Incremental steps• Move to QA next…• Take a complete lifecycle approach• Iterative approach to improving process

Where Do We Start

Page 21: Database continuous delivery

21

Dealing with challenges…

Coordinated Process Traceability

Start in the Beginning

No Out-of-Process Changes

Impact Analysis

Automation

Task Based Development

Well Defined Processes

Page 22: Database continuous delivery

22

Version Control - One Enforced Process

Page 23: Database continuous delivery

23

Development Methods

Int QA StageDev

DevDev

Deploy

Environment

Prod

Re-Base (due to defects)

Page 24: Database continuous delivery

24

Built Proof Deployment Automation

Simple Compare & Sync Baseline Aware Deployment

Source vs. Target

Action

= No Action

≠ ?

Source vs. Baseline

Target vs. Baseline

Action

= = No Action

≠ = Override

= ≠ Ignore

≠ ≠ Merge

You do not have all of the information

With Baselines and 3 way analysis the unknown is now known

Page 25: Database continuous delivery

25

If a Picture is Worth a Thousand Words…

Page 26: Database continuous delivery

26

Demo flow

Starting Point• 3 environments: PROD, Critical Bug Fix Branch, UAT

Flow• Make critical fixes

• Change the dedicate branch• Test• Promote to PROD• Test PROD

• Promote the UAT to PROD• Test• Promote to PROD• Test PROD

Page 27: Database continuous delivery

27

Summary

Dev…• Enforce best practices for database development• Closely manage your database development• Know who can do what, where, when & why

…Ops• Build a safety net to catch problems early• Reduce deployment issues• Enable automated deployments

Page 28: Database continuous delivery

28

Q & A

Page 30: Database continuous delivery

30

A Quick Poll

If we broadcast the recording, then is it possible to pause and add a poll? Who will handle it?

Page 31: Database continuous delivery