database continuous delivery
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.TRANSCRIPT
Yaniv YehudaUri Margalit
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
3
Presenters
Yaniv Yehuda• CTO, Co-Founder at DBmaestro
Uri Margalit• Director of Products at DBmaestro
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
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…
6
Continuous Integration
Continuous Delivery
Continuous Deployment
!
?
Continuous *what*?
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?
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?
9
Continuous Delivery
Image from Wikipedia
Fail
Pass
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
11
• More rapid changes• Fewer changes backed out• Better collaboration• Fewer defects
• Ultimately better service • Happy customers • Profitability
How Do I Measure Success?
12
• Automate “everything”• Move the process upstream• Create the deployment pipeline
To summarize…
13
But…
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
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
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
17
• Silos exist…• Don’t always communicate effectively• Need to share knowledge• Need to follow same procedures & best
practices
Developers and DBAs
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’
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
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
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
22
Version Control - One Enforced Process
23
Development Methods
Int QA StageDev
DevDev
Deploy
Environment
Prod
Re-Base (due to defects)
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
25
If a Picture is Worth a Thousand Words…
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
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
28
Q & A
29
Links
• http://www.thoughtworks.com/continuous-integration
• http://www.thoughtworks.com/continuous-delivery
• http://martinfowler.com/articles/continuousIntegration.html
• http://puppetlabs.com/blog/continuous-delivery-vs-continuous-deployment-whats-diff
• http://refcardz.dzone.com/refcardz/continuous-delivery-patterns
• http://en.wikipedia.org/wiki/Continuous_integration
• http://en.wikipedia.org/wiki/Application_release_automation
• http://en.wikipedia.org/wiki/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?