Download presentation
Presentation is loading. Please wait.
1
Your code is not just…your code
SQL Saturday 2016
2
Thank you to our sponsors
3
About me > > Family Work Community
4
POLL: Why are you here? Session Title Learn about
tsqlt Database Deployments There was nothing else on at the moment Any other reasons?
5
Session overview Ways to deploy to production
Why is it important to have a good release pipeline Deployment techniques Demo Time
6
What is the typical flow for releasing code?
Just do it Development Production 1 3 2 5 4 6 7 8 9 10
7
Pros and Cons of Just do it
Quick fixes Simple process Cons Risky fixes More chance of bugs being fixed and then breaking again Not easy to see what a version of a component/object was in the past Only really ever dev test Manual testing need to be repeated ever release
8
What is the typical flow for releasing code?
We use Source Control Development Production 1 2 3 6 4 5
9
Pros and Cons of We use Source Control
Bug fixes have no impact on production because they in the dev space Simple process All objects are versioned History of an object Comments for commits so you can potentially see why changes were made and by who Cons Only really ever dev test Manual testing need to be repeated ever release
10
What is the typical flow for releasing code?
Release pipeline Development Production Integration 1 2 3 6 7 5 8 9 10 11 4
11
Pros and Cons of Release pipeline
Bug fixes have no impact on production because they in the dev space Automated Builds (compile / package software and run unit tests) Integration Testing (replaces / minimizes manual testing) Deployments (repeatable which minimizes inconsistences) All objects are versioned History of an object Comments for commits so you can potentially see why changes were made and by who Fixes get to production faster with higher quality Cons “Complicated” process
12
Summary of typical flow for releasing code?
Just do it We use Source Control Release pipeline Anything else?
13
Why is a good release pipeline important?
Bugs cost you more the longer they’re there Bugs in a component with lots of technical debt Dev < Integration < QA < Staging < Production (“real money”?) Consistency Less key man reliance for getting code into production Release often and fast Improved Quality Measurable Allows you to better experiment with A/B testing
14
Deployment techniques
Manual Copy & Paste Keep changes in a script and then run in production Schema Compare ??? Automated Power Shell scripts Walk source control tree and apply changes since last release Code first* Database project generated scripts Dac Pac’s
15
Our Demo App TODO Base css template from http://todomvc.com/
ASP.net MVC with Web API for the server side Microsoft SQL Server 2016
16
DEMO Let’s see the app What does the existing code look like
tsqlt? What? Setup Team Build Create a release Add some app functionality to see it all come together
18
Links http://tsqlt.org
tSQLt Visual Studio Test Adapter blog post After all RSA SQL Saturdays there will be a blog post on that has a recording of this session for reference if wanted.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.