kool-dev / kool

From local development to the cloud: web apps development with containers made easy.

Home Page:https://kool.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Deploy feature

fabriciojs opened this issue · comments

We need to document the deploy feature, as is, and let's label it in either alpha - so no strings attached.

We need to document:

  • Configuration files and their references
  • Available/related commands
  • Kool Cloud introduction/instructions to sign up

This should be a continuous effort in the coming weeks to get to a public beta state.

Beyond documentation, I am gonna propose here a few improvements/changes:

  1. How about we create a new sub-command umbrella kool cloud to scope all of the Kool Cloud related commands? Currently we have:
    • kool deploy - deploys or updates an environment
    • kool deploy exec - executes a command in a container in a deployed environment
    • kool deploy destroy - destroys the environment

With this proposal we would have then:

  • kool cloud - Umbrella command with help description, and some common parameters (like --token, --domain)
  • kool cloud deploy - deploys or updates an environment
  • kool cloud exec - executes a command in a container in a deployed environment
  • kool cloud destroy - destroys the environment

This sets the ground for future expansions:

- `kool cloud logs` - display logs from a deployed container (under active development)
- `kool cloud db:import`
- `kool cloud db:dump`  ...
  1. We need to increse safety on the deploy usage. Since we depend on a token that may give access to several environments, and then another simple flag (KOOL_DEPLOY_DOMAIN) to identify the target environment, we are prone to someone deploying the wrong application to the wrong domain, overriding it, which would be very bad.

In order to improve behaviour here, we could:

  • When under a TTY, for kool deploy, interactively ask confirmation on for the deployment, telling whether it will be created or updated, and the exact environment that will be affected. Add a --force or --no-interactive flag as well, to skip the interactive prompt.
  • When under a TTY, for kool deploy destroy, create the same confirmation. Also should have the --no-interactive/--force flag.

I full-heartedly support this new kool cloud namespace (umbrella). As discussed on our call yesterday, it's easier to understand because cloud references a remote "location" or environment (vs. a local environment), whereas deploy is an action (and one of many - i.e. exec, destroy, logs). And it reinforces the branding of KoolCloud.

This is about to go public soon, closing this old reference.