Re: How do manage running queries across multiple DB servers?
Don Marti <[email protected]> Fri, 2 Nov 2018 11:07:04 -0700
| Newsgroups | gmane.org.user-groups.linux.svlug |
|---|---|
| Message-ID | <[email protected]> |
Can you make the setup "idempotent" so that running your setup script more than once will have the same result as running it once? That will help you no matter what method you use to deploy. (If the script runs with the database already set up, just have it print a happy message and exit). If all the setup commands are in one transaction you can avoid the hard-to-troubleshoot situation of a partly set up database. If it's all in one script that runs one transaction then it's easier to make sense of when you run it from Puppet later. On 11/02/2018 09:40 AM, Robert Freiberger wrote: > Hello, > > Currently, at my workplace, we have multiple MySQL instances running where > they have databases for certain functions. During a deploy, we need to > manually SSH into the server and run these queries (stored as SQL files, > about 10~25 lines long queries that make table/field changes) manually > using the source command. > > The entire process is very error-prone and time-consuming, to say the > least. While we have some tools written in house, I was exploring other > options of maybe using Puppet to store the queries in a new "deploy module" > and have these deployed but I like to hear from the team on suggested > methods. > > I'm new to the world of database administration and any comments are > greatly welcomed. > > Thank you, > Robert > > > > _______________________________________________ > svlug mailing list > [email protected] > http://lists.svlug.org/lists/listinfo/svlug >