kots icon indicating copy to clipboard operation
kots copied to clipboard

Feature Request: allow installing and starting an application from the command line.

Open MadVikingGod opened this issue 4 years ago • 5 comments

Currently, to install a kots application there are a number of steps that can not be done on the command line. For example, setting the password, inputting config values, and the first deploy. The ask is to enable automatic testing of the user's workflow of installing an application to it up and running without having to open the browser.

Here are the minimum steps to install a running application, and ideally, each of these should be configured at the command line in some way:

  • [x] Choose a namespace. Can use -n/--namespace
  • [x] Choose a password.
  • [x] Choose a license file. Can use --license-file, but this has interesting side effects.
  • [x] Configure the application. A --config flag would be a useful start
  • [ ] Click the deploy button from the version history page.

Ideally, I would like to run a single command to have an application installed in my CI pipeline. For example kubectl kots install app-name -n namespace --pasword supersecret --license-file license.yaml --config config.yaml --deploy. I could then wait for my application to be ready and perform tests.

MadVikingGod avatar Apr 27 '20 18:04 MadVikingGod

You can use the --shared-password flags for the second checkbox.

KOTS 1.15.0 has a --config-values flag to provide the config now (#470). This is supported for the initial install.

KOTS 1.15.0 also reworked the --license-file flag to better handle those side effects (it was unexpectedly different): #459

Then (if the preflights pass), there shouldn't be a need to click the Deploy button -- the application will deploy.

This still has a lot of unhappy paths that aren't yet covered (bad data, preflights not working, etc).

Also KOTS 1.15.0 is scheduled to ship by 5/1

marccampbell avatar Apr 27 '20 23:04 marccampbell

I'm definitely running into an issue with this where the preflights never seem to finish.

I started this install 11 minutes ago with essentially

kubectl kots install app-slug --license-file license.yaml --config-values config.yaml --namespace default --shared-password password --port-forward=false

Nothing new in the logs for the last 10 minutes. When I kubectl kots admin-console and look at Version History, it shows 'Status: Running Checks` and a spinner.

MikaelSmith avatar Jun 16 '20 19:06 MikaelSmith

Could https://github.com/replicatedhq/kots/issues/847 explain why deploys aren't happening automatically?

MikaelSmith avatar Jul 29 '20 16:07 MikaelSmith

https://github.com/replicatedhq/kots/issues/861 also seems related.

MikaelSmith avatar Jul 29 '20 16:07 MikaelSmith

@MikaelSmith I think #847 may be part of this, although it kind of depends on your preflights. My expectation is that, with 1.17.x, that if you pass all the flags and the preflights pass (no warnings), then the "deploy" action should happen automatically, and I think this has been confirmed in the field by some folks.

dexhorthy avatar Aug 05 '20 17:08 dexhorthy