SlideShare uma empresa Scribd logo
1 de 44
MANAGING
DATABASES
WITH CHEF
Michael Hedgpeth, NCR
2
About NCR :: Pioneered Cash Register
3
About NCR :: Hospitality
6/2/2015 4
NCR’s Biggest Challenge ::
High Availability With A Side Of
Fries
 2008: Darkness
 Automation and CI not
enough
 Influence Deployment
and Delivery
 Blog at hedge-
ops.com
 Married to a
photographer
5
About me :: Michael Hedgpeth
6
But what about the
databases?
Answer was: Snowflakes
7
The Database Question
Answer: Simple and
Repeatable approach
8
The Database Question
9
Problem
Scope
::
 Installing Databases  Backup & Restore
 Schema Management Database Configuration
NCR Confidential 10
Problem
Scope ::
Installing
Databases
Problem
Scope ::
Backup &
Restore
11
Problem
Scope ::
Schema
Management
12
Problem
Scope ::
Database
Configuratio
n
13
Schema Management
14
Our new process will be consistent
BUT we are in debt with our old process
We’ve made schema consistency a separate initiative
REDGATE is a great start to this effort
6/2/2015 15
Schema Consistency Is Separate
16
Our Schema Management Strategy ::
Don’t reinvent the wheel
17
Our Schema Management Strategy ::
Make It Chef-Friendly
18
Requirements ::
Persisted in the
database
19
Requirements ::
Knows if changes
are required
20
Requirements ::
Execute those
changes
21
Requirements ::
Accessible through
Automation
22
Application: http://bit.ly/1DqxTz5
Cookbook: http://bit.ly/1NBc5BP
Supermarket: http://bit.ly/1Dqy3qa
23
Introducing…
The Database
Upgrader
24
Requirements ::
Persisted
25
Requirements ::
Persisted
26
Requirements ::
Persisted
27
Requirements ::
Changes
28
Requirements ::
Executes
29
Requirements ::
Resource
30
Requirements ::
Resource
31
Requirements ::
Resource
32
Requirements ::
Resource
33
Requirements ::
Missed
34
Challenges :: Long-running updates
35
Challenges :: Internal vs. External
changes
36
Database Configuration
Add Linked
Server
Memory in
SQL Server
Accept RPC
call
37
Strategy
Matters
When
Gaining
Allies
::
 Other Nodes  Preproduction
 Cattle, Not Pets  Culturally Automated
Strategy Matters :: Other Nodes
38
Strategy Matters :: Preproduction
39
Strategy Matters :: Cattle, Not Pets
40
Strategy Matters :: Culturally Automated
41
NCR Confidential6/2/2015 42
Epiphany
What else?
43
6/2/2015 44

Mais conteúdo relacionado

Mais de Chef

Mais de Chef (20)

Habitat Managed Chef
Habitat Managed ChefHabitat Managed Chef
Habitat Managed Chef
 
Automation, Audits, and Apps Tour
Automation, Audits, and Apps TourAutomation, Audits, and Apps Tour
Automation, Audits, and Apps Tour
 
Automation, Audits, and Apps Tour
Automation, Audits, and Apps TourAutomation, Audits, and Apps Tour
Automation, Audits, and Apps Tour
 
Compliance Automation Workshop
Compliance Automation WorkshopCompliance Automation Workshop
Compliance Automation Workshop
 
London Community Summit 2016 - Adopting Chef Compliance
London Community Summit 2016 - Adopting Chef ComplianceLondon Community Summit 2016 - Adopting Chef Compliance
London Community Summit 2016 - Adopting Chef Compliance
 
Learning from Configuration Management
Learning from Configuration Management Learning from Configuration Management
Learning from Configuration Management
 
London Community Summit 2016 - Fresh New Chef Stuff
London Community Summit 2016 - Fresh New Chef StuffLondon Community Summit 2016 - Fresh New Chef Stuff
London Community Summit 2016 - Fresh New Chef Stuff
 
