Documentation ¶
Index ¶
- Constants
- Variables
- func NewAuditCommand(curveadm *cli.CurveAdm) *cobra.Command
- func NewCleanCommand(curveadm *cli.CurveAdm) *cobra.Command
- func NewCompletionCommand(curveadm *cli.CurveAdm) *cobra.Command
- func NewCurveAdmCommand(curveadm *cli.CurveAdm) *cobra.Command
- func NewDeployCommand(curveadm *cli.CurveAdm) *cobra.Command
- func NewEnterCommand(curveadm *cli.CurveAdm) *cobra.Command
- func NewExecCommand(curveadm *cli.CurveAdm) *cobra.Command
- func NewFormatCommand(curveadm *cli.CurveAdm) *cobra.Command
- func NewMigrateCommand(curveadm *cli.CurveAdm) *cobra.Command
- func NewPrecheckCommand(curveadm *cli.CurveAdm) *cobra.Command
- func NewReloadCommand(curveadm *cli.CurveAdm) *cobra.Command
- func NewRestartCommand(curveadm *cli.CurveAdm) *cobra.Command
- func NewScaleOutCommand(curveadm *cli.CurveAdm) *cobra.Command
- func NewStartCommand(curveadm *cli.CurveAdm) *cobra.Command
- func NewStatusCommand(curveadm *cli.CurveAdm) *cobra.Command
- func NewStopCommand(curveadm *cli.CurveAdm) *cobra.Command
- func NewSupportCommand(curveadm *cli.CurveAdm) *cobra.Command
- func NewUpgradeCommand(curveadm *cli.CurveAdm) *cobra.Command
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 ENABLE_ETCD_AUTH = playbook.ENABLE_ETCD_AUTH 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 = `` /* 280-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 ( CURVEBS_DEPLOY_STEPS = []int{ CLEAN_PRECHECK_ENVIRONMENT, PULL_IMAGE, CREATE_CONTAINER, SYNC_CONFIG, START_ETCD, ENABLE_ETCD_AUTH, START_MDS, CREATE_PHYSICAL_POOL, START_CHUNKSERVER, CREATE_LOGICAL_POOL, START_SNAPSHOTCLONE, BALANCE_LEADER, } CURVEFS_DEPLOY_STEPS = []int{ CLEAN_PRECHECK_ENVIRONMENT, PULL_IMAGE, CREATE_CONTAINER, SYNC_CONFIG, START_ETCD, ENABLE_ETCD_AUTH, START_MDS, CREATE_LOGICAL_POOL, START_METASERVER, } DEPLOY_FILTER_ROLE = map[int]string{ START_ETCD: ROLE_ETCD, ENABLE_ETCD_AUTH: ROLE_ETCD, START_MDS: ROLE_MDS, START_CHUNKSERVER: ROLE_CHUNKSERVER, START_SNAPSHOTCLONE: ROLE_SNAPSHOTCLONE, START_METASERVER: ROLE_METASERVER, CREATE_PHYSICAL_POOL: ROLE_MDS, CREATE_LOGICAL_POOL: ROLE_MDS, BALANCE_LEADER: ROLE_MDS, } DEPLOY_LIMIT_SERVICE = map[int]int{ CREATE_PHYSICAL_POOL: 1, CREATE_LOGICAL_POOL: 1, BALANCE_LEADER: 1, ENABLE_ETCD_AUTH: 1, } CAN_SKIP_ROLES = []string{ ROLE_SNAPSHOTCLONE, } )
View Source
var ( FORMAT_PLAYBOOK_STEPS = []int{ playbook.FORMAT_CHUNKFILE_POOL, } FORMAT_STATUS_PLAYBOOK_STEPS = []int{ playbook.GET_FORMAT_STATUS, } // FORMAT_STOP_PLAYBOOK_STEPS stop formatting step FORMAT_STOP_PLAYBOOK_STEPS = []int{ playbook.STOP_FORMAT, } )
View Source
var ( MIGRATE_ETCD_STEPS = []int{ playbook.STOP_SERVICE, playbook.CLEAN_SERVICE, playbook.PULL_IMAGE, playbook.CREATE_CONTAINER, playbook.SYNC_CONFIG, playbook.START_ETCD, playbook.UPDATE_TOPOLOGY, } // mds MIGRATE_MDS_STEPS = []int{ playbook.STOP_SERVICE, playbook.CLEAN_SERVICE, playbook.PULL_IMAGE, playbook.CREATE_CONTAINER, playbook.SYNC_CONFIG, playbook.START_MDS, playbook.UPDATE_TOPOLOGY, } // snapshotclone MIGRATE_SNAPSHOTCLONE_STEPS = []int{ playbook.STOP_SERVICE, playbook.CLEAN_SERVICE, playbook.PULL_IMAGE, playbook.CREATE_CONTAINER, playbook.SYNC_CONFIG, playbook.START_SNAPSHOTCLONE, playbook.UPDATE_TOPOLOGY, } // chunkserevr (curvebs) MIGRATE_CHUNKSERVER_STEPS = []int{ playbook.BACKUP_ETCD_DATA, playbook.STOP_SERVICE, playbook.CLEAN_SERVICE, playbook.PULL_IMAGE, playbook.CREATE_CONTAINER, playbook.SYNC_CONFIG, playbook.CREATE_PHYSICAL_POOL, playbook.START_CHUNKSERVER, playbook.CREATE_LOGICAL_POOL, } // metaserver (curvefs) MIGRATE_METASERVER_STEPS = []int{ playbook.BACKUP_ETCD_DATA, playbook.STOP_SERVICE, playbook.CLEAN_SERVICE, playbook.PULL_IMAGE, playbook.CREATE_CONTAINER, playbook.SYNC_CONFIG, playbook.START_METASERVER, playbook.CREATE_LOGICAL_POOL, } MIGRATE_ROLE_STEPS = map[string][]int{ topology.ROLE_ETCD: MIGRATE_ETCD_STEPS, topology.ROLE_MDS: MIGRATE_MDS_STEPS, topology.ROLE_CHUNKSERVER: MIGRATE_CHUNKSERVER_STEPS, topology.ROLE_SNAPSHOTCLONE: MIGRATE_SNAPSHOTCLONE_STEPS, topology.ROLE_METASERVER: MIGRATE_METASERVER_STEPS, } )
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, } )
View Source
var ( SUPPORT_PLAYBOOK_STEPS = []int{ playbook.INIT_SUPPORT, playbook.COLLECT_CURVEADM, playbook.COLLECT_SERVICE, } )
View Source
var ( UPGRADE_PLAYBOOK_STEPS = []int{ playbook.STOP_SERVICE, playbook.CLEAN_SERVICE, playbook.PULL_IMAGE, playbook.CREATE_CONTAINER, playbook.SYNC_CONFIG, playbook.START_SERVICE, } )
Functions ¶
func NewMigrateCommand ¶ added in v0.0.23
func NewPrecheckCommand ¶ added in v0.1.0
func NewScaleOutCommand ¶ added in v0.0.23
Types ¶
This section is empty.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.