Closed t-lin closed 4 years ago
Initial CLI bootstrap support for allocator done. Currently falling back to configuration file. No support for environment variable yet (TODO?), need to decide the order of precedence first.
CLI support in proxy is also done. Falls back to configuration file. No environment variable yet, need to decide order.
I would say most specific to least specific is probably good, ie. CLI (specific to run) => config file (specific to proxy instance) => env variable (specific to machine) Though in the default case it would probably use the configuration in a pre-shipped config file so I wonder what the best way to let the user know that the CLI and env variable options exist.
What environment variable name to use?
Edit: The new helpler functions introduced via Multi-Tier-Cloud/common#13 should support passing multiple bootstraps via a space-separated environment variables.
Done for both proxy
and allocator
.
The order of precedance for specifying bootstraps are:
If multiple methods are used, we take only take the bootstraps from the highest ranked method (i.e. we do not take a union of the bootstraps).
Need make sure microservice containers do not have a bootstrap section in their config files for this to work. I'll start a new issue for it.
Hard-coded bootstraps has been removed as of v0.5.0 of Multi-Tier-Cloud/common. Should be able to support secifying the bootstrap via CLI for:
@michaelweiyuzhao @hivanco If a CLI bootstrap is not specified, we should fallback to another method. A configuration file setting already exists as one potential fallback. Should we support reading from environment variables as well? If so, what should the prioritization order be? CLI=>File=>Env? Or CLI=>Env=>File?