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

[Configuration] Utilize viper for configuration management #215

Closed
6 tasks
okdas opened this issue Sep 14, 2022 · 3 comments
Closed
6 tasks

[Configuration] Utilize viper for configuration management #215

okdas opened this issue Sep 14, 2022 · 3 comments
Assignees
Labels
client work needed to interface with the node (rpc, cli, etc..) core Core infrastructure - protocol related tooling tooling to support development, testing et al

Comments

@okdas
Copy link
Member

okdas commented Sep 14, 2022

Objective

As we are introducing cobra library to manage CLI arguments/flags (in scope of #112), it makes sense to also utilize viper - library from the same maintainers with tight integration with cobra - to provide an interface for flexible configuration. This would simplify deployments in container environments significantly, and is an existing pattern in many blockchain clients.

Origin Document

One particular example when we first encountered a need in this is during Pocket Operator PoC - https://www.youtube.com/watch?v=Tf9Qtr1gi3U - for postgres credential configuration.

Goals

  • An ability to override configuration parameters via CLI arguments and/or via environment variables
  • Configuration file(s) are managed via viper.

Deliverable

  • An interface to change configuration parameters (that were originally set either as default value, or from configuration file) with CLI argument or environment variable/

General issue deliverables

  • Update the appropriate CHANGELOG
  • Update any relevant READMEs (local and/or global)
  • Update any relevant global documentation & references
  • If applicable, update the source code tree explanation
  • If applicable, add or update a state, sequence or flowchart diagram using mermaid

[Optional] Testing Methodology

  • TBD
  • All tests: make test_all
  • LocalNet: verify a LocalNet is still functioning correctly by following the instructions at docs/development/README.md

Creator: @okdas
Co-Owners: TBD

@okdas okdas added core Core infrastructure - protocol related priority:medium tooling tooling to support development, testing et al client work needed to interface with the node (rpc, cli, etc..) labels Sep 14, 2022
@okdas
Copy link
Member Author

okdas commented Sep 14, 2022

Blocked by #112

@Olshansk Olshansk moved this to Backlog in V1 Dashboard Sep 14, 2022
@andrewnguyen22 andrewnguyen22 changed the title [Utility][Configuration] Utilize viper for configuration management [Configuration] Utilize viper for configuration management Sep 18, 2022
@Olshansk
Copy link
Member

@deblasis Can we say this is done?

@Olshansk Olshansk moved this from Backlog to Rescope in V1 Dashboard Dec 15, 2022
@deblasis
Copy link
Contributor

@deblasis Can we say this is done?

Correct

Repository owner moved this from Rescope to Done in V1 Dashboard Dec 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client work needed to interface with the node (rpc, cli, etc..) core Core infrastructure - protocol related tooling tooling to support development, testing et al
Projects
Status: Done
Development

No branches or pull requests

3 participants