install

package
v0.0.0-...-1f20b29 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2018 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Clusters = map[string]*SyncedCluster{}

Memoizes cluster info for install operations

View Source
var StartOpts struct {
	Encrypt    bool
	Sequential bool
}

Functions

func GetAdminUIPort

func GetAdminUIPort(connPort int) int

func Install

func Install(c *SyncedCluster, args []string) error

func ListNodes

func ListNodes(s string, total int) ([]int, error)

func SortedCmds

func SortedCmds() []string

func StageCockroachRelease

func StageCockroachRelease(c *SyncedCluster, version string) error

StageCockroachRelease downloads an official CockroachDB release binary with the specified version.

func StageRemoteBinary

func StageRemoteBinary(c *SyncedCluster, applicationName, binaryPath, SHA string) error

StageRemoteBinary downloads a cockroach edge binary with the provided application path to each specified by the cluster. If no SHA is specified, the latest build of the binary is used instead.

func VersionSatifies

func VersionSatifies(v *version.Version, constraintString string) bool

Types

type Cassandra

type Cassandra struct{}

func (Cassandra) LogDir

func (Cassandra) LogDir(c *SyncedCluster, index int) string

func (Cassandra) NodeDir

func (Cassandra) NodeDir(c *SyncedCluster, index int) string

func (Cassandra) NodePort

func (Cassandra) NodePort(c *SyncedCluster, index int) int

func (Cassandra) NodeUIPort

func (Cassandra) NodeUIPort(c *SyncedCluster, index int) int

func (Cassandra) NodeURL

func (Cassandra) NodeURL(_ *SyncedCluster, host string, port int) string

func (Cassandra) Start

func (Cassandra) Start(c *SyncedCluster, extraArgs []string)

type ClusterImpl

type ClusterImpl interface {
	Start(c *SyncedCluster, extraArgs []string)
	NodeDir(c *SyncedCluster, index int) string
	LogDir(c *SyncedCluster, index int) string
	NodeURL(c *SyncedCluster, host string, port int) string
	NodePort(c *SyncedCluster, index int) int
	NodeUIPort(c *SyncedCluster, index int) int
}

type Cockroach

type Cockroach struct{}

func (Cockroach) LogDir

func (Cockroach) LogDir(c *SyncedCluster, index int) string

func (Cockroach) NodeDir

func (Cockroach) NodeDir(c *SyncedCluster, index int) string

func (Cockroach) NodePort

func (Cockroach) NodePort(c *SyncedCluster, index int) int

func (Cockroach) NodeUIPort

func (cr Cockroach) NodeUIPort(c *SyncedCluster, index int) int

func (Cockroach) NodeURL

func (Cockroach) NodeURL(c *SyncedCluster, host string, port int) string

func (Cockroach) SQL

func (r Cockroach) SQL(c *SyncedCluster, args []string) error

func (Cockroach) Start

func (r Cockroach) Start(c *SyncedCluster, extraArgs []string)

type SyncedCluster

type SyncedCluster struct {
	// name, vms, users, localities are populated at init time.
	Name       string
	VMs        []string
	Users      []string
	Localities []string
	VPCs       []string
	// all other fields are populated in newCluster.
	Nodes       []int
	LoadGen     int
	Secure      bool
	Env         string
	Args        []string
	Tag         string
	Impl        ClusterImpl
	UseTreeDist bool
	Quiet       bool
}

A SyncedCluster is created from the information in the synced hosts file and is used as the target for installing and managing various software components.

TODO(benesch): unify with CloudCluster.

func (*SyncedCluster) CockroachVersions

func (c *SyncedCluster) CockroachVersions() map[string]int

func (*SyncedCluster) Get

func (c *SyncedCluster) Get(src, dest string)

func (*SyncedCluster) GetInternalIP

func (c *SyncedCluster) GetInternalIP(index int) (string, error)

GetInternalIP returns the internal IP address of the specified node.

func (*SyncedCluster) IsLocal

func (c *SyncedCluster) IsLocal() bool

TODO(tschottdorf): roachprod should cleanly encapsulate the home directory which is currently the biggest culprit for awkward one-offs.

func (*SyncedCluster) Monitor

func (c *SyncedCluster) Monitor() chan nodeMonitorInfo

func (*SyncedCluster) Parallel

func (c *SyncedCluster) Parallel(display string, count, concurrency int, fn func(i int) ([]byte, error))

func (*SyncedCluster) Put

func (c *SyncedCluster) Put(src, dest string)

func (*SyncedCluster) Run

func (c *SyncedCluster) Run(stdout, stderr io.Writer, nodes []int, title, cmd string) error

func (*SyncedCluster) RunLoad

func (c *SyncedCluster) RunLoad(cmd string, stdout, stderr io.Writer) error

func (*SyncedCluster) ServerNodes

func (c *SyncedCluster) ServerNodes() []int

func (*SyncedCluster) SetupSSH

func (c *SyncedCluster) SetupSSH() error

func (*SyncedCluster) Ssh

func (c *SyncedCluster) Ssh(sshArgs, args []string) error

func (*SyncedCluster) Start

func (c *SyncedCluster) Start()

func (*SyncedCluster) Status

func (c *SyncedCluster) Status()

func (*SyncedCluster) Stop

func (c *SyncedCluster) Stop(sig int, wait bool)

func (*SyncedCluster) Wait

func (c *SyncedCluster) Wait() error

func (*SyncedCluster) Wipe

func (c *SyncedCluster) Wipe()

Jump to

Keyboard shortcuts

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