Documentation ¶
Index ¶
Constants ¶
View Source
const ( StorageDisk = "/mnt/?da1" GithubAddress = "https://github.com" )
View Source
const (
SshCommunicationError = "exit status 255"
)
Variables ¶
View Source
var RootCmd = &cobra.Command{ Use: "minishift", Short: "Minishift is a tool for application development in local OpenShift clusters.", Long: `Minishift is a command-line tool that provisions and manages single-node OpenShift clusters optimized for development workflows.`, PersistentPreRun: func(cmd *cobra.Command, args []string) { var ( err error isAddonInstallRequired bool ) if constants.ProfileName != constants.DefaultProfileName { checkForValidProfileOrExit(cmd) } constants.MachineName = constants.ProfileName constants.Minipath = constants.GetProfileHomeDir(constants.ProfileName) state.InstanceDirs = state.NewMinishiftDirs(constants.Minipath) constants.KubeConfigPath = filepath.Join(state.InstanceDirs.Machines, constants.MachineName+"_kubeconfig") if !filehelper.Exists(state.InstanceDirs.Addons) { isAddonInstallRequired = true } createMinishiftDirs(state.InstanceDirs) if minishiftConfig.AllInstancesConfig == nil { ensureAllInstanceConfigPath(constants.AllInstanceConfigPath) minishiftConfig.AllInstancesConfig, err = minishiftConfig.NewAllInstancesConfig(constants.AllInstanceConfigPath) if err != nil { atexit.ExitWithMessage(1, fmt.Sprintf("Error creating all instance config: %s", err.Error())) } } ensureConfigFileExists(constants.ConfigFile) instanceConfigPath := filepath.Join(constants.Minipath, "machines", constants.MachineName+".json") minishiftConfig.InstanceConfig, err = minishiftConfig.NewInstanceConfig(instanceConfigPath) if err != nil { atexit.ExitWithMessage(1, fmt.Sprintf("Error creating config for VM: %s", err.Error())) } if isAddonInstallRequired { if err := cmdUtil.UnpackAddons(state.InstanceDirs.Addons); err != nil { atexit.ExitWithMessage(1, fmt.Sprintf("Error installing default add-ons : %s", err)) } } if filehelper.Exists(filepath.Join(constants.Minipath, constants.UpdateMarkerFileName)) { if err := performPostUpdateExecution(filepath.Join(constants.Minipath, constants.UpdateMarkerFileName)); err != nil { atexit.ExitWithMessage(1, fmt.Sprintf("Error in performing post update exeuction: %s", err)) } } if minishiftConfig.EnableExperimental { glog.Info("Experimental features are enabled") } shouldShowLibmachineLogs := viper.GetBool(showLibmachineLogs) if glog.V(3) { log.SetDebug(true) } if !shouldShowLibmachineLogs { log.SetOutWriter(ioutil.Discard) log.SetErrWriter(ioutil.Discard) } setDefaultActiveProfile() if glog.V(2) { fmt.Println(fmt.Sprintf("-- minishift version: v%s+%s", version.GetMinishiftVersion(), version.GetCommitSha())) } }, }
RootCmd represents the base command when called without any subcommands
Functions ¶
func Execute ¶
func Execute()
Execute adds all child commands to the root command sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.
func GenerateBashCompletion ¶ added in v1.13.0
func GenerateZshCompletion ¶ added in v1.13.0
func IsOpenShiftRunning ¶ added in v1.2.0
Types ¶
type DockerShellConfig ¶
type OcShellConfig ¶
type UpdateMarker ¶ added in v1.2.0
Source Files ¶
Click to show internal directories.
Click to hide internal directories.