playbook

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TYPE_CONFIG_HOST int = iota
	TYPE_CONFIG_FORMAT
	TYPE_CONFIG_DEPLOY
	TYPE_CONFIG_CLIENT
	TYPE_CONFIG_PLAYGROUND
	TYPE_CONFIG_MONITOR
	TYPE_CONFIG_ANY
	TYPE_CONFIG_NULL
)
View Source
const (
	// checker
	CHECK_TOPOLOGY int = iota
	CHECK_SSH_CONNECT
	CHECK_PERMISSION
	CHECK_KERNEL_VERSION
	CHECK_KERNEL_MODULE
	CHECK_PORT_IN_USE
	CHECK_DESTINATION_REACHABLE
	START_HTTP_SERVER
	CHECK_NETWORK_FIREWALL
	GET_HOST_DATE
	CHECK_HOST_DATE
	CHECK_CHUNKFILE_POOL
	CHECK_S3
	CLEAN_PRECHECK_ENVIRONMENT

	// common
	PULL_IMAGE
	CREATE_CONTAINER
	SYNC_CONFIG
	START_SERVICE
	START_ETCD
	ENABLE_ETCD_AUTH
	START_MDS
	START_CHUNKSERVER
	START_SNAPSHOTCLONE
	START_METASERVER
	STOP_SERVICE
	RESTART_SERVICE
	CREATE_PHYSICAL_POOL
	CREATE_LOGICAL_POOL
	UPDATE_TOPOLOGY
	INIT_SERVIE_STATUS
	GET_SERVICE_STATUS
	CLEAN_SERVICE
	INIT_SUPPORT
	COLLECT_REPORT
	COLLECT_CURVEADM
	COLLECT_SERVICE
	COLLECT_CLIENT
	BACKUP_ETCD_DATA
	CHECK_MDS_ADDRESS
	INIT_CLIENT_STATUS
	GET_CLIENT_STATUS
	INSTALL_CLIENT
	UNINSTALL_CLIENT

	// bs
	FORMAT_CHUNKFILE_POOL
	GET_FORMAT_STATUS
	STOP_FORMAT
	BALANCE_LEADER
	START_NEBD_SERVICE
	CREATE_VOLUME
	MAP_IMAGE
	UNMAP_IMAGE

	// monitor
	PULL_MONITOR_IMAGE
	CREATE_MONITOR_CONTAINER
	SYNC_MONITOR_CONFIG
	CLEAN_CONFIG_CONTAINER
	START_MONITOR_SERVICE
	RESTART_MONITOR_SERVICE
	STOP_MONITOR_SERVICE
	INIT_MONITOR_STATUS
	GET_MONITOR_STATUS
	CLEAN_MONITOR

	// bs/target
	START_TARGET_DAEMON
	STOP_TARGET_DAEMON
	ADD_TARGET
	DELETE_TARGET
	LIST_TARGETS

	// fs
	CHECK_CLIENT_S3
	MOUNT_FILESYSTEM
	UMOUNT_FILESYSTEM

	// polarfs
	DETECT_OS_RELEASE
	INSTALL_POLARFS
	UNINSTALL_POLARFS

	// playground
	CREATE_PLAYGROUND
	INIT_PLAYGROUND
	START_PLAYGROUND
	REMOVE_PLAYGROUND
	GET_PLAYGROUND_STATUS

	// unknown
	UNKNOWN
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ExecOptions

type ExecOptions = tasks.ExecOptions

* playbook * ├── tasks1 (e.g.: pull image) * ├── tasks2 (e.g.: create container) * ├── ... * └── tasksn (e.g.: start container) * ├── task1 (e.g.: start container in host1) * ├── task2 (e.g.: start container in host2) * ├── ... * └── taskn (e.g.: start container in host3) * ├── step1 (e.g: start container) * ├── step2 (e.g: check container status) * ├── ... * └── stepn (e.g: start crotab iff status is ok) * * tasks are made up of many same type tasks which only executed in different hosts or roles

type Playbook

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

* playbook * ├── tasks1 (e.g.: pull image) * ├── tasks2 (e.g.: create container) * ├── ... * └── tasksn (e.g.: start container) * ├── task1 (e.g.: start container in host1) * ├── task2 (e.g.: start container in host2) * ├── ... * └── taskn (e.g.: start container in host3) * ├── step1 (e.g: start container) * ├── step2 (e.g: check container status) * ├── ... * └── stepn (e.g: start crotab iff status is ok) * * tasks are made up of many same type tasks which only executed in different hosts or roles

func NewPlaybook

func NewPlaybook(curveadm *cli.CurveAdm) *Playbook

func (*Playbook) AddPostStep

func (p *Playbook) AddPostStep(s *PlaybookStep)

func (*Playbook) AddStep

func (p *Playbook) AddStep(s *PlaybookStep)

func (*Playbook) Run

func (p *Playbook) Run() error

type PlaybookStep

type PlaybookStep struct {
	Name    string
	Type    int
	Configs interface{}
	Options map[string]interface{}
	tasks.ExecOptions
}

* playbook * ├── tasks1 (e.g.: pull image) * ├── tasks2 (e.g.: create container) * ├── ... * └── tasksn (e.g.: start container) * ├── task1 (e.g.: start container in host1) * ├── task2 (e.g.: start container in host2) * ├── ... * └── taskn (e.g.: start container in host3) * ├── step1 (e.g: start container) * ├── step2 (e.g: check container status) * ├── ... * └── stepn (e.g: start crotab iff status is ok) * * tasks are made up of many same type tasks which only executed in different hosts or roles

type SmartConfig

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

func NewSmartConfig

func NewSmartConfig(configs interface{}) (*SmartConfig, error)

func (*SmartConfig) GetAny

func (c *SmartConfig) GetAny(index int) interface{}

func (*SmartConfig) GetCC

func (c *SmartConfig) GetCC(index int) *configure.ClientConfig

func (*SmartConfig) GetDC

func (c *SmartConfig) GetDC(index int) *topology.DeployConfig

func (*SmartConfig) GetFC

func (c *SmartConfig) GetFC(index int) *configure.FormatConfig

func (*SmartConfig) GetHC

func (c *SmartConfig) GetHC(index int) *hosts.HostConfig

func (*SmartConfig) GetMC added in v0.3.0

func (c *SmartConfig) GetMC(index int) *configure.MonitorConfig

func (*SmartConfig) GetPGC

func (c *SmartConfig) GetPGC(index int) *configure.PlaygroundConfig

func (*SmartConfig) GetType

func (c *SmartConfig) GetType() int

func (*SmartConfig) Len

func (c *SmartConfig) Len() int

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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