From f7c1db03b886eec0e663bb73e587f964eac0d3b3 Mon Sep 17 00:00:00 2001 From: Morgan Tocker Date: Fri, 3 Jan 2020 14:18:46 -0700 Subject: [PATCH 1/4] Embed mycnf files and init_db Signed-off-by: Morgan Tocker --- .gitignore | 3 + Makefile | 7 +- examples/local/203_vertical_split.sh | 2 +- examples/local/303_horizontal_split.sh | 2 +- examples/local/etcd-up.sh | 2 +- examples/local/vtctld-up.sh | 2 +- examples/local/vtgate-up.sh | 2 +- examples/local/vttablet-down.sh | 2 +- examples/local/vttablet-up.sh | 8 +- examples/local/vtworker-up.sh | 2 +- examples/local/zk-down.sh | 2 +- examples/local/zk-up.sh | 4 +- go/vt/mysqlctl/mycnf_gen.go | 17 +---- go/vt/mysqlctl/mycnf_test.go | 18 ++--- go/vt/mysqlctl/mysqld.go | 100 ++++++++++++------------- 15 files changed, 79 insertions(+), 94 deletions(-) diff --git a/.gitignore b/.gitignore index be8fe727562..c4a1981a925 100644 --- a/.gitignore +++ b/.gitignore @@ -85,3 +85,6 @@ releases /vthook/ /bin/ /vtdataroot/ + +# Ricebox file +go/vt/mysqlctl/rice-box.go diff --git a/Makefile b/Makefile index e8730a29ed5..4e812996ef4 100644 --- a/Makefile +++ b/Makefile @@ -43,12 +43,17 @@ embed_static: go run github.com/GeertJohan/go.rice/rice embed-go go build . +embed_config: + cd go/vt/mysqlctl + go run github.com/GeertJohan/go.rice/rice embed-go + go build . + build_web: echo $$(date): Building web artifacts cd web/vtctld2 && ng build -prod cp -f web/vtctld2/src/{favicon.ico,plotly-latest.min.js,primeui-ng-all.min.css} web/vtctld2/dist/ -build: +build: embed_config ifndef NOBANNER echo $$(date): Building source tree endif diff --git a/examples/local/203_vertical_split.sh b/examples/local/203_vertical_split.sh index 99c927dd464..5429430f052 100755 --- a/examples/local/203_vertical_split.sh +++ b/examples/local/203_vertical_split.sh @@ -27,7 +27,7 @@ script_root=$(dirname "${BASH_SOURCE}") source "$script_root/env.sh" # shellcheck disable=SC2086 -"$VTROOT"/bin/vtworker \ +vtworker \ $TOPOLOGY_FLAGS \ -cell zone1 \ -log_dir "$VTDATAROOT"/tmp \ diff --git a/examples/local/303_horizontal_split.sh b/examples/local/303_horizontal_split.sh index d53be175c98..ea1d9285fc4 100755 --- a/examples/local/303_horizontal_split.sh +++ b/examples/local/303_horizontal_split.sh @@ -27,7 +27,7 @@ script_root=$(dirname "${BASH_SOURCE}") source "${script_root}/env.sh" # shellcheck disable=SC2086 -"$VTROOT"/bin/vtworker \ +vtworker \ $TOPOLOGY_FLAGS \ -cell zone1 \ -log_dir "$VTDATAROOT"/tmp \ diff --git a/examples/local/etcd-up.sh b/examples/local/etcd-up.sh index 36cd4269565..0e87537f0b0 100755 --- a/examples/local/etcd-up.sh +++ b/examples/local/etcd-up.sh @@ -46,7 +46,7 @@ etcdctl --endpoints "http://${ETCD_SERVER}" mkdir /vitess/$cell & echo "add $cell CellInfo" set +e # shellcheck disable=SC2086 -"${VTROOT}"/bin/vtctl $TOPOLOGY_FLAGS AddCellInfo \ +vtctl $TOPOLOGY_FLAGS AddCellInfo \ -root /vitess/$cell \ -server_address "${ETCD_SERVER}" \ $cell diff --git a/examples/local/vtctld-up.sh b/examples/local/vtctld-up.sh index 34c0055d269..b1965e06baf 100755 --- a/examples/local/vtctld-up.sh +++ b/examples/local/vtctld-up.sh @@ -33,7 +33,7 @@ fi echo "Starting vtctld..." # shellcheck disable=SC2086 -$VTROOT/bin/vtctld \ +vtctld \ $TOPOLOGY_FLAGS \ -cell $cell \ -workflow_manager_init \ diff --git a/examples/local/vtgate-up.sh b/examples/local/vtgate-up.sh index 4cd155018be..e4fb1dd5c10 100755 --- a/examples/local/vtgate-up.sh +++ b/examples/local/vtgate-up.sh @@ -70,7 +70,7 @@ fi # Start vtgate. # shellcheck disable=SC2086 -$VTROOT/bin/vtgate \ +vtgate \ $TOPOLOGY_FLAGS \ -log_dir $VTDATAROOT/tmp \ -log_queries_to_file $VTDATAROOT/tmp/vtgate_querylog.txt \ diff --git a/examples/local/vttablet-down.sh b/examples/local/vttablet-down.sh index f73f3f4b087..44aae662bd0 100755 --- a/examples/local/vttablet-down.sh +++ b/examples/local/vttablet-down.sh @@ -40,7 +40,7 @@ for uid_index in $uids; do wait_pids="$wait_pids $pid" echo "Stopping MySQL for tablet $alias..." - $VTROOT/bin/mysqlctl \ + mysqlctl \ -tablet_uid $uid \ shutdown & done diff --git a/examples/local/vttablet-up.sh b/examples/local/vttablet-up.sh index b459a3ab8ec..4914a65493b 100755 --- a/examples/local/vttablet-up.sh +++ b/examples/local/vttablet-up.sh @@ -36,8 +36,6 @@ fi script_root=`dirname "${BASH_SOURCE}"` source $script_root/env.sh -init_db_sql_file="$VTROOT/config/init_db.sql" - mkdir -p $VTDATAROOT/backups # Start 3 vttablets by default. @@ -65,7 +63,7 @@ for uid_index in $uids; do export TABLET_TYPE=$tablet_type echo "Starting MySQL for tablet $alias..." - action="init -init_db_sql_file $init_db_sql_file" + action="init" if [ -d $VTDATAROOT/$tablet_dir ]; then echo "Resuming from existing vttablet dir:" echo " $VTDATAROOT/$tablet_dir" @@ -74,7 +72,7 @@ for uid_index in $uids; do set +e - $VTROOT/bin/mysqlctl \ + mysqlctl \ -log_dir $VTDATAROOT/tmp \ -tablet_uid $uid \ -mysql_port $mysql_port \ @@ -119,7 +117,7 @@ for uid_index in $uids; do echo "Starting vttablet for $alias..." # shellcheck disable=SC2086 - $VTROOT/bin/vttablet \ + vttablet \ $TOPOLOGY_FLAGS \ -log_dir $VTDATAROOT/tmp \ -log_queries_to_file $VTDATAROOT/tmp/$tablet_logfile \ diff --git a/examples/local/vtworker-up.sh b/examples/local/vtworker-up.sh index 520ee89de78..ec1a4e5ec41 100755 --- a/examples/local/vtworker-up.sh +++ b/examples/local/vtworker-up.sh @@ -23,7 +23,7 @@ script_root=`dirname "${BASH_SOURCE}"` source $script_root/env.sh echo "Starting vtworker..." -exec $VTROOT/bin/vtworker \ +vtworker \ $TOPOLOGY_FLAGS \ -cell $cell \ -log_dir $VTDATAROOT/tmp \ diff --git a/examples/local/zk-down.sh b/examples/local/zk-down.sh index aa8e29dba4d..bd6cffd0f7b 100755 --- a/examples/local/zk-down.sh +++ b/examples/local/zk-down.sh @@ -24,6 +24,6 @@ source $script_root/env.sh # Stop ZooKeeper servers. echo "Stopping zk servers..." for zkid in $zkids; do - $VTROOT/bin/zkctl -zk.myid $zkid -zk.cfg $zkcfg -log_dir $VTDATAROOT/tmp shutdown + zkctl -zk.myid $zkid -zk.cfg $zkcfg -log_dir $VTDATAROOT/tmp shutdown done diff --git a/examples/local/zk-up.sh b/examples/local/zk-up.sh index 76c134583c7..39585320f5b 100755 --- a/examples/local/zk-up.sh +++ b/examples/local/zk-up.sh @@ -35,7 +35,7 @@ for zkid in $zkids; do echo " $VTDATAROOT/$zkdir" action='start' fi - $VTROOT/bin/zkctl -zk.myid $zkid -zk.cfg $zkcfg -log_dir $VTDATAROOT/tmp $action \ + zkctl -zk.myid $zkid -zk.cfg $zkcfg -log_dir $VTDATAROOT/tmp $action \ > $VTDATAROOT/tmp/zkctl_$zkid.out 2>&1 & pids[$zkid]=$! done @@ -56,7 +56,7 @@ echo "Started zk servers." # If the node already exists, it's fine, means we used existing data. set +e # shellcheck disable=SC2086 -$VTROOT/bin/vtctl $TOPOLOGY_FLAGS AddCellInfo \ +vtctl $TOPOLOGY_FLAGS AddCellInfo \ -root /vitess/$cell \ -server_address $ZK_SERVER \ $cell diff --git a/go/vt/mysqlctl/mycnf_gen.go b/go/vt/mysqlctl/mycnf_gen.go index eda6b5d6f48..5a89ebc614b 100644 --- a/go/vt/mysqlctl/mycnf_gen.go +++ b/go/vt/mysqlctl/mycnf_gen.go @@ -22,7 +22,6 @@ import ( "bytes" "crypto/rand" "fmt" - "io/ioutil" "math/big" "path" "text/template" @@ -121,19 +120,9 @@ func (cnf *Mycnf) directoryList() []string { } } -// makeMycnf will join cnf files cnfPaths and substitute in the right values. -func (cnf *Mycnf) makeMycnf(cnfFiles []string) (string, error) { - myTemplateSource := new(bytes.Buffer) - myTemplateSource.WriteString("[mysqld]\n") - for _, path := range cnfFiles { - data, dataErr := ioutil.ReadFile(path) - if dataErr != nil { - return "", dataErr - } - myTemplateSource.WriteString("## " + path + "\n") - myTemplateSource.Write(data) - } - return cnf.fillMycnfTemplate(myTemplateSource.String()) +// makeMycnf will substitute values +func (cnf *Mycnf) makeMycnf(partialcnf string) (string, error) { + return cnf.fillMycnfTemplate(partialcnf) } // fillMycnfTemplate will fill in the passed in template with the values diff --git a/go/vt/mysqlctl/mycnf_test.go b/go/vt/mysqlctl/mycnf_test.go index 59c4247eacb..3412e56c57b 100644 --- a/go/vt/mysqlctl/mycnf_test.go +++ b/go/vt/mysqlctl/mycnf_test.go @@ -17,34 +17,29 @@ limitations under the License. package mysqlctl import ( + "bytes" "io/ioutil" "os" - "path" "strings" "testing" "vitess.io/vitess/go/vt/dbconfigs" - "vitess.io/vitess/go/vt/env" "vitess.io/vitess/go/vt/servenv" ) var MycnfPath = "/tmp/my.cnf" func TestMycnf(t *testing.T) { - os.Setenv("MYSQL_FLAVOR", "MariaDB") uid := uint32(11111) cnf := NewMycnf(uid, 6802) + myTemplateSource := new(bytes.Buffer) + myTemplateSource.WriteString("[mysqld]\n") // Assigning ServerID to be different from tablet UID to make sure that there are no // assumptions in the code that those IDs are the same. cnf.ServerID = 22222 - root, err := env.VtRoot() - if err != nil { - t.Errorf("err: %v", err) - } - cnfTemplatePaths := []string{ - path.Join(root, "config/mycnf/default.cnf"), - } - data, err := cnf.makeMycnf(cnfTemplatePaths) + f, _ := ioutil.ReadFile("../../../config/mycnf/default.cnf") + myTemplateSource.Write(f) + data, err := cnf.makeMycnf(myTemplateSource.String()) if err != nil { t.Errorf("err: %v", err) } else { @@ -85,7 +80,6 @@ func TestMycnf(t *testing.T) { // 4. \rm $VTROOT/vthook/make_mycnf // 5. Add No Prefix back func NoTestMycnfHook(t *testing.T) { - os.Setenv("MYSQL_FLAVOR", "MariaDB") uid := uint32(11111) cnf := NewMycnf(uid, 6802) // Assigning ServerID to be different from tablet UID to make sure that there are no diff --git a/go/vt/mysqlctl/mysqld.go b/go/vt/mysqlctl/mysqld.go index 4f18809c04b..645fc4ef443 100644 --- a/go/vt/mysqlctl/mysqld.go +++ b/go/vt/mysqlctl/mysqld.go @@ -41,6 +41,8 @@ import ( "sync" "time" + rice "github.com/GeertJohan/go.rice" + "golang.org/x/net/context" "vitess.io/vitess/go/mysql" "vitess.io/vitess/go/stats" @@ -70,8 +72,7 @@ var ( poolDynamicHostnameResolution = flag.Duration("pool_hostname_resolve_interval", 0, "if set force an update to all hostnames and reconnect if changed, defaults to 0 (disabled)") - socketFile = flag.String("mysqlctl_socket", "", "socket file to use for remote mysqlctl actions (empty for local actions)") - mycnfTemplateFile = flag.String("mysqlctl_mycnf_template", "", "template file to use for generating the my.cnf file during server init") + socketFile = flag.String("mysqlctl_socket", "", "socket file to use for remote mysqlctl actions (empty for local actions)") // masterConnectRetry is used in 'SET MASTER' commands masterConnectRetry = flag.Duration("master_connect_retry", 10*time.Second, "how long to wait in between slave -> connection attempts. Only precise to the second.") @@ -81,6 +82,7 @@ var ( appMysqlStats = stats.NewTimings("MysqlApp", "MySQL app stats", "operation") versionRegex = regexp.MustCompile(`Ver ([0-9]+)\.([0-9]+)\.([0-9]+)`) + riceBox, _ = rice.FindBox("../../../config") ) // How many bytes from MySQL error log to sample for error messages @@ -622,14 +624,8 @@ func (mysqld *Mysqld) InitConfig(cnf *Mycnf) error { log.Errorf("%s", err.Error()) return err } - root, err := vtenv.VtRoot() - if err != nil { - log.Errorf("%s", err.Error()) - return err - } - // Set up config files. - if err = mysqld.initConfig(root, cnf, cnf.path); err != nil { + if err = mysqld.initConfig(cnf, cnf.path); err != nil { log.Errorf("failed creating %v: %v", cnf.path, err) return err } @@ -670,7 +666,18 @@ func (mysqld *Mysqld) Init(ctx context.Context, cnf *Mycnf, initDBSQLFile string return err } - // Run initial SQL file. + if initDBSQLFile == "" { // default to built-in + sqlFile, err := riceBox.Open("init_db.sql") + if err != nil { + return fmt.Errorf("could not open built-in init_db.sql file") + } + if err := mysqld.executeMysqlScript(params, sqlFile); err != nil { + return fmt.Errorf("failed to initialize mysqld: %v", err) + } + return nil + } + + // else, user specified an init db file sqlFile, err := os.Open(initDBSQLFile) if err != nil { return fmt.Errorf("can't open init_db_sql_file (%v): %v", initDBSQLFile, err) @@ -679,7 +686,6 @@ func (mysqld *Mysqld) Init(ctx context.Context, cnf *Mycnf, initDBSQLFile string if err := mysqld.executeMysqlScript(params, sqlFile); err != nil { return fmt.Errorf("can't run init_db_sql_file (%v): %v", initDBSQLFile, err) } - return nil } @@ -760,7 +766,7 @@ func (mysqld *Mysqld) installDataDir(cnf *Mycnf) error { return nil } -func (mysqld *Mysqld) initConfig(root string, cnf *Mycnf, outFile string) error { +func (mysqld *Mysqld) initConfig(cnf *Mycnf, outFile string) error { var err error var configData string @@ -773,7 +779,7 @@ func (mysqld *Mysqld) initConfig(root string, cnf *Mycnf, outFile string) error switch hr := hook.NewHookWithEnv("make_mycnf", nil, env).Execute(); hr.ExitStatus { case hook.HOOK_DOES_NOT_EXIST: log.Infof("make_mycnf hook doesn't exist, reading template files") - configData, err = cnf.makeMycnf(mysqld.getMycnfTemplates(root)) + configData, err = cnf.makeMycnf(mysqld.getMycnfTemplate()) case hook.HOOK_SUCCESS: configData, err = cnf.fillMycnfTemplate(hr.Stdout) default: @@ -786,45 +792,43 @@ func (mysqld *Mysqld) initConfig(root string, cnf *Mycnf, outFile string) error return ioutil.WriteFile(outFile, []byte(configData), 0664) } -func contains(haystack []string, needle string) bool { - for _, v := range haystack { - if v == needle { - return true - } - } - return false -} - -func (mysqld *Mysqld) getMycnfTemplates(root string) []string { - if *mycnfTemplateFile != "" { - return []string{*mycnfTemplateFile} - } +func (mysqld *Mysqld) getMycnfTemplate() string { - cnfTemplatePaths := []string{ - path.Join(root, "config/mycnf/default.cnf"), - } + myTemplateSource := new(bytes.Buffer) + myTemplateSource.WriteString("[mysqld]\n") - if extraCnf := os.Getenv("EXTRA_MY_CNF"); extraCnf != "" { - parts := strings.Split(extraCnf, ":") - cnfTemplatePaths = append(cnfTemplatePaths, parts...) + b, err := riceBox.Bytes("mycnf/default.cnf") + if err != nil { + log.Warningf("could not open embedded default.cnf config file") } + myTemplateSource.Write(b) - // Only include files if they exist. - // Percona Server == MySQL in this context - + // mysql version specific file. + // master_{flavor}{major}{minor}.cnf f := flavorMariaDB if mysqld.capabilities.isMySQLLike() { f = flavorMySQL } - - // master_{flavor}{major}{minor}.cnf - p := path.Join(root, fmt.Sprintf("config/mycnf/master_%s%d%d.cnf", f, mysqld.capabilities.version.Major, mysqld.capabilities.version.Minor)) - _, err := os.Stat(p) - if err == nil && !contains(cnfTemplatePaths, p) { - cnfTemplatePaths = append(cnfTemplatePaths, p) + fn := fmt.Sprintf("mycnf/master_%s%d%d.cnf", f, mysqld.capabilities.version.Major, mysqld.capabilities.version.Minor) + b, err = riceBox.Bytes(fn) + if err != nil { + log.Infof("this version of Vitess does not include built-in support for %v %v", mysqld.capabilities.flavor, mysqld.capabilities.version) } + myTemplateSource.Write(b) - return cnfTemplatePaths + if extraCnf := os.Getenv("EXTRA_MY_CNF"); extraCnf != "" { + parts := strings.Split(extraCnf, ":") + for _, path := range parts { + data, dataErr := ioutil.ReadFile(path) + if dataErr != nil { + log.Infof("could not open config file for mycnf: %v", path) + continue + } + myTemplateSource.WriteString("## " + path + "\n") + myTemplateSource.Write(data) + } + } + return myTemplateSource.String() } // RefreshConfig attempts to recreate the my.cnf from templates, and log and @@ -843,17 +847,13 @@ func (mysqld *Mysqld) RefreshConfig(ctx context.Context, cnf *Mycnf) error { } log.Info("Checking for updates to my.cnf") - root, err := vtenv.VtRoot() - if err != nil { - return err - } f, err := ioutil.TempFile(path.Dir(cnf.path), "my.cnf") if err != nil { return fmt.Errorf("could not create temp file: %v", err) } defer os.Remove(f.Name()) - err = mysqld.initConfig(root, cnf, f.Name()) + err = mysqld.initConfig(cnf, f.Name()) if err != nil { return fmt.Errorf("could not initConfig in %v: %v", f.Name(), err) } @@ -907,11 +907,7 @@ func (mysqld *Mysqld) ReinitConfig(ctx context.Context, cnf *Mycnf) error { if err := cnf.RandomizeMysqlServerID(); err != nil { return err } - root, err := vtenv.VtRoot() - if err != nil { - return err - } - return mysqld.initConfig(root, cnf, cnf.path) + return mysqld.initConfig(cnf, cnf.path) } func (mysqld *Mysqld) createDirs(cnf *Mycnf) error { From 4d6c8d1443f9c2dbfc34f35dacc009975474ab97 Mon Sep 17 00:00:00 2001 From: Morgan Tocker Date: Fri, 3 Jan 2020 14:46:44 -0700 Subject: [PATCH 2/4] Improve gitignore, remove config from packages Signed-off-by: Morgan Tocker --- .gitignore | 2 +- tools/make-release-packages.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index c4a1981a925..794038c0415 100644 --- a/.gitignore +++ b/.gitignore @@ -87,4 +87,4 @@ releases /vtdataroot/ # Ricebox file -go/vt/mysqlctl/rice-box.go +/go/vt/mysqlctl/rice-box.go diff --git a/tools/make-release-packages.sh b/tools/make-release-packages.sh index d506b938704..a1b41512cb3 100755 --- a/tools/make-release-packages.sh +++ b/tools/make-release-packages.sh @@ -39,7 +39,7 @@ done; # Copy remaining files, preserving date/permissions # But resolving symlinks -cp -rpfL {config,vthook,examples} "${RELEASE_DIR}/" +cp -rpfL {vthook,examples} "${RELEASE_DIR}/" echo "Follow the binary installation instructions at: https://vitess.io/docs/get-started/local/" > "${RELEASE_DIR}"/README.md From 28eb3c1277aebf1263c31d1c9c303e6fd5236bb0 Mon Sep 17 00:00:00 2001 From: Morgan Tocker Date: Fri, 3 Jan 2020 16:40:55 -0700 Subject: [PATCH 3/4] Completely remove VTROOT requirement Hooks will just not be supported if VTROOT is not specified. Signed-off-by: Morgan Tocker --- examples/local/env.sh | 6 +----- go/vt/env/env.go | 5 +++-- test/local_example.sh | 2 ++ tools/make-release-packages.sh | 2 +- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/examples/local/env.sh b/examples/local/env.sh index d36a1cc3ffe..0211bcbbc71 100644 --- a/examples/local/env.sh +++ b/examples/local/env.sh @@ -16,7 +16,7 @@ hostname=`hostname -f` vtctld_web_port=15000 -export VTDATAROOT="${VTDATAROOT:-${VTROOT}/vtdataroot}" +export VTDATAROOT="${VTDATAROOT:-${PWD}/vtdataroot}" function fail() { echo "ERROR: $1" @@ -33,10 +33,6 @@ for binary in mysqld etcd etcdctl curl vtctlclient vttablet vtgate vtctld mysqlc command -v "$binary" > /dev/null || fail "${binary} is not installed in PATH. See https://vitess.io/docs/get-started/local/ for install instructions." done; -if [ -z "$VTROOT" ]; then - fail "VTROOT is not set. See https://vitess.io/docs/get-started/local/ for install instructions." -fi - if [ "${TOPO}" = "zk2" ]; then # Each ZooKeeper server needs a list of all servers in the quorum. # Since we're running them all locally, we need to give them unique ports. diff --git a/go/vt/env/env.go b/go/vt/env/env.go index dd28d1eb5c1..70feb43186c 100644 --- a/go/vt/env/env.go +++ b/go/vt/env/env.go @@ -29,6 +29,8 @@ import ( const ( // DefaultVtDataRoot is the default value for VTROOT environment variable DefaultVtDataRoot = "/vt" + // DefaultVtRoot is only required for hooks + DefaultVtRoot = "/usr/local/vitess" ) // VtRoot returns $VTROOT or tries to guess its value if it's not set. @@ -47,8 +49,7 @@ func VtRoot() (root string, err error) { if strings.HasSuffix(dir, "/bin") { return path.Dir(dir), nil } - err = errors.New("VTROOT could not be guessed from the executable location. Please set $VTROOT") - return + return DefaultVtRoot, nil } // VtDataRoot returns $VTDATAROOT or the default if $VTDATAROOT is not diff --git a/test/local_example.sh b/test/local_example.sh index 26c41abf15f..71c2042fbd7 100755 --- a/test/local_example.sh +++ b/test/local_example.sh @@ -24,6 +24,8 @@ set -xe cd "$VTROOT/examples/local" +unset VTROOT # ensure that the examples can run without VTROOT now. + ./101_initial_cluster.sh mysql -h 127.0.0.1 -P 15306 < ../common/insert_commerce_data.sql diff --git a/tools/make-release-packages.sh b/tools/make-release-packages.sh index a1b41512cb3..4864cf5449a 100755 --- a/tools/make-release-packages.sh +++ b/tools/make-release-packages.sh @@ -39,7 +39,7 @@ done; # Copy remaining files, preserving date/permissions # But resolving symlinks -cp -rpfL {vthook,examples} "${RELEASE_DIR}/" +cp -rpfL {examples} "${RELEASE_DIR}/" echo "Follow the binary installation instructions at: https://vitess.io/docs/get-started/local/" > "${RELEASE_DIR}"/README.md From d4b1b68d6c4e81bcb686548a6067c80ede339009 Mon Sep 17 00:00:00 2001 From: Morgan Tocker Date: Wed, 8 Jan 2020 09:02:38 -0700 Subject: [PATCH 4/4] commit ricebox per reviewer feedback Signed-off-by: Morgan Tocker --- .gitignore | 3 - go/vt/mysqlctl/rice-box.go | 177 +++++++++++++++++++++++++++++++++++++ 2 files changed, 177 insertions(+), 3 deletions(-) create mode 100644 go/vt/mysqlctl/rice-box.go diff --git a/.gitignore b/.gitignore index 794038c0415..be8fe727562 100644 --- a/.gitignore +++ b/.gitignore @@ -85,6 +85,3 @@ releases /vthook/ /bin/ /vtdataroot/ - -# Ricebox file -/go/vt/mysqlctl/rice-box.go diff --git a/go/vt/mysqlctl/rice-box.go b/go/vt/mysqlctl/rice-box.go new file mode 100644 index 00000000000..6e6dc10f32b --- /dev/null +++ b/go/vt/mysqlctl/rice-box.go @@ -0,0 +1,177 @@ +package mysqlctl + +import ( + "time" + + "github.com/GeertJohan/go.rice/embedded" +) + +func init() { + + // define files + file2 := &embedded.EmbeddedFile{ + Filename: "gomysql.pc.tmpl", + FileModTime: time.Unix(1562782645, 0), + + Content: string("Name: GoMysql\nDescription: Flags for using mysql C client in go\n"), + } + file3 := &embedded.EmbeddedFile{ + Filename: "init_db.sql", + FileModTime: time.Unix(1578077737, 0), + + Content: string("# This file is executed immediately after mysql_install_db,\n# to initialize a fresh data directory.\n\n###############################################################################\n# WARNING: This sql is *NOT* safe for production use,\n# as it contains default well-known users and passwords.\n# Care should be taken to change these users and passwords\n# for production.\n###############################################################################\n\n###############################################################################\n# Equivalent of mysql_secure_installation\n###############################################################################\n\n# Changes during the init db should not make it to the binlog.\n# They could potentially create errant transactions on replicas.\nSET sql_log_bin = 0;\n# Remove anonymous users.\nDELETE FROM mysql.user WHERE User = '';\n\n# Disable remote root access (only allow UNIX socket).\nDELETE FROM mysql.user WHERE User = 'root' AND Host != 'localhost';\n\n# Remove test database.\nDROP DATABASE IF EXISTS test;\n\n###############################################################################\n# Vitess defaults\n###############################################################################\n\n# Vitess-internal database.\nCREATE DATABASE IF NOT EXISTS _vt;\n# Note that definitions of local_metadata and shard_metadata should be the same\n# as in production which is defined in go/vt/mysqlctl/metadata_tables.go.\nCREATE TABLE IF NOT EXISTS _vt.local_metadata (\n name VARCHAR(255) NOT NULL,\n value VARCHAR(255) NOT NULL,\n db_name VARBINARY(255) NOT NULL,\n PRIMARY KEY (db_name, name)\n ) ENGINE=InnoDB;\nCREATE TABLE IF NOT EXISTS _vt.shard_metadata (\n name VARCHAR(255) NOT NULL,\n value MEDIUMBLOB NOT NULL,\n db_name VARBINARY(255) NOT NULL,\n PRIMARY KEY (db_name, name)\n ) ENGINE=InnoDB;\n\n# Admin user with all privileges.\nCREATE USER 'vt_dba'@'localhost';\nGRANT ALL ON *.* TO 'vt_dba'@'localhost';\nGRANT GRANT OPTION ON *.* TO 'vt_dba'@'localhost';\n\n# User for app traffic, with global read-write access.\nCREATE USER 'vt_app'@'localhost';\nGRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, PROCESS, FILE,\n REFERENCES, INDEX, ALTER, SHOW DATABASES, CREATE TEMPORARY TABLES,\n LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW,\n SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER\n ON *.* TO 'vt_app'@'localhost';\n\n# User for app debug traffic, with global read access.\nCREATE USER 'vt_appdebug'@'localhost';\nGRANT SELECT, SHOW DATABASES, PROCESS ON *.* TO 'vt_appdebug'@'localhost';\n\n# User for administrative operations that need to be executed as non-SUPER.\n# Same permissions as vt_app here.\nCREATE USER 'vt_allprivs'@'localhost';\nGRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, PROCESS, FILE,\n REFERENCES, INDEX, ALTER, SHOW DATABASES, CREATE TEMPORARY TABLES,\n LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW,\n SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER\n ON *.* TO 'vt_allprivs'@'localhost';\n\n# User for slave replication connections.\nCREATE USER 'vt_repl'@'%';\nGRANT REPLICATION SLAVE ON *.* TO 'vt_repl'@'%';\n\n# User for Vitess filtered replication (binlog player).\n# Same permissions as vt_app.\nCREATE USER 'vt_filtered'@'localhost';\nGRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, PROCESS, FILE,\n REFERENCES, INDEX, ALTER, SHOW DATABASES, CREATE TEMPORARY TABLES,\n LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW,\n SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER\n ON *.* TO 'vt_filtered'@'localhost';\n\n# User for general MySQL monitoring.\nCREATE USER 'vt_monitoring'@'localhost';\nGRANT SELECT, PROCESS, SUPER, REPLICATION CLIENT, RELOAD\n ON *.* TO 'vt_monitoring'@'localhost';\nGRANT SELECT, UPDATE, DELETE, DROP\n ON performance_schema.* TO 'vt_monitoring'@'localhost';\n\n# User for Orchestrator (https://github.com/github/orchestrator).\nCREATE USER 'orc_client_user'@'%' IDENTIFIED BY 'orc_client_user_password';\nGRANT SUPER, PROCESS, REPLICATION SLAVE, RELOAD\n ON *.* TO 'orc_client_user'@'%';\nGRANT SELECT\n ON _vt.* TO 'orc_client_user'@'%';\n\nFLUSH PRIVILEGES;\n\nRESET SLAVE ALL;\nRESET MASTER;\n"), + } + file5 := &embedded.EmbeddedFile{ + Filename: "mycnf/default-fast.cnf", + FileModTime: time.Unix(1578076938, 0), + + Content: string("# This sets some unsafe settings specifically for \n# the test-suite which is currently MySQL 5.7 based\n# In future it should be renamed testsuite.cnf\n\ninnodb_buffer_pool_size = 32M\ninnodb_flush_log_at_trx_commit = 0\ninnodb_log_buffer_size = 1M\ninnodb_log_file_size = 5M\n\n# Native AIO tends to run into aio-max-nr limit during test startup.\ninnodb_use_native_aio = 0\n\nkey_buffer_size = 2M\nsync_binlog=0\ninnodb_doublewrite=0\n\n# These two settings are required for the testsuite to pass, \n# but enabling them does not spark joy. They should be removed\n# in the future. See:\n# https://github.com/vitessio/vitess/issues/5396\n\nsql_mode = STRICT_TRANS_TABLES\n"), + } + file6 := &embedded.EmbeddedFile{ + Filename: "mycnf/default.cnf", + FileModTime: time.Unix(1578076938, 0), + + Content: string("# Global configuration that is auto-included for all MySQL/MariaDB versions\n\ndatadir = {{.DataDir}}\ninnodb_data_home_dir = {{.InnodbDataHomeDir}}\ninnodb_log_group_home_dir = {{.InnodbLogGroupHomeDir}}\nlog-error = {{.ErrorLogPath}}\npid-file = {{.PidFile}}\nport = {{.MysqlPort}}\n\n# all db instances should start in read-only mode - once the db is started and\n# fully functional, we'll push it into read-write mode\nread-only\nserver-id = {{.ServerID}}\n\n# all db instances should skip the slave startup - that way we can do any\n# additional configuration (like enabling semi-sync) before we connect to\n# the master.\nskip_slave_start\nslave_load_tmpdir = {{.SlaveLoadTmpDir}}\nsocket = {{.SocketFile}}\ntmpdir = {{.TmpDir}}\n\nslow-query-log-file = {{.SlowLogPath}}\n\n# These are sensible defaults that apply to all MySQL/MariaDB versions\n\nlong_query_time = 2\nslow-query-log\nskip-name-resolve\nconnect_timeout = 30\ninnodb_lock_wait_timeout = 20\nmax_allowed_packet = 64M\nmax_connections = 500\n\n\n"), + } + file7 := &embedded.EmbeddedFile{ + Filename: "mycnf/master_mariadb100.cnf", + FileModTime: time.Unix(1578076938, 0), + + Content: string("# This file is auto-included when MariaDB 10.0 is detected.\n\n# Semi-sync replication is required for automated unplanned failover\n# (when the master goes away). Here we just load the plugin so it's\n# available if desired, but it's disabled at startup.\n#\n# If the -enable_semi_sync flag is used, VTTablet will enable semi-sync\n# at the proper time when replication is set up, or when masters are\n# promoted or demoted.\nplugin-load = rpl_semi_sync_master=semisync_master.so;rpl_semi_sync_slave=semisync_slave.so\n\nslave_net_timeout = 60\n\n# MariaDB 10.0 is unstrict by default\nsql_mode = STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION\n\n# enable strict mode so it's safe to compare sequence numbers across different server IDs.\ngtid_strict_mode = 1\ninnodb_stats_persistent = 0\n\n# When semi-sync is enabled, don't allow fallback to async\n# if you get no ack, or have no slaves. This is necessary to\n# prevent alternate futures when doing a failover in response to\n# a master that becomes unresponsive.\nrpl_semi_sync_master_timeout = 1000000000000000000\nrpl_semi_sync_master_wait_no_slave = 1\n\n\ncharacter_set_server = utf8\ncollation_server = utf8_general_ci\n\nexpire_logs_days = 3\n\nlog_bin\nsync_binlog = 1\nbinlog_format = ROW\nlog_slave_updates\nexpire_logs_days = 3\n\n# In MariaDB the default charset is latin1\n\ncharacter_set_server = utf8\ncollation_server = utf8_general_ci\n\n"), + } + file8 := &embedded.EmbeddedFile{ + Filename: "mycnf/master_mariadb101.cnf", + FileModTime: time.Unix(1578076938, 0), + + Content: string("# This file is auto-included when MariaDB 10.1 is detected.\n\n# Semi-sync replication is required for automated unplanned failover\n# (when the master goes away). Here we just load the plugin so it's\n# available if desired, but it's disabled at startup.\n#\n# If the -enable_semi_sync flag is used, VTTablet will enable semi-sync\n# at the proper time when replication is set up, or when masters are\n# promoted or demoted.\nplugin-load = rpl_semi_sync_master=semisync_master.so;rpl_semi_sync_slave=semisync_slave.so\n\nslave_net_timeout = 60\n\n# MariaDB 10.1 default is only no-engine-substitution and no-auto-create-user\nsql_mode = STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION,NO_AUTO_CREATE_USER\n\n# enable strict mode so it's safe to compare sequence numbers across different server IDs.\ngtid_strict_mode = 1\ninnodb_stats_persistent = 0\n\n# When semi-sync is enabled, don't allow fallback to async\n# if you get no ack, or have no slaves. This is necessary to\n# prevent alternate futures when doing a failover in response to\n# a master that becomes unresponsive.\nrpl_semi_sync_master_timeout = 1000000000000000000\nrpl_semi_sync_master_wait_no_slave = 1\n\n\ncharacter_set_server = utf8\ncollation_server = utf8_general_ci\n\nexpire_logs_days = 3\n\nlog_bin\nsync_binlog = 1\nbinlog_format = ROW\nlog_slave_updates\nexpire_logs_days = 3\n\n# In MariaDB the default charset is latin1\n\ncharacter_set_server = utf8\ncollation_server = utf8_general_ci\n"), + } + file9 := &embedded.EmbeddedFile{ + Filename: "mycnf/master_mariadb102.cnf", + FileModTime: time.Unix(1578076938, 0), + + Content: string("# This file is auto-included when MariaDB 10.2 is detected.\n\n# Semi-sync replication is required for automated unplanned failover\n# (when the master goes away). Here we just load the plugin so it's\n# available if desired, but it's disabled at startup.\n#\n# If the -enable_semi_sync flag is used, VTTablet will enable semi-sync\n# at the proper time when replication is set up, or when masters are\n# promoted or demoted.\nplugin-load = rpl_semi_sync_master=semisync_master.so;rpl_semi_sync_slave=semisync_slave.so\n\n# enable strict mode so it's safe to compare sequence numbers across different server IDs.\ngtid_strict_mode = 1\ninnodb_stats_persistent = 0\n\n# When semi-sync is enabled, don't allow fallback to async\n# if you get no ack, or have no slaves. This is necessary to\n# prevent alternate futures when doing a failover in response to\n# a master that becomes unresponsive.\nrpl_semi_sync_master_timeout = 1000000000000000000\nrpl_semi_sync_master_wait_no_slave = 1\n\n\ncharacter_set_server = utf8\ncollation_server = utf8_general_ci\n\nexpire_logs_days = 3\n\nlog_bin\nsync_binlog = 1\nbinlog_format = ROW\nlog_slave_updates\nexpire_logs_days = 3\n\n# In MariaDB the default charset is latin1\n\ncharacter_set_server = utf8\ncollation_server = utf8_general_ci\n"), + } + filea := &embedded.EmbeddedFile{ + Filename: "mycnf/master_mariadb103.cnf", + FileModTime: time.Unix(1578076938, 0), + + Content: string("# This file is auto-included when MariaDB 10.3 is detected.\n\n# enable strict mode so it's safe to compare sequence numbers across different server IDs.\ngtid_strict_mode = 1\ninnodb_stats_persistent = 0\n\n# When semi-sync is enabled, don't allow fallback to async\n# if you get no ack, or have no slaves. This is necessary to\n# prevent alternate futures when doing a failover in response to\n# a master that becomes unresponsive.\nrpl_semi_sync_master_timeout = 1000000000000000000\nrpl_semi_sync_master_wait_no_slave = 1\n\n\ncharacter_set_server = utf8\ncollation_server = utf8_general_ci\n\nexpire_logs_days = 3\n\nlog_bin\nsync_binlog = 1\nbinlog_format = ROW\nlog_slave_updates\nexpire_logs_days = 3\n\n# In MariaDB the default charset is latin1\n\ncharacter_set_server = utf8\ncollation_server = utf8_general_ci\n\n\n"), + } + fileb := &embedded.EmbeddedFile{ + Filename: "mycnf/master_mariadb104.cnf", + FileModTime: time.Unix(1578076938, 0), + + Content: string("# This file is auto-included when MariaDB 10.4 is detected.\n\n# enable strict mode so it's safe to compare sequence numbers across different server IDs.\ngtid_strict_mode = 1\ninnodb_stats_persistent = 0\n\n# When semi-sync is enabled, don't allow fallback to async\n# if you get no ack, or have no slaves. This is necessary to\n# prevent alternate futures when doing a failover in response to\n# a master that becomes unresponsive.\nrpl_semi_sync_master_timeout = 1000000000000000000\nrpl_semi_sync_master_wait_no_slave = 1\n\n\ncharacter_set_server = utf8\ncollation_server = utf8_general_ci\n\nexpire_logs_days = 3\n\nlog_bin\nsync_binlog = 1\nbinlog_format = ROW\nlog_slave_updates\nexpire_logs_days = 3\n\n# In MariaDB the default charset is latin1\n\ncharacter_set_server = utf8\ncollation_server = utf8_general_ci\n\n\n"), + } + filec := &embedded.EmbeddedFile{ + Filename: "mycnf/master_mysql56.cnf", + FileModTime: time.Unix(1578076938, 0), + + Content: string("# This file is auto-included when MySQL 5.6 is detected.\n\n# MySQL 5.6 does not enable the binary log by default, and \n# the default for sync_binlog is unsafe. The format is TABLE, and\n# info repositories also default to file.\n\nlog_bin\nsync_binlog = 1\ngtid_mode = ON\nbinlog_format = ROW\nlog_slave_updates\nenforce_gtid_consistency\nexpire_logs_days = 3\nmaster_info_repository = TABLE\nrelay_log_info_repository = TABLE\nrelay_log_purge = 1\nrelay_log_recovery = 1\nslave_net_timeout = 60\n\n# In MySQL 5.6 the default charset is latin1\n\ncharacter_set_server = utf8\ncollation_server = utf8_general_ci\n\n# MySQL 5.6 is unstrict by default\nsql_mode = STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION\n\n# Semi-sync replication is required for automated unplanned failover\n# (when the master goes away). Here we just load the plugin so it's\n# available if desired, but it's disabled at startup.\n#\n# If the -enable_semi_sync flag is used, VTTablet will enable semi-sync\n# at the proper time when replication is set up, or when masters are\n# promoted or demoted.\nplugin-load = rpl_semi_sync_master=semisync_master.so;rpl_semi_sync_slave=semisync_slave.so\n\n# When semi-sync is enabled, don't allow fallback to async\n# if you get no ack, or have no slaves. This is necessary to\n# prevent alternate futures when doing a failover in response to\n# a master that becomes unresponsive.\nrpl_semi_sync_master_timeout = 1000000000000000000\nrpl_semi_sync_master_wait_no_slave = 1\n\n"), + } + filed := &embedded.EmbeddedFile{ + Filename: "mycnf/master_mysql57.cnf", + FileModTime: time.Unix(1578076938, 0), + + Content: string("# This file is auto-included when MySQL 5.7 is detected.\n\n# MySQL 5.7 does not enable the binary log by default, and \n# info repositories default to file\n\ngtid_mode = ON\nlog_bin\nlog_slave_updates\nenforce_gtid_consistency\nexpire_logs_days = 3\nmaster_info_repository = TABLE\nrelay_log_info_repository = TABLE\nrelay_log_purge = 1\nrelay_log_recovery = 1\n\n# In MySQL 5.7 the default charset is latin1\n\ncharacter_set_server = utf8\ncollation_server = utf8_general_ci\n\n# Semi-sync replication is required for automated unplanned failover\n# (when the master goes away). Here we just load the plugin so it's\n# available if desired, but it's disabled at startup.\n#\n# If the -enable_semi_sync flag is used, VTTablet will enable semi-sync\n# at the proper time when replication is set up, or when masters are\n# promoted or demoted.\nplugin-load = rpl_semi_sync_master=semisync_master.so;rpl_semi_sync_slave=semisync_slave.so\n\n# When semi-sync is enabled, don't allow fallback to async\n# if you get no ack, or have no slaves. This is necessary to\n# prevent alternate futures when doing a failover in response to\n# a master that becomes unresponsive.\nrpl_semi_sync_master_timeout = 1000000000000000000\nrpl_semi_sync_master_wait_no_slave = 1\n\n"), + } + filee := &embedded.EmbeddedFile{ + Filename: "mycnf/master_mysql80.cnf", + FileModTime: time.Unix(1578076938, 0), + + Content: string("# This file is auto-included when MySQL 8.0 is detected.\n\n# MySQL 8.0 enables binlog by default with sync_binlog and TABLE info repositories\n# It does not enable GTIDs or enforced GTID consistency\n\ngtid_mode = ON\nenforce_gtid_consistency\nrelay_log_recovery = 1\nbinlog_expire_logs_seconds = 259200\n\n# disable mysqlx\nmysqlx = 0\n\n# 8.0 changes the default auth-plugin to caching_sha2_password\ndefault_authentication_plugin = mysql_native_password\n\n# Semi-sync replication is required for automated unplanned failover\n# (when the master goes away). Here we just load the plugin so it's\n# available if desired, but it's disabled at startup.\n#\n# If the -enable_semi_sync flag is used, VTTablet will enable semi-sync\n# at the proper time when replication is set up, or when masters are\n# promoted or demoted.\nplugin-load = rpl_semi_sync_master=semisync_master.so;rpl_semi_sync_slave=semisync_slave.so\n\n# MySQL 8.0 will not load plugins during --initialize\n# which makes these options unknown. Prefixing with --loose\n# tells the server it's fine if they are not understood.\nloose_rpl_semi_sync_master_timeout = 1000000000000000000\nloose_rpl_semi_sync_master_wait_no_slave = 1\n\n"), + } + filef := &embedded.EmbeddedFile{ + Filename: "mycnf/sbr.cnf", + FileModTime: time.Unix(1578076938, 0), + + Content: string("# This file is used to allow legacy tests to pass\n# In theory it should not be required\nbinlog_format=statement\n"), + } + fileg := &embedded.EmbeddedFile{ + Filename: "zk-client-dev.json", + FileModTime: time.Unix(1562782645, 0), + + Content: string("{\n \"local\": \"localhost:3863\",\n \"global\": \"localhost:3963\"\n}\n"), + } + filei := &embedded.EmbeddedFile{ + Filename: "zkcfg/zoo.cfg", + FileModTime: time.Unix(1562782645, 0), + + Content: string("tickTime=2000\ndataDir={{.DataDir}}\nclientPort={{.ClientPort}}\ninitLimit=5\nsyncLimit=2\nmaxClientCnxns=0\n{{range .Servers}}\nserver.{{.ServerId}}={{.Hostname}}:{{.LeaderPort}}:{{.ElectionPort}}\n{{end}}\n"), + } + + // define dirs + dir1 := &embedded.EmbeddedDir{ + Filename: "", + DirModTime: time.Unix(1578267519, 0), + ChildFiles: []*embedded.EmbeddedFile{ + file2, // "gomysql.pc.tmpl" + file3, // "init_db.sql" + fileg, // "zk-client-dev.json" + + }, + } + dir4 := &embedded.EmbeddedDir{ + Filename: "mycnf", + DirModTime: time.Unix(1578076938, 0), + ChildFiles: []*embedded.EmbeddedFile{ + file5, // "mycnf/default-fast.cnf" + file6, // "mycnf/default.cnf" + file7, // "mycnf/master_mariadb100.cnf" + file8, // "mycnf/master_mariadb101.cnf" + file9, // "mycnf/master_mariadb102.cnf" + filea, // "mycnf/master_mariadb103.cnf" + fileb, // "mycnf/master_mariadb104.cnf" + filec, // "mycnf/master_mysql56.cnf" + filed, // "mycnf/master_mysql57.cnf" + filee, // "mycnf/master_mysql80.cnf" + filef, // "mycnf/sbr.cnf" + + }, + } + dirh := &embedded.EmbeddedDir{ + Filename: "zkcfg", + DirModTime: time.Unix(1578087479, 0), + ChildFiles: []*embedded.EmbeddedFile{ + filei, // "zkcfg/zoo.cfg" + + }, + } + + // link ChildDirs + dir1.ChildDirs = []*embedded.EmbeddedDir{ + dir4, // "mycnf" + dirh, // "zkcfg" + + } + dir4.ChildDirs = []*embedded.EmbeddedDir{} + dirh.ChildDirs = []*embedded.EmbeddedDir{} + + // register embeddedBox + embedded.RegisterEmbeddedBox(`../../../config`, &embedded.EmbeddedBox{ + Name: `../../../config`, + Time: time.Unix(1578267519, 0), + Dirs: map[string]*embedded.EmbeddedDir{ + "": dir1, + "mycnf": dir4, + "zkcfg": dirh, + }, + Files: map[string]*embedded.EmbeddedFile{ + "gomysql.pc.tmpl": file2, + "init_db.sql": file3, + "mycnf/default-fast.cnf": file5, + "mycnf/default.cnf": file6, + "mycnf/master_mariadb100.cnf": file7, + "mycnf/master_mariadb101.cnf": file8, + "mycnf/master_mariadb102.cnf": file9, + "mycnf/master_mariadb103.cnf": filea, + "mycnf/master_mariadb104.cnf": fileb, + "mycnf/master_mysql56.cnf": filec, + "mycnf/master_mysql57.cnf": filed, + "mycnf/master_mysql80.cnf": filee, + "mycnf/sbr.cnf": filef, + "zk-client-dev.json": fileg, + "zkcfg/zoo.cfg": filei, + }, + }) +}