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

The CLI should accept any path provided by DEIS_PROFILE #28

Closed
jchauncey opened this issue Mar 23, 2016 · 8 comments
Closed

The CLI should accept any path provided by DEIS_PROFILE #28

jchauncey opened this issue Mar 23, 2016 · 8 comments
Assignees
Labels
Milestone

Comments

@jchauncey
Copy link
Member

Right now the json files can only exists in the .deis directory.

@jchauncey jchauncey added the bug label Mar 23, 2016
@bacongobbler
Copy link
Member

Personally I'd rather deprecate DEIS_PROFILE in favor of a global --config-file flag to specify where to read config from, defaulting to ~/.deis/client.json

@jchauncey
Copy link
Member Author

Yeah I actually like that better. Might try and add that soon.

@Joshua-Anderson
Copy link
Contributor

I'm torn on this. I think that being able to pass a path is adds nice flexibility, but $DEIS_PROFILE fits a multi-cluster workflow really well.

Being able to export DEIS_PROFILE=staging or export DEIS_PROFILE=production is super quick and intuitive way to switch between multiple clusters.

@bacongobbler
Copy link
Member

There's nothing stopping you from replicating the same behavior with --config-file. It just adds more flexibility for users. For example, here's a script to replicate the same behavior as $DEIS_PROFILE with --config-file:

#!/bin/bash

DEIS_PROFILE=${DEIS_PROFILE:-client}
deis --config-file "$HOME/.deis/$DEIS_PROFILE.json" $@

Users may also want to specify a global client config path to share one config across all users of a system (e.g. /etc/deis/client.json), which the client currently does not allow.

@jchauncey
Copy link
Member Author

So I think keeping DEIS_PROFILE while accepting --config or --client-config is perfectly acceptable. I would just make the CLI option override the env var.

@sstarcher
Copy link
Contributor

I think adding --client-config is a good idea, but any CLI flag like that should be backed by an environment variable or an additional command should be supported to set the client config long term.

Similar with K8S you can specify --kubeconfig or kubectl config or KUBE_something_something environment variable

@Joshua-Anderson
Copy link
Contributor

My proposal is that:

  1. $DEIS_PROFILE should support file-paths in addition to just a name.
  2. A global flag called --config acts identically to $DEIS_PROFILE

@Joshua-Anderson
Copy link
Contributor

A command line flag is going to be needed to run tests in parallel. Otherwise all tests have to share the same $DEIS_PROFILE, so I'm going to start work on this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants