deploy

package
v1.3.7 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2021 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TmpWorkDirectory    string = "/tmp/"
	CkClusterNodeAdd    int    = 1
	CkClusterNodeDelete int    = 2
)

Variables

This section is empty.

Functions

func AddCkClusterNode

func AddCkClusterNode(conf *model.CKManClickHouseConfig, req *model.AddNodeReq) error

func DeleteCkClusterNode

func DeleteCkClusterNode(conf *model.CKManClickHouseConfig, ip string) error

func DestroyCkCluster

func DestroyCkCluster(conf *model.CKManClickHouseConfig) error

func GenerateMacrosTemplate added in v1.3.3

func GenerateMacrosTemplate(templateFile string, conf *model.CkDeployConfig, hostIp string) (string, error)

func GenerateMetrikaTemplate

func GenerateMetrikaTemplate(templateFile string, conf *model.CkDeployConfig, hostIp string) (string, error)

func ParseConfigTemplate

func ParseConfigTemplate(templateFile string, conf CkConfigTemplate) (string, error)

func StartCkCluster

func StartCkCluster(conf *model.CKManClickHouseConfig) error

func StopCkCluster

func StopCkCluster(conf *model.CKManClickHouseConfig) error

func UpgradeCkCluster

func UpgradeCkCluster(conf *model.CKManClickHouseConfig, version string) error

Types

type CKDeploy

type CKDeploy struct {
	DeployBase
	Conf      *model.CkDeployConfig
	HostInfos []HostInfo
}

func (*CKDeploy) Check

func (d *CKDeploy) Check() error

func (*CKDeploy) Config

func (d *CKDeploy) Config() error

func (*CKDeploy) Init

func (d *CKDeploy) Init(base *DeployBase, conf interface{}) error

func (*CKDeploy) Install

func (d *CKDeploy) Install() error

func (*CKDeploy) Prepare

func (d *CKDeploy) Prepare() error

func (*CKDeploy) Start

func (d *CKDeploy) Start() error

func (*CKDeploy) Stop

func (d *CKDeploy) Stop() error

func (*CKDeploy) Uninstall

func (d *CKDeploy) Uninstall() error

func (*CKDeploy) Upgrade

func (d *CKDeploy) Upgrade() error

type CKDeployFacotry

type CKDeployFacotry struct{}

func (CKDeployFacotry) Create

func (CKDeployFacotry) Create() Deploy

type CkConfigTemplate

type CkConfigTemplate struct {
	CkTcpPort         int
	CkHttpPort        int
	Path              string
	User              string
	Password          string
	ClusterName       string
	MaxMemoryPerQuery int64
	MaxMemoryAllQuery int64
	MaxBytesGroupBy   int64
}

type CkUpdateNodeParam

type CkUpdateNodeParam struct {
	Ip       string
	Hostname string
	Shard    int
	Op       int
}

type Cluster

type Cluster struct {
	XMLName xml.Name
	Shards  []Shard
}

type Deploy

type Deploy interface {
	Init(base *DeployBase, conf interface{}) error
	Prepare() error
	Install() error
	Config() error
	Start() error
	Check() error
}

type DeployBase

type DeployBase struct {
	Hosts     []string
	Packages  []string
	User      string
	Password  string
	Port      int
	Directory string
	Pool      *common.WorkerPool
}

type DeployFactory

type DeployFactory interface {
	Create() Deploy
}

工厂方法

type HostInfo

type HostInfo struct {
	MemoryTotal int
}

type Macro

type Macro struct {
	Cluster string `xml:"cluster"`
	Shard   int    `xml:"shard"`
	Replica string `xml:"replica"`
}

type MacroConf added in v1.3.3

type MacroConf struct {
	XMLName xml.Name `xml:"yandex"`
	Macros  Macro    `xml:"macros"`
}

type Metrika

type Metrika struct {
	XMLName   xml.Name  `xml:"yandex"`
	ZkServers []Node    `xml:"zookeeper-servers>Node"`
	CkServers []Cluster `xml:"clickhouse_remote_servers>Cluster"`
}

type Node

type Node struct {
	XMLName xml.Name `xml:"node"`
	Index   int      `xml:"index,attr"`
	Host    string   `xml:"host"`
	Port    int      `xml:"port"`
}

type Replica

type Replica struct {
	XMLName xml.Name `xml:"replica"`
	Host    string   `xml:"host"`
	Port    int      `xml:"port"`
}

type Shard

type Shard struct {
	XMLName     xml.Name `xml:"shard"`
	Replication bool     `xml:"internal_replication"`
	Replicas    []Replica
}

type ZKDeploy

type ZKDeploy struct {
	DeployBase
}

func (*ZKDeploy) Check

func (d *ZKDeploy) Check() error

func (*ZKDeploy) Config

func (d *ZKDeploy) Config() error

func (*ZKDeploy) Init

func (d *ZKDeploy) Init(base *DeployBase, conf interface{}) error

func (*ZKDeploy) Install

func (d *ZKDeploy) Install() error

func (*ZKDeploy) Prepare

func (d *ZKDeploy) Prepare() error

func (*ZKDeploy) Start

func (d *ZKDeploy) Start() error

type ZKDeployFacotry

type ZKDeployFacotry struct{}

func (ZKDeployFacotry) Create

func (ZKDeployFacotry) Create() Deploy

Jump to

Keyboard shortcuts

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