London Community Summit - Chef at SkyBet
London Community Summit - Chef at SkyBetLondon Community Summit - Chef at SkyBet
London Community Summit - Chef at SkyBet
 
London Community Summit - From Contribution to Authorship
London Community Summit - From Contribution to AuthorshipLondon Community Summit - From Contribution to Authorship
London Community Summit - From Contribution to Authorship
 
London Community Summit 2016 - Chef Automate
London Community Summit 2016 - Chef AutomateLondon Community Summit 2016 - Chef Automate
London Community Summit 2016 - Chef Automate
 
London Community Summit 2016 - Community Update
London Community Summit 2016 - Community UpdateLondon Community Summit 2016 - Community Update
London Community Summit 2016 - Community Update
 
London Community Summit 2016 - Habitat
London Community Summit 2016 -  HabitatLondon Community Summit 2016 -  Habitat
London Community Summit 2016 - Habitat
 
Compliance Automation with Inspec Part 4
Compliance Automation with Inspec Part 4Compliance Automation with Inspec Part 4
Compliance Automation with Inspec Part 4
 
Compliance Automation with Inspec Part 3
Compliance Automation with Inspec Part 3Compliance Automation with Inspec Part 3
Compliance Automation with Inspec Part 3
 
Compliance Automation with Inspec Part 2
Compliance Automation with Inspec Part 2Compliance Automation with Inspec Part 2
Compliance Automation with Inspec Part 2
 
Compliance Automation with Inspec Part 1
Compliance Automation with Inspec Part 1Compliance Automation with Inspec Part 1
Compliance Automation with Inspec Part 1
 
Application Automation with Habitat
Application Automation with HabitatApplication Automation with Habitat
Application Automation with Habitat
 
Achieving DevOps Success with Chef Automate
Achieving DevOps Success with Chef AutomateAchieving DevOps Success with Chef Automate
Achieving DevOps Success with Chef Automate
 
Nike pop up habitat
Nike pop up   habitatNike pop up   habitat
Nike pop up habitat
 
Nike popup compliance workshop
Nike popup compliance workshopNike popup compliance workshop
Nike popup compliance workshop
 

Último

Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Último (20)

ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 

Managing Databases with Chef - ChefConf 2015

