kots icon indicating copy to clipboard operation
kots copied to clipboard

Support the use of `--local-path` with `kots install`

Open Iristyle opened this issue 5 years ago • 7 comments

kots install currently has a --local-path flag that is exposed but doesn't appear implemented - https://github.com/replicatedhq/kots/blob/master/cmd/kots/cli/install.go#L187

Implementing that flag would make for a very convenient dev workflow to verify local changes against a Replicated console in the current localhost development environment.

Iristyle avatar May 21 '20 21:05 Iristyle

With 1.16.0 close, this can get added to the 1.17.0 release.

marccampbell avatar May 22 '20 13:05 marccampbell

This isn't going to be in 1.17. Since we have other ways to do local development, is this even a priority anymore?

markpundsack avatar Jul 10 '20 21:07 markpundsack

We're still having some issues around the current workflow, which we've put in a Makefile like:

kubectl kots install cd4pe/unstable --namespace $(NAMESPACE) --shared-password $(PASSWORD) --port-forward=false --license-file license.yaml --config-values dev/cd4pe-min-config.yaml
kubectl kots download cd4pe --namespace $(NAMESPACE) --dest output
cp cd4pe/* output/cd4pe/upstream/
# use the downloaded license in case it was updated from upstream
POD_NAMESPACE=$(NAMESPACE) kubectl kots pull cd4pe --namespace $(NAMESPACE) --shared-password $(PASSWORD) --local-path output/cd4pe/upstream --rootdir output --exclude-admin-console --license-file output/cd4pe/upstream/userdata/license.yaml --config-values output/cd4pe/upstream/userdata/config.yaml
kubectl kots upload --namespace $(NAMESPACE) --slug cd4pe output/cd4pe

This is a bit clunky... and problematically we have to launch the admin console and then click the install button to actually install our app. We can't seem to automate starting the app with desired config values. FWIW, we don't have a problem when the admin console isn't involved. In those cases, we can automate everything the way we want.

Iristyle avatar Jul 13 '20 19:07 Iristyle

Our Makefile workflows are starting to get a bit unwieldy, and it would still be very helpful if this was implemented.

Iristyle avatar Jan 29 '21 21:01 Iristyle

This isn't going to be in 1.17. Since we have other ways to do local development, is this even a priority anymore?

What are the other ways to do local development?

dwickr avatar Mar 10 '22 16:03 dwickr

So we have a CONTRIBUTING.md in the hack directory that might be able to get you started for local development.

You will need to bring your own k8s cluster (ie docker desktop, k3d).

We're going to add a story to our backlog to make this a little more formalized/streamlined in the future.

Alternatively, a linux only alternative (still bring your own k8s cluster)

cd web
make build-kotsadm # builds the web so make build can work
cd ../
make build # makes the api server and the cli
make all-ttl.sh # makes a temp image in a temp repo, also available locally
./bin/kots install test-app --kotsadm-registry ttl.sh --kotsadm-tag 12h --kotsadm-namespace <your-namespace>

kcboyle avatar Mar 11 '22 16:03 kcboyle

So we have a CONTRIBUTING.md in the hack directory that might be able to get you started for local development.

You will need to bring your own k8s cluster (ie docker desktop, k3d).

We're going to add a story to our backlog to make this a little more formalized/streamlined in the future.

Alternatively, a linux only alternative (still bring your own k8s cluster)

cd web
make build-kotsadm # builds the web so make build can work
cd ../
make build # makes the api server and the cli
make all-ttl.sh # makes a temp image in a temp repo, also available locally
./bin/kots install test-app --kotsadm-registry ttl.sh --kotsadm-tag 12h --kotsadm-namespace <your-namespace>

It seems like this is for local development of KOTS, the --local-path flag -- as I understand it -- is for local development of applications on top of KOTS.

dwickr avatar Jan 13 '24 20:01 dwickr