manager

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 4, 2023 License: Apache-2.0 Imports: 51 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetClusterSSH

func SetClusterSSH(ctx context.Context, topo spec.Topology, deployUser string, sshTimeout uint64, sshType, defaultSSHType executor.SSHType) error

SetClusterSSH set cluster user ssh executor in context.

func SetSSHKeySet

func SetSSHKeySet(ctx context.Context, privateKeyPath string, publicKeyPath string) error

SetSSHKeySet set ssh key set.

Types

type AuroraDeployOptions

type AuroraDeployOptions struct {
	User              string // username to login to the SSH server
	IdentityFile      string // path to the private key file
	UsePassword       bool   // use password instead of identity file for ssh connection
	IgnoreConfigCheck bool   // ignore config check result
}

DeployOptions contains the options for scale out

type CheckOptions

type CheckOptions struct {
	User         string // username to login to the SSH server
	IdentityFile string // path to the private key file
	UsePassword  bool   // use password instead of identity file for ssh connection
	Opr          *operator.CheckOptions
	ApplyFix     bool // try to apply fixes of failed checks
	ExistCluster bool // check an exist cluster
}

CheckOptions contains the options for check command

type Cluster

type Cluster struct {
	Name       string `json:"name"`
	User       string `json:"user"`
	Version    string `json:"version"`
	Path       string `json:"path"`
	PrivateKey string `json:"private_key"`
}

Cluster represents a clsuter

type ClusterMetaInfo

type ClusterMetaInfo struct {
	ClusterType    string `json:"cluster_type"`
	ClusterName    string `json:"cluster_name"`
	ClusterVersion string `json:"cluster_version"`
	DeployUser     string `json:"deploy_user"`
	SSHType        string `json:"ssh_type"`
	TLSEnabled     bool   `json:"tls_enabled"`
	TLSCACert      string `json:"tls_ca_cert,omitempty"`
	TLSClientCert  string `json:"tls_client_cert,omitempty"`
	TLSClientKey   string `json:"tls_client_key,omitempty"`
	DashboardURL   string `json:"dashboard_url,omitempty"`
}

ClusterMetaInfo hold the structure for the JSON output of the dashboard info

type ConfigData

type ConfigData struct {
	User                string `yaml:"user"`
	IdentityFile        string `yaml:"identity-file"`
	TiDBCloudPrivateKey string `yaml:"tidbcloud-private-key"`
	TiDBCloudPublicKey  string `yaml:"tidbcloud-public-key"`
}

type DeployOptions

type DeployOptions struct {
	User              string // username to login to the SSH server
	SkipCreateUser    bool   // don't create the user
	IdentityFile      string // path to the private key file
	UsePassword       bool   // use password instead of identity file for ssh connection
	IgnoreConfigCheck bool   // ignore config check result
	NoLabels          bool   // don't check labels for TiKV instance
}

DeployOptions contains the options for scale out.

type DeployerInstance

type DeployerInstance interface {
	Deploy(b *task.Builder, srcPath string, deployDir string, version string, name string, clusterVersion string)
}

DeployerInstance is a instance can deploy to a target deploy directory.

type ExecOptions

type ExecOptions struct {
	Command string
	Sudo    bool
}

ExecOptions for exec shell commanm.

type HostCheckResult

type HostCheckResult struct {
	Node    string `json:"node"`
	Name    string `json:"name"`
	Status  string `json:"status"`
	Message string `json:"message"`
}

HostCheckResult represents the check result of each node

type INC_WS_FLAG

type INC_WS_FLAG bool
const (
	INC_WS INC_WS_FLAG = true
	EXC_WS INC_WS_FLAG = false
)

type InstInfo

type InstInfo struct {
	ID        string `json:"id"`
	Role      string `json:"role"`
	Host      string `json:"host"`
	Ports     string `json:"ports"`
	OsArch    string `json:"os_arch"`
	Status    string `json:"status"`
	Since     string `json:"since"`
	DataDir   string `json:"data_dir"`
	DeployDir string `json:"deploy_dir"`

	ComponentName string
	Port          int
}

InstInfo represents an instance info

type JSONOutput

type JSONOutput struct {
	ClusterMetaInfo ClusterMetaInfo `json:"cluster_meta"`
	InstanceInfos   []InstInfo      `json:"instances"`
}

JSONOutput holds the structure for the JSON output of `tiup cluster display --json`

type KafkaDeployOptions

type KafkaDeployOptions struct {
	User              string // username to login to the SSH server
	IdentityFile      string // path to the private key file
	UsePassword       bool   // use password instead of identity file for ssh connection
	IgnoreConfigCheck bool   // ignore config check result
}

DeployOptions contains the options for scale out.

type KafkaPerfOpt

type KafkaPerfOpt struct {
	// Arguments for consumer/producer and E2E
	Partitions    int // The number of partitions
	NumOfRecords  int // The number of records to be tested
	BytesOfRecord int // The Bytes per record to be tested

	// End 2 End performance test
	ProducerAcks string

	// DataType
	DataTypeDtr []string
}

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

