Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Using Redgate, AKS and Azure to bring DevOps to your Database


Published on

Join Hamish Watson and Rob Sewell to learn practical solutions on how to bring DevOps to your database, including:
• The importance of getting your database code into source control
• How to test your database changes
• Tools you can use to automate build and test processes
• How to build an automated deployment process for your database with Redgate tools
• How to embrace using Azure Kubernetes Services (AKS) in your deployment pipeline
• Deploying your entire pipeline as and when it is needed from Dev to Prod saving your organisation money
Database upgrades and data in general are often the most complicated part of your deployment process, so having a robust deployment path and checks before getting to production is very important.

The demos will showcase practical solutions that can help you and your team bring DevOps to your database using SQL Source Control, infrastructure as code, docker containers and SQL Change Automation – all leading up to a fully automated test and deployment process.

This will be a fun-filled fast paced hour and you will learn some new skills which will bring immediate benefit to your organization.

Published in: Software
  • Be the first to comment

  • Be the first to like this

Using Redgate, AKS and Azure to bring DevOps to your Database

  1. 1. Using Redgate, AKS and Azure to bring DevOps to your Database By Rob Sewell & Hamish Watson
  2. 2. Hi there, we’re… Hamish Watson Rob Sewell @sqldbawithbeard @theHybridDBA
  3. 3. Rob = Somerset, UK Hamish = Christchurch, NZ
  4. 4.
  5. 5. Agenda • How was life before DevOps? • What is this DevOps thing you talk of? • Why use Redgate tools? • Why use Azure? • Why use containers • Why use Azure Kubernetes Services
  6. 6. Database Development Cycle: • Manual • Inconsistently tested • Plagued with poor or NO source control • Slowed down by lengthy processes and daunting deployments • Application code breaks our database!!
  7. 7. “….never say the word DevOps” The first rule of DevOps……. Hamish Watson, circa 2013
  8. 8. “Let’s use our tools and create a process that allows us to automate the reliable deployment of business value to our clients.” Hamish Watson, circa 2016 #MakeStuffGo
  9. 9. Culture Automation Lean Measurement Sharing What is DevOps? #Only The Name Is New #Common business goal #Everyone working together
  10. 10. Tools The four pillars of DevOps Process People Culture
  11. 11. Enhanced customer experience DevOps Benefits Increased capacity to innovate Faster time to value
  12. 12. DevOps tools – yours might differ Issue, bug and task tracking Source control Integrated Development Environment Automated build server Automated testing Automated release
  13. 13. Ways you can start your DevOps journey 1. Source Control 2. Unit Testing 3. Infrastructure as Code 4. Continuous Integration 5. Continuous Delivery 6. Continuous Monitoring & Testing
  14. 14. Storing our database in source control The what now…?
  15. 15. Ways to get our database into Source Control (SQL Source Control)
  16. 16. Ways to get our database into Source Control (SQL Source Control)
  17. 17. Ways to get our database into Source Control (SQL Source Control)
  18. 18. Unit Testing for Databases Yeah, nah… …..that’s kinda non-existent.
  19. 19. Why we need to do unit testing The client actually wanted a ‘g’
  20. 20. Consider this application developer Skills: C#, .NET, java, PowerShell Experience: 8 years Platforms: Windows Server, Azure, AWS, docker Databases: Microsoft SQL Server, MySQL, Oracle Unit Testing: Nah, don’t really believe in it mate…. X
  21. 21. Consider this database developer Skills: T-SQL, Entity Framework, PowerShell Experience: 8 years Platforms: Windows Server, Azure, RDS Databases: Microsoft SQL Server 2000 - 2017 Unit Testing: I write beautiful stored procs mate…. P
  22. 22. Introducing tSQLt 22
  23. 23. Introducing tSQLt Open Source Database Unit Testing Framework (free!!) Write unit tests in TSQL and can be written/run in SSMS Very similar to NUnit & JUnit There are a lot of methods for asserts 23
  24. 24. Introducing tSQLt Use of fake tables/views isolates code while testing Self Contained tests – isolated transactions We can choose to run all, some or one test Tests grouped in their own schema Does require CLR – this is OK for DEV and some TEST 24
  25. 25. tSQLt is easy as to run… EXEC tsqlt.runall
  26. 26. SQL Test makes it even easier and standard..
  27. 27. Infrastructure as Code Getting what you want, how you want it, when you want it…. …with code that is.
  28. 28. Infrastructure as Code – solving inertia More of this LESS of this
  29. 29. Learn how to write in YAML…
  30. 30. Continuous, Continuous, Continuous!! Let’s do all the things… ….continuously
  31. 31. Continuous Integration “Continuous Integration (CI) is a development practice that requires developers to integrate code into a shared repository several times a day. Each check-in is then verified by an automated build, allowing teams to detect problems early. By integrating regularly, you can detect errors quickly, and fix them more easily.”
  33. 33. CI isn’t the whole story for reliable deployments Dev Dev BUILD SERVER Build testing UAT User testing PRODUCTION EXPLOSION Continuous integration 1 2 3 4 5 6 3 Months of changes Feedback on 3 Months of changes7 Wasteful rework & manual intervention8 Unit testing
  34. 34. Continuous Delivery – shifting everything left Feedback Dev Dev Build server Build tests Continuous integration Build Continuous testing Integration tests Functional tests User acceptance tests Feedback Integration Feedback Functional Feedback UAT Final test Feedback Pre prod Small iterative changes CONTINUOUS DELIVERY Feedback ‘SHIFT LEFT’ OPERATIONAL FEEDBACK PROD Continuous monitoring Unit testing CONTINUOUS MONITORING
  35. 35. Containers, Azure and AKS The Data Platform has evolved…. … have you?
  36. 36. Why move to the Cloud? • Elasticity • Pay for what you need • Fail fast • Fast time to market • Secure • Reliable • Business SLA
  37. 37. Less of this
  38. 38. More of this
  39. 39. My datacentre in the cloudMy datacentre in the cloud – all via this:
  40. 40. SQL Server 2017 • SQL Server 2017 and above can run on Linux • Which means it can now run in a container • This is quite a game changer for our industry..
  41. 41. SQL Server in containers Container Container Container Portable Run anywhere Docker is supported Lightweight Reduced disk, CPU, and memory footprint Consistent Consistent image of SQL Server, scripts, and tools Efficient Faster deployment, reduced patching, and less downtime Container configuration Database Persisted storage Switch for simple upgrades
  42. 42. Bare Metal Server Infrastructure Layer Operating System (OS) Physical Hypervisor (VMs) Containers Hypervisor Applications Guest 1 OS Guest 1 Applications Guest 2 OS Guest 2 Applications Orchestration Platform Container 1 Container 2 SAN Storage Operating System (OS) Worker Node 1 Worker Node 2 Container 1 Container 2 Orchestrated Containers Networking
  43. 43. The cake layers of Kubernetes
  44. 44. Persistent Volume Storage Kubernetes Built-in HADR orchestration with no clustering required User Shared storage HA in Kubernetes Node Pod SQL Server Node Load Balancer Service Node Pod SQL Server Pod SQL Server
  45. 45. Managed Kubernetes means less stress…
  46. 46. Making Kubernetes easier for the masses
  47. 47. This is almost too easy…
  48. 48. Bringing it all together – DevOps/Redgate/AKS
  49. 49. Bringing it all together – Continuous Integration
  50. 50. Bringing it all together – Continuous Delivery
  51. 51. Bringing it all together – Continuous Delivery
  52. 52. Summary • You need to look at DevOps for your database • Redgate make some fantastically ingenious and simple solutions to help you #MakeStuffGo • We love Azure and we love containers • Azure Kubernetes Services lets you scale out and protect your applications and database • You can use the same methods and TOOLS to play with AKS
  53. 53.
  54. 54. Questions?
  55. 55. Thank you for tuning in for our webinar!! Hamish Watson @theHybridDBA Rob Sewell @sqldbawithbeard