command

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2022 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CLEAN_PRECHECK_ENVIRONMENT = playbook.CLEAN_PRECHECK_ENVIRONMENT
	PULL_IMAGE                 = playbook.PULL_IMAGE
	CREATE_CONTAINER           = playbook.CREATE_CONTAINER
	SYNC_CONFIG                = playbook.SYNC_CONFIG
	START_ETCD                 = playbook.START_ETCD
	START_MDS                  = playbook.START_MDS
	CREATE_PHYSICAL_POOL       = playbook.CREATE_PHYSICAL_POOL
	START_CHUNKSERVER          = playbook.START_CHUNKSERVER
	CREATE_LOGICAL_POOL        = playbook.CREATE_LOGICAL_POOL
	START_SNAPSHOTCLONE        = playbook.START_SNAPSHOTCLONE
	START_METASERVER           = playbook.START_METASERVER
	BALANCE_LEADER             = playbook.BALANCE_LEADER

	ROLE_ETCD          = topology.ROLE_ETCD
	ROLE_MDS           = topology.ROLE_MDS
	ROLE_CHUNKSERVER   = topology.ROLE_CHUNKSERVER
	ROLE_SNAPSHOTCLONE = topology.ROLE_SNAPSHOTCLONE
	ROLE_METASERVER    = topology.ROLE_METASERVER
)
View Source
const (
	CHECK_ITEM_TOPOLOGY   = "topology"
	CHECK_ITEM_SSH        = "ssh"
	CHECK_ITEM_PERMISSION = "permission"
	CHECK_ITEM_KERNEL     = "kernel"
	CHECK_ITEM_NERWORK    = "network"
	CHECK_ITEM_DATE       = "date"
	CHECK_ITEM_SERVICE    = "service"
)
View Source
const (
	CLEAN_EXAMPLE = `` /* 266-byte string literal not displayed */

)
View Source
const (
	FORMAT_EXAMPLE = `` /* 199-byte string literal not displayed */

)
View Source
const (
	PRECHECK_EXAMPLE = `` /* 244-byte string literal not displayed */

)
View Source
const (
	SUPPORT_UPLOAD_URL_FORMAT = "http://curveadm.aspirer.wang:19301/upload?path=%s"
)

Variables