Manager to deploy a cluster.

func NewManager

func NewManager(sysName string, specManager *spec.SpecManager, bindVersion spec.BindVersion) *Manager

NewManager create a Manager.

func (*Manager) AcceptVPCPeering

func (m *Manager) AcceptVPCPeering(clusterName, clusterType string, listComponent []string) error

func (*Manager) Aurora2TiDBCloudDeploy

func (m *Manager) Aurora2TiDBCloudDeploy(
	name string,
	topoFile string,
	skipConfirm bool,
	gOpt operator.Options,
) error

func (*Manager) Aurora2TiDBCloudPrepareCluster

func (m *Manager) Aurora2TiDBCloudPrepareCluster(clusterName string, opt operator.LatencyWhenBatchOptions, gOpt operator.Options) error

------------- Latency measurement

func (*Manager) Aurora2TiDBCloudRunCluster

func (m *Manager) Aurora2TiDBCloudRunCluster(clusterName string, opt operator.LatencyWhenBatchOptions, gOpt operator.Options) error

func (*Manager) Aurora2TiDBCloudRunTiDBCloudCluster

func (m *Manager) Aurora2TiDBCloudRunTiDBCloudCluster(clusterName string, opt operator.LatencyWhenBatchOptions, gOpt operator.Options) error

func (*Manager) AuroraDeploy

func (m *Manager) AuroraDeploy(
	name string,
	topoFile string,
	opt AuroraDeployOptions,
	afterDeploy func(b *task.Builder, newPart spec.Topology),
	skipConfirm bool,
	gOpt operator.Options,
) error

Deploy a cluster.

func (*Manager) CheckCluster

func (m *Manager) CheckCluster(clusterOrTopoName string, opt CheckOptions, gOpt operator.Options) error

CheckCluster check cluster before deploying or upgrading

func (*Manager) CleanCluster

func (m *Manager) CleanCluster(name string, gOpt operator.Options, cleanOpt operator.Options, skipConfirm bool) error

CleanCluster cleans the cluster without destroying it

func (*Manager) Deploy

func (m *Manager) Deploy(
	name string,
	topoFile string,
	opt DeployOptions,
	afterDeploy func(b *task.Builder, newPart spec.Topology),
	skipConfirm bool,
	gOpt operator.Options,
) error

Deploy a cluster.

func (*Manager) DestroyAurora2TiDBCloudCluster

func (m *Manager) DestroyAurora2TiDBCloudCluster(name string, gOpt operator.Options, destroyOpt operator.Options, skipConfirm bool) error

func (*Manager) DestroyAuroraCluster

func (m *Manager) DestroyAuroraCluster(name string, gOpt operator.Options, destroyOpt operator.Options, skipConfirm bool) error

func (*Manager) DestroyCluster

func (m *Manager) DestroyCluster(name string, gOpt operator.Options, destroyOpt operator.Options, skipConfirm bool) error

DestroyCluster destroy the cluster.

func (*Manager) DestroyKafkaCluster

func (m *Manager) DestroyKafkaCluster(name string, gOpt operator.Options, destroyOpt operator.Options, skipConfirm bool) error

DestroyCluster destroy the cluster.

func (*Manager) DestroyMySQL2TiDBCloudCluster

func (m *Manager) DestroyMySQL2TiDBCloudCluster(name, clusterType string, gOpt operator.Options, destroyOpt operator.Options, skipConfirm bool) error

func (*Manager) DestroyOssInsight

func (m *Manager) DestroyOssInsight(name string, gOpt operator.Options, destroyOpt operator.Options, skipConfirm bool) error

func (*Manager) DestroyPDNSService

func (m *Manager) DestroyPDNSService(name string, gOpt operator.Options, destroyOpt operator.Options, skipConfirm bool) error

DestroyCluster destroy the cluster.

func (*Manager) DestroyPostgresCluster

func (m *Manager) DestroyPostgresCluster(name string, gOpt operator.Options, destroyOpt operator.Options, skipConfirm bool) error

func (*Manager) DestroyS3DeltaLakeCluster

func (m *Manager) DestroyS3DeltaLakeCluster(name, clusterType string, gOpt operator.Options, destroyOpt operator.Options, skipConfirm bool) error

DestroyCluster destroy the cluster.

func (*Manager) DestroyTiDB2AuroraCluster

func (m *Manager) DestroyTiDB2AuroraCluster(name string, gOpt operator.Options, destroyOpt operator.Options, skipConfirm bool) error

DestroyCluster destroy the cluster.

func (*Manager) DestroyTiDB2Kafka2ESCluster

func (m *Manager) DestroyTiDB2Kafka2ESCluster(name, clusterType string, gOpt operator.Options, destroyOpt operator.Options, skipConfirm bool) error

DestroyCluster destroy the cluster.

