2. Who's this guy?
About me
‣ Giuseppe Maxia, a.k.a. "The Data Charmer"
‣ Software Explorer at VMware
‣ Several decades development and DB
experience
‣ Long timer MySQL community member.
‣ Blog: http://datacharmer.blogspot.com
‣ Twitter: @datacharmer
!2
3. Disclaimer
•None of what I say has
anything to do with my
company.
•I also don’t work for Oracle.
4. dbdeployer
• Command line tool
• No dependencies (single binary per O.S.)
• Interface similar to git, docker
• Fast!
• Runs single database, replication, group replication,
multiple deployments, multi-source replication.
• Integrated help
• Easy to extend.
https://dbdeployer.org
5. What can it do? (1)
• Install a single MySQL sandbox of ANY VERSION
• Separated from any existing MySQL server
• Completely in user space
• Reasonably isolated
• Easy to use and administer
dbdeployer deploy single 8.0
6. (Intermission)
WHY would you use it?
• Support to customers using different versions
• Consulting
• Testing of new versions
• Reporting bugs
7. What can it do? (2)
• Install a group of sandboxes
• Isolated from each other
• Without any relationship
• With binary logging active
dbdeployer deploy multiple 8.0
8. What can it do? (3)
• Install a master-slave replication cluster
• 1 master and 2 (or more) slaves
• Replication enabled
• Optional GTID
• Easy tools to run operations on all nodes at once
dbdeployer deploy replication 8.0
--topology=master-slave
9. What can it do? (4)
• Install a group replication cluster (MySQL 5.7 and 8.0)
• 3 (or more) nodes
• Single-primary or multi-primary
• Group replication configured and enabled
• Easy tools to run operations on all nodes at once
dbdeployer deploy replication 8.0
--topology=group
10. What can it do? (5)
• Install a multi-source replication cluster (MySQL 5.7-8.0)
• 3 (or more) nodes
• fan-in or all-masters topologies
• Easy tools to run operations on all nodes at once
dbdeployer deploy replication ndb7.6
--topology=fan-in # or all-masters
11. What can it do? (6)
• Install a single or multiple TiDB sandbox
dbdeployer deploy single tidb3.0.0
--client-from=5.7.25
dbdeployer deploy multiple tidb3.0.0
--client-from=5.7.25
12. What can it do? (7)
• Install a Percona XtraDB cluster (5.7)
• 3 (or more) nodes
• Easy tools to run operations on all nodes at once
dbdeployer deploy replication pxc5.7
--topology=pxc
13. What can it do? (8)
• Install a MySQL Cluster (NDB 7.6 and 8.0)
• 3 (or more) nodes
• Easy tools to run operations on all nodes at once
dbdeployer deploy replication ndb7.6
--topology=ndb
14. What can it do? (9)
• Administer sandboxes
• List available binaries
• List installed sandboxes
• start, restart (with options), stop
• check status
• test
• delete
15. What can it do? (10)
• Customize sandboxes
• Customizable initialization and database start
• Provide templates for every script
• Allow on-the-fly and permanent template replacement
• Change most of the default values
• Make sandboxes permanent (= can't be deleted)
16. What can it do? (11)
• Find free ports automatically
• Test replication flow
• Expose MySQL 8 dictionary tables
• Use semi-sync replication
• Run SQL command before and after loading grants
• enable/disable X-protocol
17. Installation (1)
1. Go to https://github.com/datacharmer/dbdeployer
2. Find releases
3. Download the binary for your O.S.
4. Put it in a directory within your $PATH
5. Run it!
26. What can it do? (12)
• List downloads for MacOS and Linux (dbdeployer 1.33.0)
• Download latest binaries directly
dbdeployer downloads list
dbdeployer downloads get mysql-5.7.26.tar.xz
dbdeployer downloads get-by version 8.0
--newest --minimal
dbdeployer downloads get-unpack
mysql-5.7.26.tar.xz
27. dbdeployer help
$ dbdeployer --help
dbdeployer makes MySQL server installation an easy task.
Runs single, multiple, and replicated sandboxes.
Usage:
dbdeployer [command]
Available Commands:
admin sandbox management tasks
cookbook Shows dbdeployer samples
defaults tasks related to dbdeployer defaults
delete delete an installed sandbox
delete-binaries delete an expanded tarball
deploy deploy sandboxes
downloads Manages remote tarballs
export Exports the command structure in JSON format
global Runs a given command in every sandbox
help Help about any command
info Shows information about dbdeployer environment samples
sandboxes List installed sandboxes
unpack unpack a tarball into the binary directory
usage Shows usage of installed sandboxes
versions List available versions
28. What else can it do? (13)
• Use MySQL 8.0 admin-port
• Replicate between sandboxes
• single/single
• Single to replication/group
• Replication to group/single
• NDB to NDB
• Upgrade a sandbox to a higher version
• Replication between sandboxes of different versions
42. `
dbdeployer uses semantic versioning (https://semver.org)
Current version: 1.33.0
Version
component
When does it change? example
major
Backward Incompatible API changes.
(Including new features)
1.21.3 => 2.0.0
minor
Backward compatible API changes.
Backward compatible new features
1.21.3 => 1.22.0
revision
Bug fixes.
Code refactoring.
No API changes
1.21.3 => 1.21.4
43. Parting thoughts
• dbdeployer is open source (Apache license)
• Contributions are welcome! (See
CONTRIBUTING.md)
https://dbdeployer.org