View Source
var (
	CLEAN_PLAYBOOK_STEPS = []int{
		playbook.CLEAN_SERVICE,
	}

	CLEAN_ITEMS = []string{
		comm.CLEAN_ITEM_LOG,
		comm.CLEAN_ITEM_DATA,
		comm.CLEAN_ITEM_CONTAINER,
	}
)
View Source
var (
	FORMAT_PLAYBOOK_STEPS = []int{
		playbook.FORMAT_CHUNKFILE_POOL,
	}

	FORMAT_STATUS_PLAYBOOK_STEPS = []int{
		playbook.GET_FORMAT_STATUS,
	}
)
View Source
var (
	CURVEBS_PRECHECK_STEPS = []int{
		playbook.CHECK_TOPOLOGY,
		playbook.CHECK_SSH_CONNECT,
		playbook.CHECK_PERMISSION,
		playbook.CHECK_KERNEL_VERSION,
		playbook.CLEAN_PRECHECK_ENVIRONMENT,
		playbook.CHECK_PORT_IN_USE,
		playbook.CHECK_DESTINATION_REACHABLE,
		playbook.START_HTTP_SERVER,
		playbook.CHECK_NETWORK_FIREWALL,
		playbook.GET_HOST_DATE,
		playbook.CHECK_HOST_DATE,
		playbook.CHECK_CHUNKFILE_POOL,
	}

	CURVEFS_PRECHECK_STEPS = []int{
		playbook.CHECK_TOPOLOGY,
		playbook.CHECK_SSH_CONNECT,
		playbook.CHECK_PERMISSION,
		playbook.CLEAN_PRECHECK_ENVIRONMENT,
		playbook.CHECK_PORT_IN_USE,
		playbook.START_HTTP_SERVER,
		playbook.CHECK_DESTINATION_REACHABLE,
		playbook.CHECK_NETWORK_FIREWALL,
		playbook.GET_HOST_DATE,
		playbook.CHECK_HOST_DATE,
	}

	PRECHECK_POST_STEPS = []int{
		playbook.CLEAN_PRECHECK_ENVIRONMENT,
	}

	BELONG_CHECK_ITEM = map[int]string{
		playbook.CHECK_TOPOLOGY:              CHECK_ITEM_TOPOLOGY,
		playbook.CHECK_SSH_CONNECT:           CHECK_ITEM_SSH,
		playbook.CHECK_PERMISSION:            CHECK_ITEM_PERMISSION,
		playbook.CHECK_KERNEL_VERSION:        CHECK_ITEM_KERNEL,
		playbook.CHECK_PORT_IN_USE:           CHECK_ITEM_NERWORK,
		playbook.CHECK_DESTINATION_REACHABLE: CHECK_ITEM_NERWORK,
		playbook.CHECK_NETWORK_FIREWALL:      CHECK_ITEM_NERWORK,
		playbook.GET_HOST_DATE:               CHECK_ITEM_DATE,
		playbook.CHECK_HOST_DATE:             CHECK_ITEM_DATE,
		playbook.CHECK_CHUNKFILE_POOL:        CHECK_ITEM_SERVICE,
		playbook.CHECK_S3:                    CHECK_ITEM_SERVICE,
	}

	CHECK_ITEMS = []string{
		CHECK_ITEM_TOPOLOGY,
		CHECK_ITEM_SSH,
		CHECK_ITEM_PERMISSION,
		CHECK_ITEM_KERNEL,
		CHECK_ITEM_NERWORK,
		CHECK_ITEM_DATE,
		CHECK_ITEM_SERVICE,
	}
)
View Source
var (
	// etcd
	SCALE_OUT_ETCD_STEPS = []int{
		playbook.PULL_IMAGE,
		playbook.CREATE_CONTAINER,
		playbook.SYNC_CONFIG,
		playbook.START_SERVICE,
		playbook.UPDATE_TOPOLOGY,
	}

	// mds
	SCALE_OUT_MDS_STEPS = []int{
		playbook.PULL_IMAGE,
		playbook.CREATE_CONTAINER,
		playbook.SYNC_CONFIG,
		playbook.START_SERVICE,
		playbook.UPDATE_TOPOLOGY,
	}

	// snapshotclone (curvebs)
	SCALE_OUT_SNAPSHOTCLONE_STEPS = []int{
		playbook.PULL_IMAGE,
		playbook.CREATE_CONTAINER,
		playbook.SYNC_CONFIG,
		playbook.START_SERVICE,
		playbook.UPDATE_TOPOLOGY,
	}

	// chunkserevr (curvebs)
	SCALE_OUT_CHUNKSERVER_STEPS = []int{
		playbook.BACKUP_ETCD_DATA,
		playbook.PULL_IMAGE,
		playbook.CREATE_CONTAINER,
		playbook.SYNC_CONFIG,
		playbook.CREATE_PHYSICAL_POOL,
		playbook.START_SERVICE,
		playbook.CREATE_LOGICAL_POOL,
	}

	// metaserver (curvefs)
	SCALE_OUT_METASERVER_STEPS = []int{
		playbook.BACKUP_ETCD_DATA,
		playbook.PULL_IMAGE,
		playbook.CREATE_CONTAINER,
		playbook.SYNC_CONFIG,
		playbook.START_SERVICE,
		playbook.CREATE_LOGICAL_POOL,
	}

	SCALE_OUT_ROLE_STEPS = map[string][]int{
		topology.ROLE_ETCD:          SCALE_OUT_ETCD_STEPS,
		topology.ROLE_MDS:           SCALE_OUT_MDS_STEPS,
		topology.ROLE_CHUNKSERVER:   SCALE_OUT_CHUNKSERVER_STEPS,
		topology.ROLE_SNAPSHOTCLONE: SCALE_OUT_SNAPSHOTCLONE_STEPS,
		topology.ROLE_METASERVER:    SCALE_OUT_METASERVER_STEPS,
	}

	SCALE_OUT_SCALE_OUT_FILTER_ROLE = map[int]string{
		playbook.BACKUP_ETCD_DATA:     ROLE_ETCD,
		playbook.START_ETCD:           ROLE_ETCD,
		playbook.START_MDS:            ROLE_MDS,
		playbook.START_CHUNKSERVER:    ROLE_CHUNKSERVER,
		playbook.START_SNAPSHOTCLONE:  ROLE_SNAPSHOTCLONE,
		playbook.START_METASERVER:     ROLE_METASERVER,
		playbook.CREATE_PHYSICAL_POOL: ROLE_MDS,
		playbook.CREATE_LOGICAL_POOL:  ROLE_MDS,
		playbook.BALANCE_LEADER:       ROLE_MDS,
	}

	LIMIT_SERVICE = map[int]int{
		playbook.CREATE_PHYSICAL_POOL: 1,
		playbook.CREATE_LOGICAL_POOL:  1,
		playbook.BALANCE_LEADER:       1,
	}
)
View Source
var (
	GET_STATUS_PLAYBOOK_STEPS = []int{
		playbook.INIT_SERVIE_STATUS,
		playbook.GET_SERVICE_STATUS,
	}
)
View Source
var (
	RELOAD_PLAYBOOK_STEPS = []int{
		playbook.SYNC_CONFIG,
		playbook.RESTART_SERVICE,
	}
)
View Source
var (
	RESTART_PLAYBOOK_STEPS = []int{
		playbook.RESTART_SERVICE,
	}
)
View Source
var (
	START_PLAYBOOK_STEPS = []int{
		playbook.START_SERVICE,
	}
)
View Source
var (
	STOP_PLAYBOOK_STEPS = []int{
		playbook.STOP_SERVICE,
	}
)