func (*Manager) DestroyTiDB2Kafka2MongoCluster

func (m *Manager) DestroyTiDB2Kafka2MongoCluster(name, clusterType string, gOpt operator.Options, destroyOpt operator.Options, skipConfirm bool) error

DestroyCluster destroy the cluster.

func (*Manager) DestroyTiDB2Kafka2PgCluster

func (m *Manager) DestroyTiDB2Kafka2PgCluster(name, clusterType string, gOpt operator.Options, destroyOpt operator.Options, skipConfirm bool) error

DestroyCluster destroy the cluster.

func (*Manager) DestroyTiDB2Kafka2RedshiftCluster

func (m *Manager) DestroyTiDB2Kafka2RedshiftCluster(name, clusterType string, gOpt operator.Options, destroyOpt operator.Options, skipConfirm bool) error

DestroyCluster destroy the cluster.

func (*Manager) DestroyTiDB2MSCluster

func (m *Manager) DestroyTiDB2MSCluster(name string, gOpt operator.Options, destroyOpt operator.Options, skipConfirm bool) error

DestroyCluster destroy the cluster.

func (*Manager) DestroyTiDB2Msk2RedshiftCluster

func (m *Manager) DestroyTiDB2Msk2RedshiftCluster(name, clusterType string, gOpt operator.Options, destroyOpt operator.Options, skipConfirm bool) error

DestroyCluster destroy the cluster.

func (*Manager) DestroyTiDB2OraCluster

func (m *Manager) DestroyTiDB2OraCluster(name string, gOpt operator.Options, destroyOpt operator.Options, skipConfirm bool) error

DestroyCluster destroy the cluster.

func (*Manager) DestroyTiDBCloudCluster

func (m *Manager) DestroyTiDBCloudCluster(projectID uint64, name, clusterType string) error

DestroyCluster destroy the cluster.

func (*Manager) DestroyTiDBCluster

func (m *Manager) DestroyTiDBCluster(name, clusterType string, gOpt operator.Options, destroyOpt operator.Options, skipConfirm bool) error

DestroyCluster destroy the cluster.

func (*Manager) DestroyTombstone

func (m *Manager) DestroyTombstone(
	name string,
	gOpt operator.Options,
	skipConfirm bool,
) error

DestroyTombstone destroy and remove instances that is in tombstone state

func (*Manager) DestroyWorkstation

func (m *Manager) DestroyWorkstation(name string, gOpt operator.Options, skipConfirm bool) error

DestroyCluster destroy the cluster.

func (*Manager) Display

func (m *Manager) Display(name string, opt operator.Options) error

Display cluster meta and topology.

func (*Manager) EditConfig

func (m *Manager) EditConfig(name string, skipConfirm bool) error

EditConfig lets the user edit the cluster's config.

func (*Manager) EnableCluster

func (m *Manager) EnableCluster(name string, gOpt operator.Options, isEnable bool) error

EnableCluster enable/disable the service in a cluster

func (*Manager) Exec

func (m *Manager) Exec(name string, opt ExecOptions, gOpt operator.Options) error

Exec shell command on host in the tidb cluster.

func (*Manager) GetClusterList

func (m *Manager) GetClusterList() ([]Cluster, error)

GetClusterList get the clusters list.

func (*Manager) GetClusterTopology

func (m *Manager) GetClusterTopology(name string, opt operator.Options) ([]InstInfo, error)

GetClusterTopology get the topology of the cluster.

func (*Manager) InstallThanos

func (m *Manager) InstallThanos(
	clusterName, clusterType string,
	opt operator.ThanosS3Config,
	gOpt operator.Options,
) error

func (*Manager) KafkaDeploy

func (m *Manager) KafkaDeploy(
	name string,
	topoFile string,
	opt DeployOptions,
	afterDeploy func(b *task.Builder, newPart spec.Topology),
	skipConfirm bool,
	gOpt operator.Options,
) error

Deploy a cluster.

func (*Manager) KafkaScale

func (m *Manager) KafkaScale(
	name string,
	topoFile string,
	opt DeployOptions,
	afterDeploy func(b *task.Builder, newPart spec.Topology),
	skipConfirm bool,
	gOpt operator.Options,
) error

Scale a cluster.

func (*Manager) ListAurora2TiDBCloudCluster

func (m *Manager) ListAurora2TiDBCloudCluster(clusterName string, opt DeployOptions) error

Cluster represents a clsuter ListCluster list the clusters.

func (*Manager) ListAuroraCluster

func (m *Manager) ListAuroraCluster(clusterName string, opt DeployOptions) error

Cluster represents a clsuter ListCluster list the clusters.

func (*Manager) ListAwsResources

func (m *Manager) ListAwsResources(name string) error

Deploy a cluster.

func (*Manager) ListCluster

func (m *Manager) ListCluster(clusterName string, opt DeployOptions) error

ListCluster list the clusters.

func (*Manager) ListKafkaCluster

