Opened at 2016-09-25T17:02:48Z
Closed at 2020-01-21T20:16:24Z
#2833 closed enhancement (wontfix)
Enable using values from environment variables from tahoe.cfg
Reported by: | amontero | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | undecided |
Component: | unknown | Version: | 1.11.0 |
Keywords: | environment variables | Cc: | amontero@… |
Launchpad Bug: |
Description (last modified by amontero)
As I progress through dockerizing my setup, I've noticed that being able to use values from environment vars would make Tahoe-LAFS more easily configurable. It would be beneficial to use arbitrary env var values to replace any configuration option value from inside tahoe.cfg (perhaps also other files, to deal with secrets, too).
Also, Docker itself makes heavy use of env vars for host IPs and ports when linking containers.
Some kind of placeholder or token syntax instead of literal values, such as %VARNAME or {VARNAME} could be added to declare a value which would be env var replaced. The icing on the cake would be Bash syntax, which allows defaults ${VARNAME:-default_value}.
This would make Tahoe-LAFS a lot more dynamically configurable and more Docker-friendly, since env vars are commonplace.
Related ticket: #1401
Change History (2)
comment:1 Changed at 2016-09-25T17:06:39Z by amontero
- Cc amontero@… added
- Description modified (diff)
- Keywords environment variables added
comment:2 Changed at 2020-01-21T20:16:24Z by exarkun
- Resolution set to wontfix
- Status changed from new to closed
A node configuration is a pretty complex structure. Representing it completely in environment variables seems likely to me to be something of a mess.
There are also parts of the configuration which are sensitive and should be kept secret and environment variables are not a way to accomplish that.
I'd suggest that for things like Docker images, the image itself should be somewhat tailored to a specific use and should accept *some* configuration in environment variables - then turn around and write a tahoe.cfg and start up a node pointed at that.
That is, the Tahoe node process itself should not directly support any configuration as environment variables.
An alternative to this would be for Tahoe to expose an API that allows full control over configuration. Then, a bare-bones node could be started up and then configured with API calls containing arbitrary configuration.
Tagging and linking