Skip to content
This repository has been archived by the owner on Oct 29, 2023. It is now read-only.

Commit

Permalink
Add PXC and replication features
Browse files Browse the repository at this point in the history
* Add `--change-master-options` (Issue #107)
* Add more tests
* Docker test now downloads latest 8.0 binaries instead of using built-in.
* Improve PXC handling of defaults across versions
* Fix defaults for PXC 5.6, which were broken after introducing support for PXC8.0 (Issue #106)
  • Loading branch information
datacharmer committed May 1, 2020
1 parent 0137971 commit fd7a616
Show file tree
Hide file tree
Showing 26 changed files with 2,293 additions and 712 deletions.
2 changes: 1 addition & 1 deletion .build/COMPATIBLE_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.45.0
1.49.0
2 changes: 1 addition & 1 deletion .build/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.47.0
1.49.0
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
## 1.49.0 26-Apr-2020 (not released)

### NEW FEATURES

* Add `--change-master-options` (Issue #107)

### TESTING

* Add more tests
* Docker test now downloads latest 8.0 binaries instead of using built-in.

## 1.48.0 10-Apr-2020 (not released)

* Improve PXC handling of defaults across versions
* Fix defaults for PXC 5.6, which were broken after introducing support for PXC8.0 (Issue #106)


## 1.47.0 29-Mar-2020

### ADJUSTMENTS
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ made up MySQL versions (such as 5.7.99) and make sure that dbdeployer works as e
./test/mock/short-versions.sh
./test/mock/direct-paths.sh
./test/mock/expected_ports.sh
./test/mock/read-only-replication.sh
./test/mock/replication-setup.sh
```


Expand Down
39 changes: 20 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[DBdeployer](https://github.com/datacharmer/dbdeployer) is a tool that deploys MySQL database servers easily.
This is a port of [MySQL-Sandbox](https://github.com/datacharmer/mysql-sandbox), originally written in Perl, and re-designed from the ground up in [Go](https://golang.org). See the [features comparison](https://github.com/datacharmer/dbdeployer/blob/master/docs/features.md) for more detail.

Documentation updated for version 1.45.0 (23-Feb-2020 09:11 UTC)
Documentation updated for version 1.49.0 (01-May-2020 19:28 UTC)

[![Build Status](https://travis-ci.org/datacharmer/dbdeployer.svg "Travis CI status")](https://travis-ci.org/datacharmer/dbdeployer)

Expand Down Expand Up @@ -59,7 +59,7 @@ Get the one for your O.S. from [dbdeployer releases](https://github.com/datachar

For example:

$ VERSION=1.45.0
$ VERSION=1.49.0
$ OS=linux
$ origin=https://github.com/datacharmer/dbdeployer/releases/download/v$VERSION
$ wget $origin/dbdeployer-$VERSION.$OS.tar.gz
Expand Down Expand Up @@ -162,7 +162,7 @@ For example:
The program doesn't have any dependencies. Everything is included in the binary. Calling *dbdeployer* without arguments or with ``--help`` will show the main help screen.

$ dbdeployer --version
dbdeployer version 1.45.0
dbdeployer version 1.49.0


$ dbdeployer -h
Expand Down Expand Up @@ -397,18 +397,19 @@ The ``deploy replication`` command will install a master and two or more slaves,

Flags:
-h, --help help for replication
--master-ip string Which IP the slaves will connect to (default "127.0.0.1")
--master-list string Which nodes are masters in a multi-source deployment
--ndb-nodes int How many NDB nodes will be installed (default 3)
-n, --nodes int How many nodes will be installed (default 3)
--read-only-slaves Set read-only for slaves
--repl-history-dir uses the replication directory to store mysql client history
--semi-sync Use semi-synchronous plugin
--single-primary Using single primary for group replication
--slave-list string Which nodes are slaves in a multi-source deployment
--super-read-only-slaves Set super-read-only for slaves
-t, --topology string Which topology will be installed (default "master-slave")
--change-master-options stringArray options to add to CHANGE MASTER TO
-h, --help help for replication
--master-ip string Which IP the slaves will connect to (default "127.0.0.1")
--master-list string Which nodes are masters in a multi-source deployment
--ndb-nodes int How many NDB nodes will be installed (default 3)
-n, --nodes int How many nodes will be installed (default 3)
--read-only-slaves Set read-only for slaves
--repl-history-dir uses the replication directory to store mysql client history
--semi-sync Use semi-synchronous plugin
--single-primary Using single primary for group replication
--slave-list string Which nodes are slaves in a multi-source deployment
--super-read-only-slaves Set super-read-only for slaves
-t, --topology string Which topology will be installed (default "master-slave")



Expand Down Expand Up @@ -2121,10 +2122,10 @@ Should you need to compile your own binaries for dbdeployer, follow these steps:
Between this file and [the API API list](https://github.com/datacharmer/dbdeployer/blob/master/docs/API/API-1.1.md), you have all the existing documentation for dbdeployer.
Should you need additional formats, though, dbdeployer is able to generate them on-the-fly. Tou will need the docs-enabled binaries: in the distribution list, you will find:

* dbdeployer-1.45.0-docs.linux.tar.gz
* dbdeployer-1.45.0-docs.osx.tar.gz
* dbdeployer-1.45.0.linux.tar.gz
* dbdeployer-1.45.0.osx.tar.gz
* dbdeployer-1.49.0-docs.linux.tar.gz
* dbdeployer-1.49.0-docs.osx.tar.gz
* dbdeployer-1.49.0.linux.tar.gz
* dbdeployer-1.49.0.osx.tar.gz

The executables containing ``-docs`` in their name have the same capabilities of the regular ones, but in addition they can run the *hidden* command ``tree``, with alias ``docs``.

Expand Down
1 change: 1 addition & 0 deletions cmd/replication.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,4 +143,5 @@ func init() {
replicationCmd.PersistentFlags().BoolP(globals.ReadOnlyLabel, "", false, "Set read-only for slaves")
replicationCmd.PersistentFlags().BoolP(globals.SuperReadOnlyLabel, "", false, "Set super-read-only for slaves")
replicationCmd.PersistentFlags().Bool(globals.ReplHistoryDirLabel, false, "uses the replication directory to store mysql client history")
setPflag(replicationCmd, globals.ChangeMasterOptions, "", "CHANGE_MASTER_OPTIONS", "", "options to add to CHANGE MASTER TO", true)
}
1 change: 1 addition & 0 deletions cmd/single.go
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,7 @@ func fillSandboxDefinition(cmd *cobra.Command, args []string, usingImport bool)
sd.CustomMysqld, _ = flags.GetString(globals.CustomMysqldLabel)
sd.InitOptions, _ = flags.GetStringArray(globals.InitOptionsLabel)
sd.MyCnfOptions, _ = flags.GetStringArray(globals.MyCnfOptionsLabel)
sd.ChangeMasterOptions, _ = flags.GetStringArray(globals.ChangeMasterOptions)
sd.PreGrantsSqlFile, _ = flags.GetString(globals.PreGrantsSqlFileLabel)
sd.PreGrantsSql, _ = flags.GetStringArray(globals.PreGrantsSqlLabel)
sd.PostGrantsSql, _ = flags.GetStringArray(globals.PostGrantsSqlLabel)
Expand Down
5 changes: 5 additions & 0 deletions common/capabilities.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ const (
UpgradeWithServer = "upgrade_with_server"
XtradbCluster = "xtradbCluster"
XtradbClusterNoSlaveUpdates = "xtradbCluster_no_slave_updates"
XtradbClusterEncryptCluster = "xtradbCluster_encrypt_cluster"
XtradbClusterRsync = "xtradb_cluster_rsync"
XtradbClusterXtrabackup = "xtradb_cluster_xtrabackup"
NdbCluster = "ndbCluster"
Expand Down Expand Up @@ -310,6 +311,10 @@ var PxcCapabilities = Capabilities{
Description: "XtraDB Cluster creation without log_slave_updates",
Since: globals.MinimumXtradbClusterNoSlaveUpdatesVersion,
},
XtradbClusterEncryptCluster: {
Description: "XtraDB Cluster creation with cluster encryption",
Since: globals.MinimumXtradbClusterNoSlaveUpdatesVersion,
},
XtradbClusterRsync: {
Description: "XtraDB Cluster SST method using rsync",
Since: globals.MinimumXtradbClusterRsync,
Expand Down
6 changes: 3 additions & 3 deletions common/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
package common

// This file was generated during build. Do not edit.
// Build time: 2020-03-28 15:30
// Build time: 2020-05-01 08:31

var VersionDef string = "1.47.0" // 2020-03-28
var VersionDef string = "1.49.0" // 2020-05-01

// Compatible version is the version used to mark compatible archives (templates, configuration).
// It is usually major.minor.0, except when we are at version 0.x, when
// every revision may bring incompatibility
var CompatibleVersion string = "1.45.0" // 2020-02-19
var CompatibleVersion string = "1.49.0" // 2020-05-01
Loading

0 comments on commit fd7a616

Please sign in to comment.