func (m *Manager) ListKafkaCluster(clusterName string, opt DeployOptions) error

Cluster represents a clsuter ListCluster list the clusters.

func (*Manager) ListMySQL2TiDBCloudCluster

func (m *Manager) ListMySQL2TiDBCloudCluster(clusterName, clusterType string, opt DeployOptions) error

Cluster represents a clsuter ListCluster list the clusters.

func (*Manager) ListOssInsight

func (m *Manager) ListOssInsight(clusterName string, opt DeployOptions) error

Cluster represents a clsuter ListCluster list the clusters.

func (*Manager) ListPDNSService

func (m *Manager) ListPDNSService(clusterName string, opt DeployOptions) error

Cluster represents a clsuter ListCluster list the clusters.

func (*Manager) ListPostgresCluster

func (m *Manager) ListPostgresCluster(clusterName string, opt DeployOptions) error

Cluster represents a clsuter ListCluster list the clusters.

func (*Manager) ListS3DeltaLakeCluster

func (m *Manager) ListS3DeltaLakeCluster(clusterName, clusterType string, opt DeployOptions) error

Cluster represents a clsuter ListCluster list the clusters.

func (*Manager) ListTiDB2AuroraCluster

func (m *Manager) ListTiDB2AuroraCluster(clusterName string, opt DeployOptions) error

Cluster represents a clsuter ListCluster list the clusters.

func (*Manager) ListTiDB2Kafka2ESCluster

func (m *Manager) ListTiDB2Kafka2ESCluster(clusterName, clusterType string, opt DeployOptions) error

Cluster represents a clsuter ListCluster list the clusters.

func (*Manager) ListTiDB2Kafka2MongoCluster

func (m *Manager) ListTiDB2Kafka2MongoCluster(clusterName, clusterType string, opt DeployOptions) error

Cluster represents a clsuter ListCluster list the clusters.

func (*Manager) ListTiDB2Kafka2PgCluster

func (m *Manager) ListTiDB2Kafka2PgCluster(clusterName, clusterType string, opt DeployOptions) error

Cluster represents a clsuter ListCluster list the clusters.

func (*Manager) ListTiDB2Kafka2RedshiftCluster

func (m *Manager) ListTiDB2Kafka2RedshiftCluster(clusterName, clusterType string, opt DeployOptions) error

Cluster represents a clsuter ListCluster list the clusters.

func (*Manager) ListTiDB2MSCluster

func (m *Manager) ListTiDB2MSCluster(clusterName string, opt DeployOptions) error

Cluster represents a clsuter ListCluster list the clusters.

func (*Manager) ListTiDB2Msk2RedshiftCluster

func (m *Manager) ListTiDB2Msk2RedshiftCluster(clusterName, clusterType string, opt DeployOptions) error

Cluster represents a clsuter ListCluster list the clusters.

func (*Manager) ListTiDB2OraCluster

func (m *Manager) ListTiDB2OraCluster(clusterName string, opt DeployOptions) error

Cluster represents a clsuter ListCluster list the clusters.

func (*Manager) ListTiDBCloudCluster

func (m *Manager) ListTiDBCloudCluster(projectID uint64, clusterName, status string) error

Cluster represents a clsuter ListCluster list the clusters.

func (*Manager) ListTiDBCluster

func (m *Manager) ListTiDBCluster(clusterName, clusterType string, opt DeployOptions) error

Cluster represents a clsuter ListCluster list the clusters.

func (*Manager) ListWorkstation

func (m *Manager) ListWorkstation(clusterName string, opt DeployOptions) error

Cluster represents a clsuter ListCluster list the clusters.

func (*Manager) Mysql2TiDBCloudDeploy

func (m *Manager) Mysql2TiDBCloudDeploy(
	name, clusterType string,
	topoFile string,
	skipConfirm bool,
	gOpt operator.Options,
) error

func (*Manager) OssInsightAdjustGithubEventsValume

func (m *Manager) OssInsightAdjustGithubEventsValume(
	clusterName string,
	numOfMillions int,
	opt OssInsightDeployOptions,
	afterDeploy func(b *task.Builder, newPart spec.Topology),
	skipConfirm bool,
	gOpt operator.Options,
) error

func (*Manager) OssInsightCountTables

func (m *Manager) OssInsightCountTables(
	clusterName string,
	opt OssInsightDeployOptions,
	afterDeploy func(b *task.Builder, newPart spec.Topology),
	skipConfirm bool,
	gOpt operator.Options,
) error

func (*Manager) OssInsightDeploy

func (m *Manager) OssInsightDeploy(
	clusterName string,
	numOfMillions int,
	opt OssInsightDeployOptions,
	afterDeploy func(b *task.Builder, newPart spec.Topology),
	skipConfirm bool,
	gOpt operator.Options,
) error

Deploy a cluster.

func (*Manager) OssInsightHistoricalTest