Notas do Editor

  1. Who I am: and I’m Michael Hedgpeth from NCR Brief Problem Overview: Databases are a key part of our infrastructure, but nobody talks about them! I’d like to lay a foundation that will get us to start talking about it Outline: Context Requirements Example Strategy
  2. Context :: NCR We invented the cash register 131 years ago We are reinventing ourselves into a hardware-driven software company
  3. I work within the Hospitality division of NCR which mainly focuses on providing technology solutions for restaurants globally.
  4. Our biggest challenge is: High availability with a side of fries – What happens when we’re ringing someone up and they spill a coke on the terminal? Each transaction is vital - failover Rapidly change out physical components quickly Deal with an unsafe world
  5. Tell My Story: Remember 2008 when the world was going to end? We wanted to automate build and test – did so with TeamCity as our core It wasn’t enough Biggest constraint: deployment and delivery Blog plug Annie Plug
  6. In 2014 we wanted to automate configuration management of our hosted products in the DC and engaged Chef for a division-wide automation initiative
  7. Story: Daniel’s first question (Windows, PostgreSQL, hadoop) Snowflakes: frustrated me because it felt like we were supposed to figure it out on our own felt like Karate Kid
  8. After doing the investigation, though, the database question has Simple solutions that apply to many different situations It’s more than just snowflakes So when I decided to go to ChefConf, I wrote the organizer that this is a session that I wanted to attend, and if they weren’t providing it, I would give it.
  9. When people ask the database question, they’re talking about one of four things
  10. How do we manage virtual images for creating new database nodes? We already solve this in other ways We could use chef for this, but it’s not important to us right now
  11. How do we do backup and restore? – this is already solved by Red Gate Backup
  12. How do we do schema management? – this should be already solved, but we’ll need to focus on this some more
  13. How do we configure the database itself once it is installed? – this should be already solved but we’ll need to focus on this some more So we’ll talk about the last two
  14. A majority of the session will be about schema management
  15. Before we do, let’s talk about what we aren’t talking about first. We want to create a repeatable schema management solution going forward. But what do you do about the past bad behavior that has created schema inconsistency? We need to deal with that separately. We’ll use a tool like REDGATE to ferret out differences in schemas and solve them. We’re not going to use Chef to discover differences in schemas, because that’s not what Chef is great at. Schema consistency issues, when they exist, have become separate but complementary initiatives to chef.
  16. Our strategy for schema management is simple: Let’s not reinvent the wheel. If a team has a schema management approach that fits our requirements, we let them keep that approach. If not, we’ll make minor improvements to the approach to fit the requirements I’ll share in a few moments.
  17. We really want to make existing solutions Chef friendly. And this has proven to be remarkably simple.
  18. Our requirements are simple: We need for all actions related to schema management to be persisted within the database itself. This lets you check a database and see what has happened It lets you restore a backup and then apply an update seamlessly It’s just easier
  19. We need to run something that knows if a change is needed Just like chef – it applies to databases too
  20. We need to execute those changes
  21. We need to run it within a recipe in an idempotent way
  22. This book is awesome It breaks down reading into composable pieces And reproduces it over and over again And then my son gets a reading rainbow cake That’s pretty much what we’re going to do Except the cake is awesome automation
  23. Let’s look at a sample application that fits these requirements Available now on github and the chef supermarket Also look at my blog for links: hedge-ops.com
  24. A Version table within the database keeps track of what has run against the database We measure everything just as we do with software in the database It’s natural to persist stuff in the database!
  25. Create a scripts folder with sql files where the name is equal to the version number.
  26. The application can initialize this table within the database, and a resource within the cookbook ensures that the table is there and ready to go.
  27. We need to run something that knows if a change is needed
  28. We need to execute those changes
  29. We need to run it within a recipe in an idempotent way And we’re going to use John Keiser’s awesome resource cookbook!
  30. We need to run it within a recipe in an idempotent way
  31. We need to run it within a recipe in an idempotent way
  32. We need to run it within a recipe in an idempotent way
  33. Before you put it in production, know these things: It’s only for SQL Server It’s not transactional, so failures will leave you in a bad state Use it as a starting point for ideas
  34. Before we finish the topic of schema management, let’s talk about a couple of challenges we’ve faced when planning out schema management for all of our products. Story: flagship product, thousands of databases on hundreds of nodes – all upgraded at once – with Scott Analytics will tell us, but we need real time – we use these tools for certain things but need a tighter time resolution What to do if the internal team does a lot of changes but wants to limit the changes available to external teams? Have a major/minor version! (image – internal/external, maybe a doorway) Analytics will tell us, but we need real time – we use these tools for certain things but need a tigher time resolution
  35. Story: Mike manages dozens of schema changes a month in every release. How does he manage it?
  36. Configuration Management boils down to database engine configuration, which is limited
  37. At first we think that database people will be the most resistant to change That hasn’t been my experience They are my biggest allies, and here’s how I’ve made it this way
  38. We’re going to make the other nodes in the system better, which will make the database easier to manage.
  39. It’s easier to create a preproduction environment that models production. A lot of that comes down to cost of time, and we are lowering that through automation
  40. The servers in the infrastructure make a transition from pets that we love adore and know the names of, to cattle. This gives them more flexibility to changing their solution based on changing technology
  41. The servers in the infrastructure make a transition from pets that we love adore and know the names of, to cattle. This gives them more flexibility to changing their solution based on changing technology
  42. I got frustrated about snowflakes But now I know what it was about: Chef is a framework that combines existing solutions with new capabilities I don’t have to wait around for the right answer I can create our right answer With applications and with the database
  43. Let’s keep talking about this; I know there’s more to discuss.