Closed technosophos closed 6 years ago
Do you want to use this in an automated way (say a Brigade job?)
Yeah. We also floated an idea about something similar last week with introducing a draft connect --detach
and a draft disconnect
commands, which is a similar workflow to what @technosophos is describing.
My only two cents here would be
draft connect --detach
should keep the tunnels open in the backgrounddraft connect --detach
a second time should fail saying a connection's already been opened (or just re-display the previously opened tunnels)Similar commands in this space are minikube docker-env
, gofish tank
and docker-machine env
.
Oh, as for the multi-port issue, how about following the same convention Kubernetes does? e.g. draft connect --detach
will export port variables as
EXAMPLE_GO_SERVICE_HOST=http://localhost
EXAMPLE_GO_SERVICE_PORT=11234
EXAMPLE_PYTHON_SERVICE_HOST=http://localhost
EXAMPLE_PYTHON_SERVICE_PORT=11235
That would make the dev experience from testing apps in-cluster to testing with Draft much smoother.
closed via #701
It would be cool to be able to do
$(draft connect --env-export)
and haveDRAFT_URL
set automatically so we could do:$DRAFT_PORT might also be nice to have there.
I haven't thought through the details, given multi-connect. Maybe we'd have to do something like:
Or something like that.
Anyway, just a rough draft of an idea floating around as I build apps with Draft. 🎆