UffizziCloud / uffizzi_cli

The command-line interface for the Uffizzi API
Apache License 2.0
86 stars 46 forks source link

Update `uffizzi install` command #374

Closed gadkins closed 9 months ago

gadkins commented 10 months ago

Summary

By default, the uffizzi install command should install just the controller and operator on a target cluster. The controller and operator should receive requests from the Uffizzi platform rails app hosted at app.uffizzi.com.

The Uffizzi rails app will need to know about new customer installations of controller and operator. We will need a way for these installations to register themselves with Uffizzi rails app or otherwise be discovered by the it.

zipofar commented 10 months ago

Questions:

  1. How should user's account know about installed controller? Should user login in CLI before he can install controller?
gadkins commented 10 months ago

@zipofar The user should login.

Here is the user story we want to support:

Login

$ uffizzi login
Select an account: (Press ↑/↓  arrow to move and Enter to select)
    jdoe
  ‣ Acme Inc

We should support at most one installation per account for now.

Install

The user must pass a hostname as an argument to the install command. They may also pass options to the install command to use a namespace and context that is different than current:

$ uffizzi install controller.uffizzi.example.com --email="jdoe@example.com"
This command will install Uffizzi into the default namespace of the 'foo' context.
To install in a different place, use options '--namespace' and/or '--context'.

After installation, new environments created for account 'Acme Inc' will be 
deployed to this host cluster.

Okay to proceed? (y)
# ...
Your Uffizzi controller is ready. To configure DNS, create a record for the hostname 
'controller.uffizzi.example.com' pointing to '35.100.200.30'

This command should:

Uninstall

$ uffizzi uninstall 
This command will uninstall Uffizzi from the default namespace of the 'foo' context.
To uninstall a different installation, use options '--namespace' and/or '--context'.

After uninstalling, new environments created for account 'Acme Inc' will be 
deployed to Uffizzi Cloud (app.uffizzi.com).
Okay to proceed? (y)
gadkins commented 10 months ago

uffizzi install help page

$ uffizzi install help
uffizzi-install - install the uffizzi platform
================================================================

## SYNOPSIS
    uffizzi install [HOSTNAME] [EMAIL]

## DESCRIPTION
    Install the Uffizzi platform on a host cluster. By default, this command uses your 
    kubeconfig current context as the host. 

    The output of this command is an IP address or hostname where your instance of 
    the Uffizzi controller service is available. Uffizzi expects this service to be publicly 
    available at the specified HOSTNAME. Before you can create Uffizzi environments 
    on your installation, be sure to configure your DNS to point HOSTNAME to the IP 
    or hostname output by this command.

    If you're looking for an air-gapped or local installation of Uffizzi, please contact 
    sales@uffizzi.com or try the open-source version (docs.uffizzi.com/open-source).

    EMAIL is a business email, required for letsencrypt cert authority.

    For more information on the Uffizzi installation process, see:
    https://docs.uffizzi.com/cli/commands/install

## FLAGS

    --email
        A business email required for letsencrypt

     --context
        The name of the kubeconfig context to use

     --namespace
        The namespace where Uffizzi platform will be installed

    --help
        Display this help page and exit

## EXAMPLES

    To install Uffizzi using the current context at hostname 
    'controller.uffizzi.example.com', run:

        $ uffizzi install controller.uffizzi.example.com --email="jdoe@example.com"

    To install Uffizzi using context 'foo' and namespace 'bar', run:

        $ uffizzi install controller.uffizzi.example.com --email="jdoe@example.com" \
          --context='foo' --namespace='bar'
gadkins commented 10 months ago

@zipofar Please note that I have included a requirement for an --email, which is required by letsencrypt

gadkins commented 10 months ago

@zipofar