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

Commit

Permalink
Support for MySQL 8.0.11 and bug fixes
Browse files Browse the repository at this point in the history
ADJUSTMENTS:
- Added support for mysqlx plugin being enabled by default (MySQL 8.0.11+)
- Added flag "--disable-mysqlx" to disable mysqlx plugin (8.0.11+)
NEW FEATURES:
- Added scripts use_all_masters and use_all_slaves to all replication
  sandboxes.
- Added option --verbosity={0,1,2} to *unpack* command.
BUGS FIXED:
        - Fixed Issue#10 "dbdeployer unpack does not handle symlinks"
        - Fixed minor bug in documentation test builder.
TESTING
- Added tests for number of ports, log errors, use_all_masters,
  use_all_slaves, running processes.
- Added options to stop tests after a given set of operations.
- Removed restriction on running 5.6 tests in docker for Mac.
  • Loading branch information
datacharmer committed Apr 20, 2018
1 parent 77f1831 commit 97c96fe
Show file tree
Hide file tree
Showing 23 changed files with 1,097 additions and 48 deletions.
16 changes: 16 additions & 0 deletions Changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
1.3.0 21-Apr-2018
ADJUSTMENTS:
- Added support for mysqlx plugin being enabled by default (MySQL 8.0.11+)
- Added flag "--disable-mysqlx" to disable mysqlx plugin (8.0.11+)
NEW FEATURES:
- Added scripts use_all_masters and use_all_slaves to all replication
sandboxes.
- Added option --verbosity={0,1,2} to *unpack* command.
BUGS FIXED:
- Fixed Issue#10 "dbdeployer unpack does not handle symlinks"
- Fixed minor bug in documentation test builder.
TESTING
- Added tests for number of ports, log errors, use_all_masters,
use_all_slaves, running processes.
- Added options to stop tests after a given set of operations.
- Removed restriction on running 5.6 tests in docker for Mac.
1.2.0 14-Apr-2018
- Added option --skip-start
- Added report-port and report-host automatically to my.sandbox.cnf
Expand Down
26 changes: 15 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,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.2.0 (14-Apr-2018 18:27 UTC)
Documentation updated for version 1.3.0 (20-Apr-2018 21:22 UTC)

## Installation

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

For example:

$ VERSION=1.2.0
$ VERSION=1.3.0
$ origin=https://github.com/datacharmer/dbdeployer/releases/download/$VERSION
$ wget $origin/dbdeployer-$VERSION.linux.tar.gz
$ tar -xzf dbdeployer-$VERSION.linux.tar.gz
Expand Down Expand Up @@ -47,7 +47,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.2.0
dbdeployer version 1.3.0


$ dbdeployer -h
Expand Down Expand Up @@ -114,6 +114,7 @@ If you don't have any tarballs installed in your system, you should first ``unpa
-h, --help help for unpack
--prefix string Prefix for the final expanded directory
--unpack-version string which version is contained in the tarball
--verbosity int Level of verbosity during unpack (0=none, 2=maximum) (default 1)



Expand All @@ -138,6 +139,7 @@ The easiest command is ``deploy single``, which installs a single sandbox.
-p, --db-password string database password (default "msandbox")
-u, --db-user string database user (default "msandbox")
--defaults strings Change defaults on-the-fly (--defaults=label:value)
--disable-mysqlx Disable MySQLX plugin (8.0.11+)
--expose-dd-tables In MySQL 8.0+ shows data dictionary tables
--force If a destination sandbox already exists, it will be overwritten
--gtid enables GTID
Expand Down Expand Up @@ -369,7 +371,7 @@ Here's how:
$ dbdeployer defaults show
# Internal values:
{
"version": "1.2.0",
"version": "1.3.0",
"sandbox-home": "$HOME/sandboxes",
"sandbox-binary": "$HOME/opt/mysql",
"use-sandbox-catalog": true,
Expand Down Expand Up @@ -399,7 +401,7 @@ Here's how:
# Updated master-slave-base-port -> "15000"
# Configuration file: $HOME/.dbdeployer/config.json
{
"version": "1.2.0",
"version": "1.3.0",
"sandbox-home": "$HOME/sandboxes",
"sandbox-binary": "$HOME/opt/mysql",
"use-sandbox-catalog": true,
Expand Down Expand Up @@ -497,6 +499,8 @@ The command "usage" shows how to use the scripts that were installed with each s
restart_all
stop_all
use_all
use_all_masters
use_all_slaves
clear_all
m
s1, s2, n1, n2
Expand Down Expand Up @@ -579,18 +583,18 @@ Should you need to compile your own binaries for dbdeployer, follow these steps:
2. Run ``go get github.com/datacharmer/dbdeployer``. This will import all the code that is needed to build dbdeployer.
3. Change directory to ``$GOPATH/src/github.com/datacharmer/dbdeployer``.
4. From the folder ``./pflag``, copy the file ``string_slice.go`` to ``$GOPATH/src/github.com/spf13/pflag``.
5. Run ``./build.sh {linux|OSX} 1.2.0``
6. If you need the docs enabled binaries (see the section "Generating additional documentation") run ``MKDOCS=1 ./build.sh {linux|OSX} 1.2.0``
5. Run ``./build.sh {linux|OSX} 1.3.0``
6. If you need the docs enabled binaries (see the section "Generating additional documentation") run ``MKDOCS=1 ./build.sh {linux|OSX} 1.3.0``

## Generating additional documentation

Between this file and [the API API list](https://github.com/datacharmer/dbdeployer/blob/master/docs/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.2.0-docs.linux.tar.gz
* dbdeployer-1.2.0-docs.osx.tar.gz
* dbdeployer-1.2.0.linux.tar.gz
* dbdeployer-1.2.0.osx.tar.gz
* dbdeployer-1.3.0-docs.linux.tar.gz
* dbdeployer-1.3.0-docs.osx.tar.gz
* dbdeployer-1.3.0.linux.tar.gz
* dbdeployer-1.3.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/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ func init() {
deployCmd.PersistentFlags().Bool("keep-server-uuid", false, "Does not change the server UUID")
deployCmd.PersistentFlags().Bool("force", false, "If a destination sandbox already exists, it will be overwritten")
deployCmd.PersistentFlags().Bool("skip-start", false, "Does not start the database server")
deployCmd.PersistentFlags().Bool("disable-mysqlx", false, "Disable MySQLX plugin (8.0.11+)")
deployCmd.PersistentFlags().Bool("skip-load-grants", false, "Does not load the grants")
deployCmd.PersistentFlags().Bool("skip-report-host", false, "Does not include report host in my.sandbox.cnf")
deployCmd.PersistentFlags().Bool("skip-report-port", false, "Does not include report port in my.sandbox.cnf")
Expand Down
1 change: 1 addition & 0 deletions cmd/single.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ func FillSdef(cmd *cobra.Command, args []string) sandbox.SandboxDef {
}
sd.SkipReportHost, _ = flags.GetBool("skip-report-host")
sd.SkipReportPort, _ = flags.GetBool("skip-report-port")
sd.DisableMysqlX, _ = flags.GetBool("disable-mysqlx")
sd.DbUser, _ = flags.GetString("db-user")
sd.DbPassword, _ = flags.GetString("db-password")
sd.RplUser, _ = flags.GetString("rpl-user")
Expand Down
6 changes: 4 additions & 2 deletions cmd/unpack.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import (
func UnpackTarball(cmd *cobra.Command, args []string) {
flags := cmd.Flags()
Basedir, _ := flags.GetString("sandbox-binary")
verbosity, _ := flags.GetInt("verbosity")
if !common.DirExists(Basedir) {
fmt.Printf("Directory %s does not exist.\n", Basedir)
fmt.Println("You should create it or provide an alternate base directory using --sandbox-binary")
Expand Down Expand Up @@ -70,8 +71,8 @@ func UnpackTarball(cmd *cobra.Command, args []string) {
}

fmt.Printf("Unpacking tarball %s to %s\n", tarball, common.ReplaceLiteralHome(destination))
verbosity_level := unpack.VERBOSE
err := unpack.UnpackTar(tarball, Basedir, verbosity_level)
//verbosity_level := unpack.VERBOSE
err := unpack.UnpackTar(tarball, Basedir, verbosity)
if err != nil {
fmt.Println(err)
os.Exit(1)
Expand Down Expand Up @@ -115,6 +116,7 @@ If there is already an expanded tarball with the same version, a new one can be
func init() {
rootCmd.AddCommand(unpackCmd)

unpackCmd.PersistentFlags().Int("verbosity", 1, "Level of verbosity during unpack (0=none, 2=maximum)")
unpackCmd.PersistentFlags().String("unpack-version", "", "which version is contained in the tarball")
unpackCmd.PersistentFlags().String("prefix", "", "Prefix for the final expanded directory")
}
2 changes: 2 additions & 0 deletions cmd/usage.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ status_all
restart_all
stop_all
use_all
use_all_masters
use_all_slaves
clear_all
m
s1, s2, n1, n2
Expand Down
4 changes: 2 additions & 2 deletions common/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@

package common

var VersionDef string = "1.2.0" // 2018-04-14
var VersionDef string = "1.3.0" // 2018-04-15

// 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.2.0" // 2018-04-14
var CompatibleVersion string = "1.3.0" // 2018-04-15
Loading

0 comments on commit 97c96fe

Please sign in to comment.