Functions

func NewAuditCommand added in v0.0.23

func NewAuditCommand(curveadm *cli.CurveAdm) *cobra.Command

func NewCleanCommand

func NewCleanCommand(curveadm *cli.CurveAdm) *cobra.Command

func NewCompletionCommand

func NewCompletionCommand(curveadm *cli.CurveAdm) *cobra.Command

func NewCurveAdmCommand

func NewCurveAdmCommand(curveadm *cli.CurveAdm) *cobra.Command

func NewDeployCommand

func NewDeployCommand(curveadm *cli.CurveAdm) *cobra.Command

func NewEnterCommand

func NewEnterCommand(curveadm *cli.CurveAdm) *cobra.Command

func NewFormatCommand

func NewFormatCommand(curveadm *cli.CurveAdm) *cobra.Command

func NewMigrateCommand added in v0.0.23

func NewMigrateCommand(curveadm *cli.CurveAdm) *cobra.Command

func NewPrecheckCommand added in v0.1.0

func NewPrecheckCommand(curveadm *cli.CurveAdm) *cobra.Command

func NewReloadCommand

func NewReloadCommand(curveadm *cli.CurveAdm) *cobra.Command

func NewRestartCommand

func NewRestartCommand(curveadm *cli.CurveAdm) *cobra.Command

func NewScaleOutCommand added in v0.0.23

func NewScaleOutCommand(curveadm *cli.CurveAdm) *cobra.Command

func NewStartCommand

func NewStartCommand(curveadm *cli.CurveAdm) *cobra.Command

func NewStatusCommand

func NewStatusCommand(curveadm *cli.CurveAdm) *cobra.Command

func NewStopCommand

func NewStopCommand(curveadm *cli.CurveAdm) *cobra.Command

func NewSupportCommand

func NewSupportCommand(curveadm *cli.CurveAdm) *cobra.Command

func NewUpgradeCommand

func NewUpgradeCommand(curveadm *cli.CurveAdm) *cobra.Command

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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