Re: How do manage running queries across multiple DB servers?
Sarah Newman <[email protected]> Fri, 2 Nov 2018 09:56:52 -0700
| Newsgroups | gmane.org.user-groups.linux.svlug |
|---|---|
| Message-ID | <[email protected]> |
On 11/2/18 9: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. Puppet is meant for configuration management and it sounds like maybe you need an orchestration tool instead. In that case look at ansible. You can write modules for it in any language, so it may be less work to go from what you have now to something repeatable. I gave a talk at SVLUG about it and can dig up the slides if you're interested, though it applies to a much older version and the syntax has changed significantly. --Sarah