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

Update uffizzi install command #374

Closed
gadkins opened this issue Nov 14, 2023 · 5 comments · Fixed by #375, UffizziCloud/uffizzi#494 or UffizziCloud/uffizzi_controller#102
Closed

Update uffizzi install command #374

gadkins opened this issue Nov 14, 2023 · 5 comments · Fixed by #375, UffizziCloud/uffizzi#494 or UffizziCloud/uffizzi_controller#102
Assignees
Labels
priority 1 Urgent issue

Comments

@gadkins
Copy link
Member

gadkins commented Nov 14, 2023

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.

@gadkins gadkins added the priority 1 Urgent issue label Nov 14, 2023
@zipofar zipofar self-assigned this Nov 15, 2023
@zipofar
Copy link
Contributor

zipofar commented Nov 15, 2023

Questions:

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

@gadkins
Copy link
Member Author

gadkins commented Nov 15, 2023

@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="[email protected]"
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:

  • Require a hostname for the cluster’s controller (ingress.hostname) and pass this value to the rails app
  • Require a email (required for letsencrypt)
  • Generate values for controller global.uffizzi.controller.password and global.uffizzi.controller.username (default "admin" is fine)
  • Use these values to install the helm chart
  • Pass these values to the rails app

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
Copy link
Member Author

gadkins commented Nov 15, 2023

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 
    [email protected] 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="[email protected]"
    
    To install Uffizzi using context 'foo' and namespace 'bar', run:
    
        $ uffizzi install controller.uffizzi.example.com --email="[email protected]" \
          --context='foo' --namespace='bar'
    

@gadkins
Copy link
Member Author

gadkins commented Nov 16, 2023

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

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

gadkins commented Nov 23, 2023

@zipofar

  • Users should be able to install a maximum of 1 uffizzi installation for now. Return an error message such as You are allowed a maximum of 1 installation for your account type. First uninstall your existing installation, or contact [email protected]
  • Users are allowed a 30-day free trial. After 30 days, they must enter a credit card to continue using their installation. If they do not, return an error message: Your free trial has ended. Please add a credit card to continue: https://app.uffizzi.com/account_settings#billing
  • Do no provide a way to switch back and forth between platform and self-hosted controller. The user must uninstall to switch back to the platform.
  • When a user runs uffizzi uninstall, switch their default controller back to app.uffizzi.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment