Automation and Continuous Delivery are at the forefront of software development processes today. However Cindy Bean who's a Sales Engineer for DBMaestro will be coming to talk to us about how databases are being neglected because database code is different, harder to automate, and DBAs just don't seem to trust database automation.
This is not surprising when you consider the number of incidents and instances of downtime that were caused by out-of-process updates, code overrides, and other database glitches. In this session, we will explain the options to automate database changes along with the benefits and issues with each option.
http://youtu.be/G8KjVabsZ1w
2. Copyright 2015. Confidential – Distribution prohibited without permission
▪
− Can’t scale, can’t match CD frequency
− Not repeatable, prone to error
4. Copyright 2015. Confidential – Distribution prohibited without permission
Developer PC
• Get Latest
• Local Development
• Check-In Code
Build Server
• Get Latest
• Compile
• Check-In Binaries
UAT Servers
• Copy Binaries
• Run Auto Tests
Prod Servers
• Copy Binaries
Binaries – Source Control
Repository
Source Code Files –
Source Control Repository
Test Servers
• Copy Binaries
• Run Auto Tests
In Case of Defects: Always Return to Dev
5. Copyright 2015. Confidential – Distribution prohibited without permission
’
▪
▪
▪
▪
− Schema structure
− Code
− Content and meta-content
− Internal dependencies
− …
Developer PC
• Get Latest
• Local Development
• Check-In Code
Build Server
• Get Latest
• Compile
• Check-In Binaries
Source Code Files –
Source Control Repository
6. Copyright 2015. Confidential – Distribution prohibited without permission
−Database change process
−Version control
−No “Out of Process” changes
−No unauthorized changes
−Automate your deployments
▪
−Scripts
−Compare & Sync Tools
−Database Enforced Source Control
7. Copyright 2015. Confidential – Distribution prohibited without permission
▪
−One script per object or script per change
−Where to store, filesystem or version control
−How to name files
▪
▪
’
▪
9. Copyright 2015. Confidential – Distribution prohibited without permission
…
▪
−Unaware of changes made in the target environment
−Time passed from their creation until their execution
−Potential to override production hot-fixes & work done by parallel
teams
−Order of script execution (data dependencies)
▪
−Meta data & lookup content does not fit practically into the version
control
−In most cases, they are simply not managed
10. Copyright 2015. Confidential – Distribution prohibited without permission
…
X
1.11.1.11.11.21.31.41.51.61.7
Int QA Pre Prod Prod
Database Deploy Script
Environment
Re-Base (due to defects)
Dev
Dev
Dev
Model
1.1 1.2
1.2 1.3
1.3 1.4
1.4 1.5
1.5 1.6
1.6 1.7
1.11.11.41.7
1.1 1.2
1.2 1.3
1.3 1.4
1.4 1.5
1.5 1.6
1.6 1.7
1.1 1.2
1.2 1.3
1.3 1.4
1.4 1.5
1.5 1.6
1.6 1.7
Out of Process
Change
X
X
X
X
X
? 1.1.1
X
11. Copyright 2015. Confidential – Distribution prohibited without permission
▪
▪
−Out of process changes
−Parallel development/branching & merging
−Conflicts
13. Copyright 2015. Confidential – Distribution prohibited without permission
Safe to automate?
No. Requires manual inspection…
14. Copyright 2015. Confidential – Distribution prohibited without permission
▪
▪
Simple, right?
NO! We could BREAK production without even knowing…
15. Copyright 2015. Confidential – Distribution prohibited without permission
▪
−Is unaware of any changes that occurred before the time it ran
−Has no knowledge of changes that took place at the target environment
−Does not leverage version control for more information
−Unable to deal with conflicts & merges between different teams
−Requires manual inspection
−Requires detailed knowledge regarding each change as part of the process
… …
16. Copyright 2015. Confidential – Distribution prohibited without permission
Build Server
• Impact Analysis
• Generate Delta Script
• Merge Conflicts
UAT Servers
• Execute SQL Scripts
• Run Auto Tests
Prod Servers
• Execute SQL Scripts
Binaries – Source Control
Repository
Database Source
Control Repository
Test Servers
• Execute SQL Scripts
• Run Auto Tests
In Case of Defects: Return to Dev or Fix Locally and Handle Conflicts
Development
Databases
• Enforced Source Control
• Check-In Database
Changes
Database Deployment Safety Net
17. Copyright 2015. Confidential – Distribution prohibited without permission
Database integrated version control
Plus into ALM systems
Database change Impact analysis
−Database version control
−Database change process
−Database deployment automation
−Plugs into ALM and release management for continuous delivery
18. Copyright 2015. Confidential – Distribution prohibited without permission
▪
− Force check in & out for changes
− Labels, etc.
▪
▪
▪
▪
▪
▪
20. Copyright 2015. Confidential – Distribution prohibited without permission
Source vs.
Target
Action
= No Action
≠ ?
Source vs.
Baseline
Target vs.
Baseline
Action
= = No Action
≠ = Deploy Changes
= ≠ Protect Target
≠ ≠ Merge Changes
You do not have all
of the information
Including the Baseline in the impact
analysis identifies conflicts to prevent
code overrides
Simple Compare & Sync
Baseline Aware Analysis
▪ –
21. Copyright 2015. Confidential – Distribution prohibited without permission
Development Baseline
Previous Label /
Production Golden Copy
Production
No index in baseline =>
we should protect the NEW index on production!!!
(Protect Target)
22. Copyright 2015. Confidential – Distribution prohibited without permission
BUT… If we had the index in the baseline =>
we should take it down from production…
(Deploy Change)
Development Baseline
Previous Label /
Production Golden Copy
Production
24. Copyright 2015. Confidential – Distribution prohibited without permission
▪
−Leverages version control
−Can be run as a batch process
−Integrates to ALM (labels, Continuous Integration & Delivery)
−Deals with conflicts & merges to match code agility
…
25. Copyright 2015. Confidential – Distribution prohibited without permission
– Releases can be based on schema/database, labels, objects, tasks
– Continuous Delivery Pipeline Builder
– Call DBmaestro commands from any release automation tool
– Plugins for popular tools such as Jenkins, CA Release Automation
– Builds script based on release content
– Eliminates manual editing of scripts when a release changes scope
– Includes object dependencies in correct order
26. Copyright 2015. Confidential – Distribution prohibited without permission
Define a process
Automate the process
Prevent/Alert out of process changes
27. Copyright 2015. Confidential – Distribution prohibited without permission
Select Task with Check-In Select Tasks for Deployment
28. Copyright 2015. Confidential – Distribution prohibited without permission
Scripts
Compare &
Sync Tools
TeamWork
Database Change Process √
Version Control √ √
No “Out of Process” Changes √
Automate Your Deployment √ (√) √