func (m *Manager) OssInsightHistoricalTest(
	clusterName string,
	opt OssInsightDeployOptions,
	afterDeploy func(b *task.Builder, newPart spec.Topology),
	skipConfirm bool,
	gOpt operator.Options,
) error

func (*Manager) OssInsightTestCase

func (m *Manager) OssInsightTestCase(
	clusterName string,
	numExeTime int,
	queryType string,
	opt OssInsightDeployOptions,
	afterDeploy func(b *task.Builder, newPart spec.Topology),
	skipConfirm bool,
	gOpt operator.Options,
) error

func (*Manager) PDNSDeploy

func (m *Manager) PDNSDeploy(
	name string,
	topoFile string,
	opt PDNSDeployOptions,
	afterDeploy func(b *task.Builder, newPart spec.Topology),
	skipConfirm bool,
	gOpt operator.Options,
) error

Deploy a cluster.

func (*Manager) Patch

func (m *Manager) Patch(name string, packagePath string, opt operator.Options, overwrite, offline, skipConfirm bool) error

Patch the cluster.

func (*Manager) PauseTiDBCloudCluster

func (m *Manager) PauseTiDBCloudCluster(projectID uint64, name, clusterType string) error

DestroyCluster destroy the cluster.

func (*Manager) PerfCleanMongo2Kafka2TiDB

func (m *Manager) PerfCleanMongo2Kafka2TiDB(clusterName, clusterType string, gOpt operator.Options) error

func (*Manager) PerfCleanPG2Kafka2TiDB

func (m *Manager) PerfCleanPG2Kafka2TiDB(clusterName, clusterType string, gOpt operator.Options) error

func (*Manager) PerfCleanTiDB2Kafka2ES

func (m *Manager) PerfCleanTiDB2Kafka2ES(clusterName, clusterType string, gOpt operator.Options) error

func (*Manager) PerfCleanTiDB2Kafka2PG

func (m *Manager) PerfCleanTiDB2Kafka2PG(clusterName, clusterType string, gOpt operator.Options) error

func (*Manager) PerfCleanTiDB2Kafka2Redshift

func (m *Manager) PerfCleanTiDB2Kafka2Redshift(clusterName, clusterType string, gOpt operator.Options) error

func (*Manager) PerfKafkaE2E

func (m *Manager) PerfKafkaE2E(clusterName string, perfOpt KafkaPerfOpt, gOpt operator.Options) error

func (*Manager) PerfKafkaPC

func (m *Manager) PerfKafkaPC(clusterName string, perfOpt KafkaPerfOpt, gOpt operator.Options) error

func (*Manager) PerfPG2Kafka2TiDB

func (m *Manager) PerfPG2Kafka2TiDB(clusterName, clusterType string, perfOpt KafkaPerfOpt, gOpt operator.Options) error

func (*Manager) PerfPrepareMongo2Kafka2TiDB

func (m *Manager) PerfPrepareMongo2Kafka2TiDB(clusterName, clusterType string, perfOpt MongoPerfOpt, gOpt operator.Options) error

func (*Manager) PerfPreparePG2Kafka2TiDB

func (m *Manager) PerfPreparePG2Kafka2TiDB(clusterName, clusterType string, perfOpt KafkaPerfOpt, gOpt operator.Options) error
*****************************************************************************

Parameters:

perfOpt
  -> DataTypeDtr: ["int", "varchar"]

func (*Manager) PerfPrepareTiDB2Kafka2ES

func (m *Manager) PerfPrepareTiDB2Kafka2ES(clusterName, clusterType string, perfOpt KafkaPerfOpt, gOpt operator.Options) error
*****************************************************************************

Parameters:

perfOpt
  -> DataTypeDtr: ["int", "varchar"]

func (*Manager) PerfPrepareTiDB2Kafka2PG

func (m *Manager) PerfPrepareTiDB2Kafka2PG(clusterName, clusterType string, perfOpt KafkaPerfOpt, gOpt operator.Options) error
*****************************************************************************

Parameters:

perfOpt
  -> DataTypeDtr: ["int", "varchar"]

func (*Manager) PerfPrepareTiDB2Kafka2Redshift

func (m *Manager) PerfPrepareTiDB2Kafka2Redshift(clusterName, clusterType string, perfOpt KafkaPerfOpt, gOpt operator.Options) error
*****************************************************************************

Parameters:

perfOpt
  -> DataTypeDtr: ["int", "varchar"]

func (*Manager) PerfPrepareTiDB2MSK2Redshift

func (m *Manager) PerfPrepareTiDB2MSK2Redshift(clusterName, clusterType string, perfOpt KafkaPerfOpt, gOpt operator.Options) error

****************************************************************************

Parameters:

perfOpt
  -> DataTypeDtr: ["int", "varchar"]

func (*Manager) PerfRunMongo2Kafka2TiDB

func (m *Manager) PerfRunMongo2Kafka2TiDB(clusterName, clusterType string, perfOpt MongoPerfOpt, gOpt operator.Options) error

func (*Manager) PerfTiDB2Kafka2ES

