Skip to content
This repository has been archived by the owner on May 6, 2020. It is now read-only.

config:set --global for common variables #1219

Open
deis-admin opened this issue Jan 19, 2017 · 10 comments
Open

config:set --global for common variables #1219

deis-admin opened this issue Jan 19, 2017 · 10 comments

Comments

@deis-admin
Copy link

From @boffbowsh on September 10, 2014 14:8

It'd be extremely useful for a Deis deployment of common applications to have the concept of cluster-wide environment variables, for example a REDIS_URL if all apps hit a common Redis server, or perhaps some email service credentials.

Regarding the action that would take place when these get updated, I think it would be best to allow the operators to re-release and thus restart apps at their own pace.

Copied from original issue: deis/deis#1804

@deis-admin
Copy link
Author

From @bacongobbler on September 10, 2014 15:13

Not sure what name to give the option, but --cluster is already used to specify which cluster you want the app to be deployed to. Maybe something like --global?

Also, would this force a new release across all existing apps in the cluster?

@deis-admin
Copy link
Author

From @boffbowsh on September 10, 2014 15:16

Ah yes of course. Perhaps config:set:cluster then or cluster:config:set?

I think changing this should just essentially be a database setting, and subsequent releases will pick it up. Is it possible to force a new release of an app without changing app code or config?

@deis-admin
Copy link
Author

From @bacongobbler on September 10, 2014 15:24

Is it possible to force a new release of an app without changing app code or config?

If we're following 12 factor to a tee, "build + config = release". It's not possible to force a new release until something directly changes the environment. Setting a cluster-wide environment variable should create a new release for each application since it would be picked up the next time the application created a release, anyways. I'm concerned about the computational power required to re-provision apps across the cluster, but that shouldn't be too much of a concern so much as doing "The Right Thing:tm:".

@deis-admin
Copy link
Author

From @boffbowsh on September 10, 2014 15:35

It's more a case of the timing of it being in control of devs/ops. Restarting all apps on the cluster at the same time may not be desirable. If that can be controlled I don't see a problem in creating a release for each app at the time the setting is changed.

Disclaimer: we don't currently use Deis, but are very much looking forward to using it once it goes Stable, with HA, logging etc. This is one of the features that would possibly block us from using Deis without having something external that manages common config across all apps.

@deis-admin
Copy link
Author

From @kikicarbonell on September 10, 2014 19:40

config:set --cluster for common variables, I need too! 👍

@deis-admin
Copy link
Author

From @carmstrong on February 10, 2015 18:41

Renamed issue to config:set --global, as dropping the notion of clusters would have made this command confusing.

@deis-admin
Copy link
Author

From @sforsman on February 11, 2015 18:50

This feature would definitely be useful in our use cases as well. It would simplify management and deployment of our applications.

@deis-admin
Copy link
Author

From @mboersma on May 20, 2015 3:19

A workaround for now is something like deis create && deis config:push -p ~/.env.

EDIT: changed config:set to config:push. With love from @bacongobbler ❤️

@deis-admin
Copy link
Author

From @jwaldrip on July 13, 2015 15:49

Pulled this from another request I had #4013:

As a developer I would like to set ENV variables across my cluster, so that I don't have to configure it for each application

Example Use Case:

deis config:set --global NEW_RELIC_LICENSE_KEY=abc123

Acceptance Criteria:

  • New builds will reflect the ENV variable.
  • New applications will reflect the ENV variable.
  • ENV variable can be overridden if set at the application level.

Nice to haves:

Aliasing. It would be great if I could set SOME_VAR=$OTHER_VAR. This would allow me to do NEW_RELIC_APP_NAME=$DEIS_APP.

@Cryptophobia
Copy link
Contributor

This issue was moved to teamhephy/controller#39

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

No branches or pull requests

3 participants