habitat icon indicating copy to clipboard operation
habitat copied to clipboard

Improve configuration functionality for System Administrators

Open thomascate opened this issue 5 years ago • 7 comments

Currently we're seeing some pain from the system admin side of things managing applications with habitat. Here's what it looks like to try to do the standard "change this one config value" on a habitat app in a ring.

hab config show = show the contents of default.toml not the running config curl service endpoint = show all computed config as json hab config apply = Overwrite all non-default values to either their default state or the option in this patch.

Which means, "add this line to the config" is done by 1: Get the default config as toml 2: Get the current config as json 3: Find all values in the json that are not in the toml, this is your current patch set 4: Convert that json hash to a toml hash 5: Add your config change 6: hab config apply with your change (edited) 7: You've currently changed the config on all nodes that do not have a user.toml overriding this. If you want to change those you need to now go find them manually.

At first glance doing a hab config show adding your option and pushing makes sense. However you just moved all your values from one hidden state to another. They were default, they're now configured. So upgrades that change the default won't do what's expected now.

Here's what I would we rather see.

1: hab config show should show the hab config (https://github.com/habitat-sh/habitat/issues/5055) 2: hab config patch should exist 3: It should be possible to see a set of default configs, non-default configs, and user.toml overrides 4: the Services endpoint should have on option to send back all of the above in toml instead of json. 5: A helper should exist to set the version string to epoch datetime. So all users don't have to google for this string $(date '+%s') anymore.

With these options changing a config setting goes from 6 tricky steps, to these 2. 1: put key in patch.toml 2: run hab config patch patch.toml $(date %s)

or 1: hit services endpoint for config changes with output set to toml 2: add my values and hab config apply

thomascate avatar Jun 18 '19 19:06 thomascate

Also a hab config edit that works like kubectl <object> edit or knife node edit

irvingpop avatar Jun 25 '19 20:06 irvingpop

Agreed... there's a lot to be desired in the current workflow.

Here are a handful of related issues: #3977 #4827 #5032 #5055 #5542

christophermaier avatar Jul 09 '19 18:07 christophermaier

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. We value your input and contribution. Please leave a comment if this issue still affects you.

stale[bot] avatar Jul 08 '20 22:07 stale[bot]

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. We value your input and contribution. Please leave a comment if this issue still affects you.

stale[bot] avatar Jul 25 '21 11:07 stale[bot]

Having some sort of hab config patch is still a gap

themightychris avatar Jul 25 '21 12:07 themightychris

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. We value your input and contribution. Please leave a comment if this issue still affects you.

stale[bot] avatar Jul 31 '22 10:07 stale[bot]

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. We value your input and contribution. Please leave a comment if this issue still affects you.

stale[bot] avatar Aug 12 '23 18:08 stale[bot]