func (m *Manager) PerfTiDB2Kafka2ES(clusterName, clusterType string, perfOpt KafkaPerfOpt, gOpt operator.Options) error

func (*Manager) PerfTiDB2Kafka2PG

func (m *Manager) PerfTiDB2Kafka2PG(clusterName, clusterType string, perfOpt KafkaPerfOpt, gOpt operator.Options) error

func (*Manager) PerfTiDB2Kafka2Redshift

func (m *Manager) PerfTiDB2Kafka2Redshift(clusterName, clusterType string, perfOpt KafkaPerfOpt, gOpt operator.Options) error

func (*Manager) PostgresDeploy

func (m *Manager) PostgresDeploy(
	name string,
	topoFile string,
	opt PostgresDeployOptions,
	afterDeploy func(b *task.Builder, newPart spec.Topology),
	skipConfirm bool,
	gOpt operator.Options,
) error

Deploy a cluster.

func (*Manager) PrepareSysbenchTiCDC

func (m *Manager) PrepareSysbenchTiCDC(name string, gOpt operator.Options, scriptParam task.ScriptParam) error

func (*Manager) QuerySyncStatusAurora2TiDBCloudCluster

func (m *Manager) QuerySyncStatusAurora2TiDBCloudCluster(clusterName string, gOpt operator.Options) error

func (*Manager) Reload

func (m *Manager) Reload(name string, gOpt operator.Options, skipRestart, skipConfirm bool) error

Reload the cluster.

func (*Manager) Rename

func (m *Manager) Rename(name string, opt operator.Options, newName string, skipConfirm bool) error

Rename the cluster

func (*Manager) RestartCluster

func (m *Manager) RestartCluster(name string, gOpt operator.Options, skipConfirm bool) error

RestartCluster restart the cluster.

func (*Manager) ResumeTiDBCloudCluster

func (m *Manager) ResumeTiDBCloudCluster(projectID uint64, name, clusterType string) error

func (*Manager) ScaleIn

func (m *Manager) ScaleIn(
	name string,
	skipConfirm bool,
	gOpt operator.Options,
	scale func(builer *task.Builder, metadata spec.Metadata, tlsCfg *tls.Config),
) error

ScaleIn the cluster.

func (*Manager) ScaleOut

func (m *Manager) ScaleOut(
	name string,
	topoFile string,
	afterDeploy func(b *task.Builder, newPart spec.Topology),
	final func(b *task.Builder, name string, meta spec.Metadata),
	opt DeployOptions,
	skipConfirm bool,
	gOpt operator.Options,
) error

ScaleOut scale out the cluster.

func (*Manager) ShowVPCPeering

func (m *Manager) ShowVPCPeering(clusterName, clusterType string, listComponent []string) error

func (*Manager) StartCluster

func (m *Manager) StartCluster(name string, gOpt operator.Options, fn ...func(b *task.Builder, metadata spec.Metadata)) error

StartCluster start the cluster with specified name.

func (*Manager) StartSyncAurora2TiDBCloudCluster

func (m *Manager) StartSyncAurora2TiDBCloudCluster(clusterName string, gOpt operator.Options) error

func (*Manager) StopCluster

func (m *Manager) StopCluster(name string, gOpt operator.Options, skipConfirm bool) error

StopCluster stop the cluster.

func (*Manager) StopSyncTaskAurora2TiDBCloudCluster

func (m *Manager) StopSyncTaskAurora2TiDBCloudCluster(clusterName string, gOpt operator.Options) error

func (*Manager) SysbenchTiCDC

func (m *Manager) SysbenchTiCDC(name string, gOpt operator.Options) error

func (*Manager) TiDB2AuroraDeploy

func (m *Manager) TiDB2AuroraDeploy(
	name string,
	topoFile string,
	opt TiDB2AuroraDeployOptions,
	afterDeploy func(b *task.Builder, newPart spec.Topology),
	skipConfirm bool,
	gOpt operator.Options,
) error

Deploy a cluster.

func (*Manager) TiDB2Kafka2ESDeploy

func (m *Manager) TiDB2Kafka2ESDeploy(
	name, clusterType string,
	topoFile string,
	opt TiDB2Kafka2PgDeployOptions,
	gOpt operator.Options,
) error

Deploy a cluster.

func (*Manager) TiDB2Kafka2MongoDeploy

func (m *Manager) TiDB2Kafka2MongoDeploy(
	name, clusterType string,
	topoFile string,
	opt TiDB2Kafka2MongoDeployOptions,
	gOpt operator.Options,
) error

Deploy a cluster.

func (*Manager) TiDB2Kafka2PgDeploy

func (m *Manager) TiDB2Kafka2PgDeploy(
	name, clusterType string,
	topoFile string,
	opt TiDB2Kafka2PgDeployOptions,
	gOpt operator.Options,
) error

Deploy a cluster.

func (*Manager) TiDB2Kafka2RedshiftDeploy

