Skip to content

Commit

Permalink
Issue #190 Making additional changes to docs strings and ensuring go …
Browse files Browse the repository at this point in the history
…formatting is applied
  • Loading branch information
hferentschik committed Jan 10, 2017
1 parent 629f261 commit 78df115
Show file tree
Hide file tree
Showing 29 changed files with 201 additions and 187 deletions.
2 changes: 1 addition & 1 deletion cmd/minikube/cmd/config/get.go
Expand Up @@ -26,7 +26,7 @@ import (
var configGetCmd = &cobra.Command{
Use: "get PROPERTY_NAME",
Short: "Gets the value of a configuration property from the Minishift configuration file.",
Long: "Gets the value of a configuration property from the minishift configuration file. This value can be overwritten at runtime by flags or environmental variables.",
Long: "Gets the value of a configuration property from the minishift configuration file. This value can be overwritten at runtime by flags or environmental variables.",
Run: func(cmd *cobra.Command, args []string) {
if len(args) != 1 {
fmt.Fprintln(os.Stderr, "usage: minishift config get PROPERTY_NAME")
Expand Down
2 changes: 1 addition & 1 deletion cmd/minikube/cmd/config/unset.go
Expand Up @@ -26,7 +26,7 @@ import (
var configUnsetCmd = &cobra.Command{
Use: "unset PROPERTY_NAME",
Short: "Clears the value of a configuration property in the Minishift configuration file.",
Long: "Clears the value of a configuration property in the Minishift configuration file. The value can be overwritten at runtime by flags or environment variables",
Long: "Clears the value of a configuration property in the Minishift configuration file. The value can be overwritten at runtime by flags or environment variables",
Run: func(cmd *cobra.Command, args []string) {
if len(args) != 1 {
fmt.Fprintf(os.Stdout, "usage: minishift config unset PROPERTY_NAME")
Expand Down
2 changes: 1 addition & 1 deletion cmd/minikube/cmd/config/view.go
Expand Up @@ -37,7 +37,7 @@ type ConfigViewTemplate struct {
var configViewCmd = &cobra.Command{
Use: "view",
Short: "Display the properties and values of the Minishift configuration file.",
Long: "Display the properties and values of the Minishift configuration file. You can set the output format from one of the available Go templates.",
Long: "Display the properties and values of the Minishift configuration file. You can set the output format from one of the available Go templates.",
Run: func(cmd *cobra.Command, args []string) {
err := configView()
if err != nil {
Expand Down
6 changes: 3 additions & 3 deletions cmd/minikube/cmd/console.go
Expand Up @@ -35,8 +35,8 @@ var (
// consoleCmd represents the console command
var consoleCmd = &cobra.Command{
Use: "console",
Short: "Opens the OpenShift Web console to the root of your local cluster.",
Long: `Opens the OpenShift Web console to the root of your local cluster in the default browser.`,
Short: "Opens or displays the OpenShift Web Console URL.",
Long: `Opens the OpenShift Web Console URL in the default browser or displays it to the console.`,
Run: func(cmd *cobra.Command, args []string) {
api := libmachine.NewClient(constants.Minipath, constants.MakeMiniPath("certs"))
defer api.Close()
Expand All @@ -55,6 +55,6 @@ var consoleCmd = &cobra.Command{
}

func init() {
consoleCmd.Flags().BoolVar(&consoleURLMode, "url", false, "Open the local cluster in the OpenShift CLI console instead of the Web console.")
consoleCmd.Flags().BoolVar(&consoleURLMode, "url", false, "Prints the OpenShift Web Console URL to the console.")
RootCmd.AddCommand(consoleCmd)
}
2 changes: 1 addition & 1 deletion cmd/minikube/cmd/delete.go
Expand Up @@ -33,7 +33,7 @@ import (
var deleteCmd = &cobra.Command{
Use: "delete",
Short: "Deletes the Minishift VM.",
Long: `Deletes the Minishift VM, including the local OpenShift cluster and all associated files.`,
Long: `Deletes the Minishift VM, including the local OpenShift cluster and all associated files.`,
Run: func(cmd *cobra.Command, args []string) {
fmt.Println("Deleting the Minishift VM...")
api := libmachine.NewClient(constants.Minipath, constants.MakeMiniPath("certs"))
Expand Down
2 changes: 1 addition & 1 deletion cmd/minikube/cmd/ip.go
Expand Up @@ -31,7 +31,7 @@ import (
var ipCmd = &cobra.Command{
Use: "ip",
Short: "Gets the IP address of the running cluster.",
Long: `Gets the IP address of the running cluster and prints it to the standard output.`,
Long: `Gets the IP address of the running cluster and prints it to standard output.`,
Run: func(cmd *cobra.Command, args []string) {
api := libmachine.NewClient(constants.Minipath, constants.MakeMiniPath("certs"))
defer api.Close()
Expand Down
4 changes: 2 additions & 2 deletions cmd/minikube/cmd/service.go
Expand Up @@ -41,8 +41,8 @@ var (
// serviceCmd represents the service command
var serviceCmd = &cobra.Command{
Use: "service [flags] SERVICE",
Short: "Opens the specified service in the OpenShift Web console.",
Long: `Opens the specified service in the OpenShift Web console using the default browser. You must specify the service name and namespace.`,
Short: "Prints the URL for the specified service to the console.",
Long: `Prints the URL for the specified service to the console.`,
PersistentPreRun: func(cmd *cobra.Command, args []string) {
t, err := template.New("serviceURL").Parse(serviceURLFormat)
if err != nil {
Expand Down
10 changes: 4 additions & 6 deletions cmd/minikube/cmd/start.go
Expand Up @@ -75,10 +75,8 @@ var (
var startCmd = &cobra.Command{
Use: commandName,
Short: "Starts a local OpenShift cluster.",
Long: `Starts a local single-node OpenShift cluster on the specified hypervisor.
If you are restarting the cluster and you use persistant storage for the host data,
you can specify --use-existing-config to maintain the cluster state.`,
Run: runStart,
Long: `Starts a local single-node OpenShift cluster on the specified hypervisor.`,
Run: runStart,
}

// Set default value for host data and config dir
Expand Down Expand Up @@ -192,14 +190,14 @@ func initStartFlags() {
startFlagSet.StringSliceVar(&dockerEnv, "docker-env", nil, "Environment variables to pass to the Docker daemon. Use the format <key>=<value>.")
startFlagSet.StringSliceVar(&insecureRegistry, "insecure-registry", []string{"172.30.0.0/16"}, "Non-secure Docker registries to pass to the Docker daemon.")
startFlagSet.StringSliceVar(&registryMirror, "registry-mirror", nil, "Registry mirrors to pass to the Docker daemon.")
startFlagSet.String(openshiftVersion, version.GetOpenShiftVersion(), "The OpenShift version to run. Use the format v<n.n.n>")
startFlagSet.String(openshiftVersion, version.GetOpenShiftVersion(), "The OpenShift version to run, eg. v1.3.1")
}

// initClusterUpFlags creates the CLI flags which needs to be passed on to 'oc cluster up'
func initClusterUpFlags() {
//clusterUpFlagSet.StringVar(&clusterUpConfig.Image, "image", "openshift/origin", "Specify the images to use for OpenShift")
clusterUpFlagSet.Bool(skipRegistryCheck, false, "Skip the Docker daemon registry check.")
clusterUpFlagSet.String(publicHostname, "", "Public host name of the OpenShift cluster.")
clusterUpFlagSet.String(publicHostname, "", "Public hostname of the OpenShift cluster.")
clusterUpFlagSet.String(routingSuffix, "", "Default suffix for the server routes.")
clusterUpFlagSet.String(hostConfigDir, hostConfigDirectory, "Location of the OpenShift configuration on the Docker host.")
clusterUpFlagSet.String(hostVolumesDir, dockerhost.DefaultVolumesDir, "Location of the OpenShift volumes on the Docker host.")
Expand Down
3 changes: 1 addition & 2 deletions cmd/minikube/cmd/stop.go
Expand Up @@ -34,8 +34,7 @@ var stopCmd = &cobra.Command{
Use: "stop",
Short: "Stops the running local OpenShift cluster.",
Long: `Stops the running local OpenShift cluster. This command stops the Minishift
VM but does not delete any associated files. To start the cluster again, use
the 'minishift start' command.`,
VM but does not delete any associated files. To start the cluster again, use the 'minishift start' command.`,
Run: func(cmd *cobra.Command, args []string) {
fmt.Println("Stopping local OpenShift cluster...")
api := libmachine.NewClient(constants.Minipath, constants.MakeMiniPath("certs"))
Expand Down
2 changes: 1 addition & 1 deletion cmd/minikube/cmd/version.go
Expand Up @@ -27,7 +27,7 @@ import (
var versionCmd = &cobra.Command{
Use: "version",
Short: "Gets the version of Minishift.",
Long: `Gets the currently installed version of Minishift and prints it to the standard output.`,
Long: `Gets the currently installed version of Minishift and prints it to standard output.`,
PersistentPreRun: func(cmd *cobra.Command, args []string) {
RootCmd.PersistentPreRun(cmd, args)
},
Expand Down
35 changes: 18 additions & 17 deletions docs/minishift.md
@@ -1,40 +1,41 @@
## minishift

Minishift is a tool for application development in local OpenShift clusters.
Minishift is a tool for managing local OpenShift clusters.

### Synopsis


Minishift is a command-line tool that provisions and manages single-node OpenShift clusters optimized for development workflows.
Minishift is a CLI tool that provisions and manages single-node OpenShift clusters optimized for development workflows.

### Options

```
--alsologtostderr value log to standard error as well as files
--disable-update-notification Whether to disable VM update check.
--log-flush-frequency duration Maximum number of seconds between log flushes (default 5s)
--log_backtrace_at value when logging hits line file:N, emit a stack trace (default :0)
--log_dir value If non-empty, write log files in this directory
--logtostderr value log to standard error instead of files
--password string Password for the virtual machine.
--show-libmachine-logs Show logs from libmachine.
--password string Password to register Virtual Machine
--show-libmachine-logs Whether or not to show logs from libmachine.
--stderrthreshold value logs at or above this threshold go to stderr (default 2)
--username string User name for the virtual machine.
--username string Username to register Virtual Machine
-v, --v value log level for V logs
--vmodule value comma-separated list of pattern=N settings for file-filtered logging
```

### SEE ALSO
* [minishift config](minishift_config.md) - Modifies Minishift configuration properties.
* [minishift console](minishift_console.md) - Opens the OpenShift Web console to the root of your local cluster.
* [minishift delete](minishift_delete.md) - Deletes the Minishift VM.
* [minishift docker-env](minishift_docker-env.md) - Sets Docker environment variables.
* [minishift get-openshift-versions](minishift_get-openshift-versions.md) - Gets the list of OpenShift versions available for Minishift.
* [minishift ip](minishift_ip.md) - Gets the IP address of the running cluster.
* [minishift logs](minishift_logs.md) - Gets the logs of the running OpenShift cluster.
* [minishift service](minishift_service.md) - Opens the specified service in the OpenShift Web console.
* [minishift ssh](minishift_ssh.md) - Log in to or run a command on a Minishift VM with SSH.
* [minishift config](minishift_config.md) - Modify minishift config
* [minishift console](minishift_console.md) - Opens/displays the OpenShift console URL for your local cluster
* [minishift delete](minishift_delete.md) - Deletes a local OpenShift cluster.
* [minishift docker-env](minishift_docker-env.md) - sets up docker env variables; similar to '$(docker-machine env)'
* [minishift get-openshift-versions](minishift_get-openshift-versions.md) - Gets the list of available OpenShift versions available for minishift.
* [minishift ip](minishift_ip.md) - Retrieve the IP address of the running cluster.
* [minishift logs](minishift_logs.md) - Gets the logs of the running OpenShift instance, used for debugging minishift, not user code.
* [minishift service](minishift_service.md) - Gets the URL for the specified service in your local cluster
* [minishift ssh](minishift_ssh.md) - Log into or run a command on a machine with SSH; similar to 'docker-machine ssh'
* [minishift start](minishift_start.md) - Starts a local OpenShift cluster.
* [minishift status](minishift_status.md) - Gets the status of the local OpenShift cluster.
* [minishift stop](minishift_stop.md) - Stops the running local OpenShift cluster.
* [minishift version](minishift_version.md) - Gets the version of Minishift.
* [minishift status](minishift_status.md) - Gets the status of a local OpenShift cluster.
* [minishift stop](minishift_stop.md) - Stops a running local OpenShift cluster.
* [minishift version](minishift_version.md) - Print the version of minishift.

25 changes: 12 additions & 13 deletions docs/minishift_config.md
@@ -1,14 +1,12 @@
## minishift config

Modifies Minishift configuration properties.
Modify minishift config

### Synopsis


Modifies Minishift configuration properties. Some of the configuration properties are equivalent
to the options that you set when you run the minishift start command.

Configurable properties (enter as SUBCOMMAND):
config modifies minishift config files using subcommands like "minishift config set vm-driver kvm"
Configurable fields:

* vm-driver
* v
Expand All @@ -30,22 +28,23 @@ minishift config SUBCOMMAND [flags]

```
--alsologtostderr value log to standard error as well as files
--disable-update-notification Whether to disable VM update check.
--log-flush-frequency duration Maximum number of seconds between log flushes (default 5s)
--log_backtrace_at value when logging hits line file:N, emit a stack trace (default :0)
--log_dir value If non-empty, write log files in this directory
--logtostderr value log to standard error instead of files
--password string Password for the virtual machine.
--show-libmachine-logs Show logs from libmachine.
--password string Password to register Virtual Machine
--show-libmachine-logs Whether or not to show logs from libmachine.
--stderrthreshold value logs at or above this threshold go to stderr (default 2)
--username string User name for the virtual machine.
--username string Username to register Virtual Machine
-v, --v value log level for V logs
--vmodule value comma-separated list of pattern=N settings for file-filtered logging
```

### SEE ALSO
* [minishift](minishift.md) - Minishift is a tool for application development in local OpenShift clusters.
* [minishift config get](minishift_config_get.md) - Gets the value of a configuration property from the Minishift configuration file.
* [minishift config set](minishift_config_set.md) - Sets the value of a configuration property in the Minishift configuration file.
* [minishift config unset](minishift_config_unset.md) - Clears the value of a configuration property in the Minishift configuration file.
* [minishift config view](minishift_config_view.md) - Display the properties and values of the Minishift configuration file.
* [minishift](minishift.md) - Minishift is a tool for managing local OpenShift clusters.
* [minishift config get](minishift_config_get.md) - Gets the value of PROPERTY_NAME from the minishift config file
* [minishift config set](minishift_config_set.md) - Sets an individual value in a minishift config file
* [minishift config unset](minishift_config_unset.md) - unsets an individual value in a minishift config file
* [minishift config view](minishift_config_view.md) - Display values currently set in the minishift config file

13 changes: 7 additions & 6 deletions docs/minishift_config_get.md
@@ -1,11 +1,11 @@
## minishift config get

Gets the value of a configuration property from the Minishift configuration file.
Gets the value of PROPERTY_NAME from the minishift config file

### Synopsis


Gets the value of a configuration property from the minishift configuration file. This value can be overwritten at runtime by flags or environmental variables.
Returns the value of PROPERTY_NAME from the minishift config file. Can be overwritten at runtime by flags or environmental variables.

```
minishift config get PROPERTY_NAME
Expand All @@ -15,18 +15,19 @@ minishift config get PROPERTY_NAME

```
--alsologtostderr value log to standard error as well as files
--disable-update-notification Whether to disable VM update check.
--log-flush-frequency duration Maximum number of seconds between log flushes (default 5s)
--log_backtrace_at value when logging hits line file:N, emit a stack trace (default :0)
--log_dir value If non-empty, write log files in this directory
--logtostderr value log to standard error instead of files
--password string Password for the virtual machine.
--show-libmachine-logs Show logs from libmachine.
--password string Password to register Virtual Machine
--show-libmachine-logs Whether or not to show logs from libmachine.
--stderrthreshold value logs at or above this threshold go to stderr (default 2)
--username string User name for the virtual machine.
--username string Username to register Virtual Machine
-v, --v value log level for V logs
--vmodule value comma-separated list of pattern=N settings for file-filtered logging
```

### SEE ALSO
* [minishift config](minishift_config.md) - Modifies Minishift configuration properties.
* [minishift config](minishift_config.md) - Modify minishift config

15 changes: 8 additions & 7 deletions docs/minishift_config_set.md
@@ -1,12 +1,12 @@
## minishift config set

Sets the value of a configuration property in the Minishift configuration file.
Sets an individual value in a minishift config file

### Synopsis


Sets the value of one or more configuration properties in the Minishift configuration file.
These values can be overwritten by flags or environment variables at runtime.
Sets the PROPERTY_NAME config value to PROPERTY_VALUE
These values can be overwritten by flags or environment variables at runtime.

```
minishift config set PROPERTY_NAME PROPERTY_VALUE
Expand All @@ -16,18 +16,19 @@ minishift config set PROPERTY_NAME PROPERTY_VALUE

```
--alsologtostderr value log to standard error as well as files
--disable-update-notification Whether to disable VM update check.
--log-flush-frequency duration Maximum number of seconds between log flushes (default 5s)
--log_backtrace_at value when logging hits line file:N, emit a stack trace (default :0)
--log_dir value If non-empty, write log files in this directory
--logtostderr value log to standard error instead of files
--password string Password for the virtual machine.
--show-libmachine-logs Show logs from libmachine.
--password string Password to register Virtual Machine
--show-libmachine-logs Whether or not to show logs from libmachine.
--stderrthreshold value logs at or above this threshold go to stderr (default 2)
--username string User name for the virtual machine.
--username string Username to register Virtual Machine
-v, --v value log level for V logs
--vmodule value comma-separated list of pattern=N settings for file-filtered logging
```

### SEE ALSO
* [minishift config](minishift_config.md) - Modifies Minishift configuration properties.
* [minishift config](minishift_config.md) - Modify minishift config

0 comments on commit 78df115

Please sign in to comment.