0
Best Practices for
Database Deployments
Grant Fritchey, Justin Caldicott
#sqlinthecity
Goals
• Understand how to create your own deployment
mechanisms
• Learn about the tools available for automation of
the de...
The Database “Problem”
• Information persistence layer
• Businesses like their data
• Keeping that data in place can be wo...
The Database “Solution”
• Treat it as much like code as possible
• Do the following
– Work directly with the development t...
Process: Team Glue
• You must define a process
– It’s your process, you define it
• Management buy-in
• Write the process ...
Development Process
Development
QA/Testing
Production
Building a Deployment Process
Development
QA/Testing
Production
Building a Deployment Process
• Production deployment script
• Test script on copy of production
• Generate script for pro...
Source Control
• Two known states
– Production
– Source Control
• Ensures coupling between application and
database
• Hist...
Demo
Testing Deployments
• ABD
– Always Be Deploying
• Unit Testing
• Continuous Integration
• Copies of production
Demo
Deploying to Multiple Environments
• Multiple moves between multiple environments
• Every deployment is practice
Deploying to Multiple Environments
• Multiple moves between multiple environments
• Every deployment is practice
Deploying to Multiple Environments
• Multiple moves between multiple environments
• Every deployment is practice
Deploying to Multiple Environments
• Multiple moves between multiple environments
• Every deployment is practice
Demo
Integrating Database with Application
• Coupled through source control
• Labeled together
• Deployed together
• Database i...
Demo
Deployment Automation
• Remove humans from the equation
• Speed the process
• Make the process repeatable
• Take advantage...
Demo
Summary
• Define a process
• Work backwards from production
• All database code in source control
• Integrate tightly with...
Goals
• Understand how to create your own deployment
mechanisms
• Learn about the tools available for automation of
the de...
Upcoming SlideShare
Loading in...5
×

Grant Fritchey Justin Caldicott - Best practices for database deployments

127

Published on

Best practices for database deployments - by Grant Fritchey and Justin Caldicott.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
127
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
6
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • Changes are made in development, then move to qa, then to production
  • Need to think about it differently, start with production and define what has to go there, then figure out how to move up to there from each preceding environment.
  • Transcript of "Grant Fritchey Justin Caldicott - Best practices for database deployments"

    1. 1. Best Practices for Database Deployments Grant Fritchey, Justin Caldicott #sqlinthecity
    2. 2. Goals • Understand how to create your own deployment mechanisms • Learn about the tools available for automation of the deployment process • Acquire the knowledge of how to test your deployments #sqlinthecity
    3. 3. The Database “Problem” • Information persistence layer • Businesses like their data • Keeping that data in place can be work – Which is the start of the “problem” • Object Relational Impedance Mismatch – Which is the rest of the “problem” 3
    4. 4. The Database “Solution” • Treat it as much like code as possible • Do the following – Work directly with the development team – Define a repeatable process – Put the database into source control – Put tests in place to validate the database – Automate as much of the process as possible • Follow the local development paradigm as much as possible 4
    5. 5. Process: Team Glue • You must define a process – It’s your process, you define it • Management buy-in • Write the process down – And publish it • Review process regularly • Follow the process – Exceptions have to be exceptional • The process applies to everyone – No, DBAs, you’re not that special 5
    6. 6. Development Process Development QA/Testing Production
    7. 7. Building a Deployment Process Development QA/Testing Production
    8. 8. Building a Deployment Process • Production deployment script • Test script on copy of production • Generate script for production from label • Label code in source control • Add changes to source control • Make changes to code • Get code from source control
    9. 9. Source Control • Two known states – Production – Source Control • Ensures coupling between application and database • History of changes • Auditing
    10. 10. Demo
    11. 11. Testing Deployments • ABD – Always Be Deploying • Unit Testing • Continuous Integration • Copies of production
    12. 12. Demo
    13. 13. Deploying to Multiple Environments • Multiple moves between multiple environments • Every deployment is practice
    14. 14. Deploying to Multiple Environments • Multiple moves between multiple environments • Every deployment is practice
    15. 15. Deploying to Multiple Environments • Multiple moves between multiple environments • Every deployment is practice
    16. 16. Deploying to Multiple Environments • Multiple moves between multiple environments • Every deployment is practice
    17. 17. Demo
    18. 18. Integrating Database with Application • Coupled through source control • Labeled together • Deployed together • Database is deployed first
    19. 19. Demo
    20. 20. Deployment Automation • Remove humans from the equation • Speed the process • Make the process repeatable • Take advantage of the tools you know
    21. 21. Demo
    22. 22. Summary • Define a process • Work backwards from production • All database code in source control • Integrate tightly with development team • Test and validate all code • Automate as much as possible
    23. 23. Goals • Understand how to create your own deployment mechanisms • Learn about the tools available for automation of the deployment process • Acquire the knowledge of how to test your deployments #sqlinthecity
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×