func (m *Manager) TiDB2Kafka2RedshiftDeploy(
	name, clusterType string,
	topoFile string,
	opt TiDB2Kafka2PgDeployOptions,
	gOpt operator.Options,
) error

Deploy a cluster.

func (*Manager) TiDB2MSDeploy

func (m *Manager) TiDB2MSDeploy(
	name string,
	topoFile string,
	opt TiDB2MSDeployOptions,
	afterDeploy func(b *task.Builder, newPart spec.Topology),
	skipConfirm bool,
	gOpt operator.Options,
) error

Deploy a cluster.

func (*Manager) TiDB2MSScale

func (m *Manager) TiDB2MSScale(
	name string,
	topoFile string,
	opt TiDB2MSScaleOptions,
	afterDeploy func(b *task.Builder, newPart spec.Topology),
	skipConfirm bool,
	gOpt operator.Options,
) error

Scale a cluster.

func (*Manager) TiDB2Msk2RedshiftDeploy

func (m *Manager) TiDB2Msk2RedshiftDeploy(
	name, clusterType string,
	topoFile string,
	opt TiDB2Kafka2PgDeployOptions,
	gOpt operator.Options,
) error

Deploy a cluster.

func (*Manager) TiDB2OraDeploy

func (m *Manager) TiDB2OraDeploy(
	name string,
	topoFile string,
	opt TiDB2OraDeployOptions,
	afterDeploy func(b *task.Builder, newPart spec.Topology),
	skipConfirm bool,
	gOpt operator.Options,
) error

Deploy a cluster.

func (*Manager) TiDB2S3DeltaLakeDeploy

func (m *Manager) TiDB2S3DeltaLakeDeploy(
	name, clusterType string,
	topoFile string,
	opt TiDB2Kafka2PgDeployOptions,
	gOpt operator.Options,
) error

Deploy a cluster.

func (*Manager) TiDBCloudDeploy

func (m *Manager) TiDBCloudDeploy(
	name, clusterType string,
	topoFile string,
	opt DeployOptions,
	afterDeploy func(b *task.Builder, newPart spec.Topology),
	skipConfirm bool,
	gOpt operator.Options,
) error

func (*Manager) TiDBCloudScale

func (m *Manager) TiDBCloudScale(
	name, clusterType string,
	topoFile string,
	opt DeployOptions,
	afterDeploy func(b *task.Builder, newPart spec.Topology),
	skipConfirm bool,
	gOpt operator.Options,
) error

Scale a cluster.

func (*Manager) TiDBDeploy

func (m *Manager) TiDBDeploy(
	name, clusterType string,
	topoFile string,
	opt DeployOptions,
	afterDeploy func(b *task.Builder, newPart spec.Topology),
	skipConfirm bool,
	gOpt operator.Options,
) error

Deploy a cluster.

func (*Manager) TiDBMeasureLatencyCleanupCluster

func (m *Manager) TiDBMeasureLatencyCleanupCluster(clusterName, clusterType string, gOpt operator.Options) error

func (*Manager) TiDBMeasureLatencyPrepareCluster

func (m *Manager) TiDBMeasureLatencyPrepareCluster(clusterName, clusterType string, opt operator.LatencyWhenBatchOptions, gOpt operator.Options) error

------------- Latency measurement

func (*Manager) TiDBMeasureLatencyRunCluster

func (m *Manager) TiDBMeasureLatencyRunCluster(clusterName, clusterType string, opt operator.LatencyWhenBatchOptions, gOpt operator.Options) error

func (*Manager) TiDBPerfRecursiveCleanupCluster

func (m *Manager) TiDBPerfRecursiveCleanupCluster(clusterName, clusterType string, gOpt operator.Options) error

func (*Manager) TiDBRecursivePrepareCluster

func (m *Manager) TiDBRecursivePrepareCluster(clusterName, clusterType string, opt operator.LatencyWhenBatchOptions, gOpt operator.Options) error

------------- recursive query performance on TiFlash

func (*Manager) TiDBRecursiveRunCluster

func (m *Manager) TiDBRecursiveRunCluster(clusterName, clusterType string, numUsers, numPayments string, gOpt operator.Options) error

func (*Manager) TiDBScale

func (m *Manager) TiDBScale(
	name, clusterType string,
	topoFile string,
	opt DeployOptions,
	afterDeploy func(b *task.Builder, newPart spec.Topology),
	skipConfirm bool,
	gOpt operator.Options,
) error

Scale a cluster.

func (*Manager) Transfer

func (m *Manager) Transfer(name string, opt TransferOptions, gOpt operator.Options) error

Transfer copies files from or to host in the tidb cluster.

func (*Manager) Upgrade

func (m *Manager) Upgrade(name string, clusterVersion string, opt operator.Options, skipConfirm, offline bool) error

Upgrade the cluster.

func (*Manager) WorkstationDeploy

