Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quiet mode -q / uffizzi dev stop #340

Closed
gadkins opened this issue Sep 25, 2023 · 3 comments · Fixed by #344
Closed

Quiet mode -q / uffizzi dev stop #340

gadkins opened this issue Sep 25, 2023 · 3 comments · Fixed by #344
Assignees

Comments

@gadkins
Copy link
Member

gadkins commented Sep 25, 2023

Summary

  • Add option to run skaffold process in the background with the --detach / -d option
  • Add subcommand uffizzi dev stop to stop the background process

Usage

uffizzi dev start -d

And...

uffizzi dev stop

Help page (uffizzi dev start)

$ uffizzi dev start -h
uffizzi-dev-start - start a development environment
================================================================

## SYNOPSIS
    uffizzi dev start [CONFIG_FILE] [FLAGS]

## DESCRIPTION
    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/

    For more information on Uffizzi clusters, see:
    https://docs.uffizzi.com/references/cli/

## POSITIONAL ARGUMENTS
    [CONFIG_FILE]
        Path to the development environment configuration file. 
        Currently supports skaffold.yaml files. 

## FLAGS
     --build="<local-or-remote>"
        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="<container-registry-domain>"
        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.

     --detach, -d
        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. 

     --name           
        Name for the dev environment. If this option is not 
        specified, a name is auto-generated.

## EXAMPLES
    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 a dev environment using a skaffold.yaml config 
    file in directory '~/foo', run:

        $ uffizzi dev start ~/foo/skaffold.yaml
    
    To start a dev environment called 'bar' in detached mode, 
    run: 
    
        $ uffizzi dev start --name bar --detach

    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 \ 
          --default-repo="hub.docker.com/acme/foo"

    To start a dev environment using an alternate kubeconfig file, 
    run: 
    
        $ uffizzi dev start \
          --kubeconfig="/path/to/alternate/kubeconfig"
   
@gadkins
Copy link
Member Author

gadkins commented Sep 25, 2023

Help page (uffizzi dev stop)

$ uffizzi dev stop -h
uffizzi-dev-stop - stop a development environment
================================================================

## SYNOPSIS
    uffizzi dev stop [NAME] [FLAGS]

## DESCRIPTION
    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/

## POSITIONAL ARGUMENTS
    [NAME]
        The name of the development environment

## FLAGS
     --help, -h           
        Show this message and exit.

## EXAMPLES
    To stop a dev environment called my-app, run:

        $ uffizzi dev stop my-app

@gadkins gadkins changed the title Detach mode -d / uffizzi dev stop Detached mode -d / uffizzi dev stop Sep 25, 2023
@moklidia moklidia added waiting and removed waiting labels Oct 2, 2023
@moklidia
Copy link
Collaborator

moklidia commented Oct 2, 2023

As the user is only able to create one dev environment, remove the NAME argument from the stop and start command

@zipofar zipofar linked a pull request Oct 2, 2023 that will close this issue
@gadkins
Copy link
Member Author

gadkins commented Oct 4, 2023

@zipofar Rename this option to --quiet / -q and update the description:

--quiet, -q
        Quiet mode. This option suppresses output, instead of 
        dumping it to stdout.

...

## EXAMPLES

...

To start a dev environment called 'bar' in quiet mode, 
    run: 
    
        $ uffizzi dev start --name bar --quiet

@moklidia moklidia changed the title Detached mode -d / uffizzi dev stop Quiet mode -q / uffizzi dev stop Oct 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging a pull request may close this issue.

3 participants