Documentation ¶
Index ¶
Constants ¶
View Source
const (
SPINNER_SPEED = 200 // In milliseconds
)
View Source
const (
SshCommunicationError = "exit status 255"
)
View Source
const (
StorageDisk = "/mnt/sda1"
)
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 isFreshStart bool ) if !filehelper.Exists(constants.Minipath) || filehelper.IsEmptyDir(constants.Minipath) { isFreshStart = true } for _, path := range dirs { if err := os.MkdirAll(path, 0777); err != nil { glog.Exitf("Error creating minishift directory: %s", err) } } ensureConfigFileExists(constants.ConfigFile) allInstanceConfigPath := filepath.Join(constants.Minipath, "config", "allinstances.json") minishiftConfig.AllInstancesConfig, err = minishiftConfig.NewAllInstancesConfig(allInstanceConfigPath) if err != nil { atexit.ExitWithMessage(1, fmt.Sprintf("Error creating config for all instances: %s", err.Error())) } 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 isFreshStart { fmt.Print("-- Installing default add-ons ... ") if err := util.UnpackAddons(constants.MakeMiniPath("addons")); err != nil { atexit.ExitWithMessage(1, fmt.Sprintf("Error installing default add-ons : %s", err)) } fmt.Println("OK") } 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 hasEnabledExperimental { 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) } }, }
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 IsOpenShiftRunning ¶ added in v1.2.0
Types ¶
type DockerShellConfig ¶
type OcShellConfig ¶
type OcShellConfig struct { shell.ShellConfig OcDirPath string UsageHint string }
type UpdateMarker ¶ added in v1.2.0
Source Files ¶
Click to show internal directories.
Click to hide internal directories.