func (m *Manager) WorkstationDeploy(
	name string,
	topoFile string,
	opt DeployOptions,

	skipConfirm bool,
	gOpt operator.Options,
) error

Deploy a cluster.

type MapPG2TiDB

type MapPG2TiDB struct {
	PG2TiDB []struct {
		TiDB struct {
			DataType string   `yaml:"DataType"`
			Def      string   `yaml:"Def"`
			Queries  []string `yaml:"Query,omitempty"`
		} `yaml:"TiDB"`
		PG struct {
			DataType string   `yaml:"DataType"`
			Def      string   `yaml:"Def"`
			Queries  []string `yaml:"Query,omitempty"`
		} `yaml:"PG"`
		Value string `yaml:"Value"`
	} `yaml:"MapPG2TiDB"`
}

type MapTiDB2PG

type MapTiDB2PG struct {
	TiDB2PG []struct {
		TiDB struct {
			DataType string   `yaml:"DataType"`
			Def      string   `yaml:"Def"`
			Queries  []string `yaml:"Query,omitempty"`
		} `yaml:"TiDB"`
		PG struct {
			DataType string   `yaml:"DataType"`
			Def      string   `yaml:"Def"`
			Queries  []string `yaml:"Query,omitempty"`
		} `yaml:"PG"`
		Value string `yaml:"Value"`
	} `yaml:"MapTiDB2PG"`
}

type MongoPerfOpt

type MongoPerfOpt struct {
}

type OssInsightDeployOptions

type OssInsightDeployOptions struct {
	User              string // username to login to the SSH server
	IdentityFile      string // path to the private key file
	UsePassword       bool   // use password instead of identity file for ssh connection
	IgnoreConfigCheck bool   // ignore config check result
}

DeployOptions contains the options for scale out.

type PDNSDeployOptions

type PDNSDeployOptions struct {
	User              string // username to login to the SSH server
	IdentityFile      string // path to the private key file
	UsePassword       bool   // use password instead of identity file for ssh connection
	IgnoreConfigCheck bool   // ignore config check result
}

DeployOptions contains the options for scale out.

type PostgresDeployOptions

type PostgresDeployOptions struct {
	User              string // username to login to the SSH server
	IdentityFile      string // path to the private key file
	UsePassword       bool   // use password instead of identity file for ssh connection
	IgnoreConfigCheck bool   // ignore config check result
}

DeployOptions contains the options for scale out.

type TiDB2AuroraDeployOptions

type TiDB2AuroraDeployOptions struct {
	User              string // username to login to the SSH server
	IdentityFile      string // path to the private key file
	UsePassword       bool   // use password instead of identity file for ssh connection
	IgnoreConfigCheck bool   // ignore config check result
}

DeployOptions contains the options for scale out.

type TiDB2Kafka2MongoDeployOptions

type TiDB2Kafka2MongoDeployOptions struct {
	User              string // username to login to the SSH server
	IdentityFile      string // path to the private key file
	UsePassword       bool   // use password instead of identity file for ssh connection
	IgnoreConfigCheck bool   // ignore config check result
}

DeployOptions contains the options for scale out.

type TiDB2Kafka2PgDeployOptions

type TiDB2Kafka2PgDeployOptions struct {
	User              string // username to login to the SSH server
	IdentityFile      string // path to the private key file
	UsePassword       bool   // use password instead of identity file for ssh connection
	IgnoreConfigCheck bool   // ignore config check result
}

DeployOptions contains the options for scale out.

type TiDB2MSDeployOptions

type TiDB2MSDeployOptions struct {
	User              string // username to login to the SSH server
	IdentityFile      string // path to the private key file
	UsePassword       bool   // use password instead of identity file for ssh connection
	IgnoreConfigCheck bool   // ignore config check result
}

DeployOptions contains the options for scale out.

type TiDB2MSScaleOptions

type TiDB2MSScaleOptions struct {
	User              string // username to login to the SSH server
	IdentityFile      string // path to the private key file
	UsePassword       bool   // use password instead of identity file for ssh connection
	IgnoreConfigCheck bool   // ignore config check result
}

TiDB2MSScaleOptions contains the options for scale.

type TiDB2OraDeployOptions

type TiDB2OraDeployOptions struct {
	User              string // username to login to the SSH server
	IdentityFile      string // path to the private key file
	UsePassword       bool   // use password instead of identity file for ssh connection
	IgnoreConfigCheck bool   // ignore config check result
}

DeployOptions contains the options for scale out.

type TiDBDeployOptions

type TiDBDeployOptions struct {
	User              string // username to login to the SSH server
	IdentityFile      string // path to the private key file
	UsePassword       bool   // use password instead of identity file for ssh connection
	IgnoreConfigCheck bool   // ignore config check result
}

DeployOptions contains the options for scale out.

type TransferOptions

type TransferOptions struct {
	Local  string
	Remote string
	Pull   bool // default to push
	Limit  int  // rate limit in Kbit/s
}

TransferOptions for exec shell commanm.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL