diff --git a/lib/uffizzi/services/dev_service.rb b/lib/uffizzi/services/dev_service.rb index 38dda9e9..57999660 100644 --- a/lib/uffizzi/services/dev_service.rb +++ b/lib/uffizzi/services/dev_service.rb @@ -15,7 +15,7 @@ def check_running_daemon File.delete(pid_path) if pid.blank? Uffizzi.process.kill(0, pid.to_i) - Uffizzi.ui.say_error_and_exit("You already start uffizzi dev as daemon. To stop process do 'uffizzi dev stop'") + Uffizzi.ui.say_error_and_exit("You have already started uffizzi dev as daemon. To stop the process do 'uffizzi dev stop'") rescue Errno::ESRCH File.delete(pid_path) end diff --git a/man/uffizzi-dev-start b/man/uffizzi-dev-start index af8585c0..19a27c2f 100644 --- a/man/uffizzi-dev-start +++ b/man/uffizzi-dev-start @@ -1,29 +1,99 @@ .\" generated with Ronn-NG/v0.9.1 .\" http://github.com/apjanke/ronn-ng/tree/0.9.1 -.TH "UFFIZZI\-DEV\-START" "" "September 2023" "" +.TH "UFFIZZI\-DEV\-START" "" "October 2023" "" .SH "NAME" -\fBuffizzi\-dev\-start\fR \- start development environment +\fBuffizzi\-dev\-start\fR \- start a development environment .SH "SYNOPSIS" .nf -uffizzi dev start [SKAFFOLD_CONFIG_FILE_PATH] +uffizzi dev start [CONFIG_FILE] [FLAGS] .fi .SH "DESCRIPTION" .nf -Creates a new cluster and start skaffold\. If no SKAFFOLD_CONFIG_FILE_PATH is specified, -the default path will be used\. -Default SKAFFOLD_CONFIG_FILE_PATH is \'skaffold\.yaml\' +Creates a Uffizzi cluster preconfigured for development +workflows, including building, pushing, and deploying +your changes every time project files are saved\. +current\-context is updated in kubeconfig file\. + +This command watches for file changes in a given local +project directory, as specified in your configuration file\. +It then serializes those changes and redeploys them onto +a Uffizzi cluster\. + +The command looks for a configuration at the specified +path CONFIG_FILE\. Skaffold configurations are currently +supported\. For help creating a skaffold\.yaml file, see: +https://skaffold\.dev/docs/init/ + +If a kubeconfig exists For more information on Uffizzi clusters, see: https://docs\.uffizzi\.com/references/cli/ .fi +.SH "POSITIONAL ARGUMENTS" +.nf +[CONFIG_FILE] + Path to the development environment configuration file\. + Currently supports skaffold\.yaml files\. +.fi +.SH "FLAGS" +.nf + \-\-build="" + This option specifies whether to build images on the + local environment or on the remote Uffizzi cluster\. + Possible values are "local" or "remote"\. + + \-\-default\-repo="" + A public or private repo used to push/pull build + artifacts\. Overrides the global default image registry: + "registry\.uffizzi\.com"\. See `uffizzi connect \-h` for + adding private registry credentials\. + + \-\-quiet, \-q + Run the development process in detached mode (i\.e\., in + the background)\. Without this option, logs are streamed + to the terminal in the foreground\. Run \'uffizzi dev stop` + to stop the detached process\. + + \-\-help, \-h + Show this message and exit\. + + \-\-kubeconfig="/path/to/your/kubeconfig" + Path to kubeconfig file\. If this option is not specified, + this command looks for the file at ~/\.kube/config\. +.fi .SH "EXAMPLES" .nf -To start development environment, run: +If your configuration file is in the current working +directory and you want to use an auto\-generated name, +run: $ uffizzi dev start -To start development environment with custom skaffold\.yaml file, run: +To start a dev environment using a skaffold\.yaml config +file in directory \'~/foo\', run: + + $ uffizzi dev start ~/foo/skaffold\.yaml + +To start a dev environment in quiet mode, +run: + + $ uffizzi dev start \-\-quiet + +To push your build artifacts to a private Docker Hub repo +called \'acme/foo\', first add your Docker Hub credentials: + + $ uffizzi connect docker\-hub + (See `uffizzi connect \-h` for other registry options) + +\|\.\|\.\|\.then override the default repo: + + $ uffizzi dev start \e + \-\-default\-repo="hub\.docker\.com/acme/foo" + +To start a dev environment using an alternate kubeconfig file, +run: - $ uffizzi cluster create /path/to/skaffold\.yaml + $ uffizzi dev start \e + \-\-kubeconfig="/path/to/alternate/kubeconfig" .fi diff --git a/man/uffizzi-dev-start.ronn b/man/uffizzi-dev-start.ronn index 2a65b56c..59e510c4 100644 --- a/man/uffizzi-dev-start.ronn +++ b/man/uffizzi-dev-start.ronn @@ -42,7 +42,7 @@ uffizzi-dev-start - start a development environment "registry.uffizzi.com". See `uffizzi connect -h` for adding private registry credentials. - --detach, -d + --quiet, -q Run the development process in detached mode (i.e., in the background). Without this option, logs are streamed to the terminal in the foreground. Run 'uffizzi dev stop` @@ -67,10 +67,10 @@ uffizzi-dev-start - start a development environment $ uffizzi dev start ~/foo/skaffold.yaml - To start a dev environment in detached mode, + To start a dev environment in quiet mode, run: - $ uffizzi dev start --detach + $ uffizzi dev start --quiet To push your build artifacts to a private Docker Hub repo called 'acme/foo', first add your Docker Hub credentials: diff --git a/man/uffizzi-dev-stop b/man/uffizzi-dev-stop new file mode 100644 index 00000000..cf105533 --- /dev/null +++ b/man/uffizzi-dev-stop @@ -0,0 +1,41 @@ +.\" generated with Ronn-NG/v0.9.1 +.\" http://github.com/apjanke/ronn-ng/tree/0.9.1 +.TH "UFFIZZI\-DEV\-STOP" "" "October 2023" "" +.SH "NAME" +\fBuffizzi\-dev\-stop\fR \- stop a development environment +.SH "SYNOPSIS" +.nf +uffizzi dev stop +.fi +.SH "DESCRIPTION" +.nf +Stops a dev environment and deletes the backing +Uffizzi cluster resources, including any persistent +volumes, and the namespace itself\. The Uffizzi +cluster config is deleted from the kubeconfig file\. + +This command watches for file changes in a given local +project directory, as specified in your configuration file\. +It then serializes those changes and redeploys them onto +a Uffizzi cluster\. + +The command looks for a configuration at the specified +path CONFIG_FILE\. Skaffold configurations are currently +supported\. For help creating a skaffold\.yaml file, see: +https://skaffold\.dev/docs/init/ + +For more information on Uffizzi clusters, see: +https://docs\.uffizzi\.com/references/cli/ +.fi +.SH "FLAGS" +.nf + \-\-help, \-h + Show this message and exit\. +.fi +.SH "EXAMPLES" +.nf +To stop a dev environment, run: + + $ uffizzi dev stop +.fi +