Documentation
¶
Overview ¶
DBDeployer - The MySQL Sandbox Copyright © 2006-2019 Giuseppe Maxia
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
DBDeployer - The MySQL Sandbox Copyright © 2006-2019 Giuseppe Maxia
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- Variables
- func CreateRecipe(recipeName, flavor string)
- func GetLatestVersion(wantedVersion, flavor string) string
- func GetRecipe(recipeName, flavor string) (string, error, int)
- func ListRecipes()
- func ShowRecipe(recipeName string, flavor string, raw bool)
- type ByScriptName
- type RecipeTemplate
- type RecipesCollection
- type TemplateSort
Constants ¶
const ( CookbookInclude = "cookbook_include.sh" CookbookPrerequisites = "prerequisites.sh" )
const ( ErrNoVersionFound = 1 ErrNoRecipeFound = 2 VersionNotFound = "NOTFOUND" )
Variables ¶
var ( AuxiliaryRecipes = []string{"prerequisites", "include"} PrerequisitesShown bool = false )
var RecipesList = RecipesCollection{ "include": RecipeTemplate{ ScriptName: CookbookInclude, Description: "common code for all recipes", Contents: recipeInclude, }, "single": RecipeTemplate{ Description: "Creation of a single sandbox", ScriptName: "single-deployment.sh", Contents: singleTemplate, IsExecutable: true, }, "single-reinstall": RecipeTemplate{ Description: "Re-installs a single sandbox", ScriptName: "single-reinstall.sh", Contents: singleReinstallTemplate, IsExecutable: true, }, "show": RecipeTemplate{ Description: "Show deployed sandboxes", ScriptName: "show-sandboxes.sh", Contents: showSandboxes, IsExecutable: true, }, "delete": RecipeTemplate{ Description: "Delete all deployed sandboxes", ScriptName: "delete-sandboxes.sh", Contents: deleteAll, IsExecutable: true, }, "master-slave": RecipeTemplate{ Description: "Creation of a master/slave replication sandbox", ScriptName: "master-slave-deployment.sh", Contents: masterSlaveDeployment, IsExecutable: true, }, "fan-in": RecipeTemplate{ Description: "Creation of a fan-in (many masters, one slave) replication sandbox", ScriptName: "fan-in-deployment.sh", Contents: fanInDeployment, RequiredFlavor: common.MySQLFlavor, IsExecutable: true, }, "all-masters": RecipeTemplate{ Description: "Creation of an all-masters replication sandbox", ScriptName: "all-masters-deployment.sh", Contents: allMastersDeployment, RequiredFlavor: common.MySQLFlavor, IsExecutable: true, }, "group-multi": RecipeTemplate{ Description: "Creation of a multi-primary group replication sandbox", ScriptName: "group-multi-primary-deployment.sh", Contents: groupMultiPrimaryDeployment, RequiredFlavor: common.MySQLFlavor, IsExecutable: true, }, "group-single": RecipeTemplate{ Description: "Creation of a single-primary group replication sandbox", ScriptName: "group-single-primary-deployment.sh", Contents: groupSinglePrimaryDeployment, RequiredFlavor: common.MySQLFlavor, IsExecutable: true, }, "replication-restart": RecipeTemplate{ Description: "Show how to restart sandboxes with custom options", ScriptName: "repl-operations-restart.sh", Contents: replicationRestart, IsExecutable: true, }, "replication-operations": RecipeTemplate{ Description: "Show how to run operations in a replication sandbox", ScriptName: "repl-operations.sh", Contents: replicationOperations, IsExecutable: true, }, "upgrade": RecipeTemplate{ Description: "Shows a complete upgrade example from 5.5 to 8.0", ScriptName: "upgrade.sh", Contents: upgradeTemplate, RequiredFlavor: common.MySQLFlavor, IsExecutable: true, }, "tidb": RecipeTemplate{ Description: "Shows deployment and some operations with TiDB", ScriptName: "tidb-deployment.sh", Contents: tidbDeployment, RequiredFlavor: common.TiDbFlavor, IsExecutable: true, }, "ndb": RecipeTemplate{ Description: "Shows deployment with ndb", ScriptName: "ndb-deployment.sh", Contents: ndbDeployment, RequiredFlavor: common.NdbFlavor, IsExecutable: true, }, "pxc": RecipeTemplate{ Description: "Shows deployment with pxc", ScriptName: "pxc-deployment.sh", Contents: pxcDeployment, RequiredFlavor: common.PxcFlavor, IsExecutable: true, }, "remote": RecipeTemplate{ Description: "Shows how to get a remote MySQL tarball", ScriptName: "remote.sh", Contents: remoteOperations, IsExecutable: true, }, "prerequisites": RecipeTemplate{ Description: "Shows dbdeployer prerequisites and how to make them", ScriptName: CookbookPrerequisites, Contents: prerequisites, IsExecutable: true, }, "replication_between_groups": RecipeTemplate{ Description: "Shows how to run replication between two group replications", ScriptName: "replication-between-groups.sh", Contents: replicationBetweenGroups, RequiredFlavor: common.MySQLFlavor, IsExecutable: true, }, "replication_between_master_slave": RecipeTemplate{ Description: "Shows how to run replication between two master/slave replications", ScriptName: "replication-between-master-slave.sh", Contents: replicationBetweenMasterSlave, IsExecutable: true, }, "replication_between_ndb": RecipeTemplate{ Description: "Shows how to run replication between two NDB clusters", ScriptName: "replication-between-ndb.sh", Contents: replicationBetweenNdb, RequiredFlavor: common.NdbFlavor, IsExecutable: true, }, }
Functions ¶
func CreateRecipe ¶
func CreateRecipe(recipeName, flavor string)
func GetLatestVersion ¶
func ListRecipes ¶
func ListRecipes()
func ShowRecipe ¶
Types ¶
type ByScriptName ¶ added in v1.26.0
type ByScriptName []TemplateSort
func (ByScriptName) Len ¶ added in v1.26.0
func (a ByScriptName) Len() int
func (ByScriptName) Less ¶ added in v1.26.0
func (a ByScriptName) Less(i, j int) bool
func (ByScriptName) Swap ¶ added in v1.26.0
func (a ByScriptName) Swap(i, j int)
type RecipeTemplate ¶
type RecipesCollection ¶
type RecipesCollection map[string]RecipeTemplate
type TemplateSort ¶ added in v1.26.0
type TemplateSort struct {
// contains filtered or unexported fields
}