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

Issue 2261/json config overridable cli #2325

Closed
wants to merge 5 commits into from

Conversation

JakubFornadel
Copy link
Collaborator

Purpose

All config params can be now specified in both json config file as well as command line arguments, e.g.:

{
  "data_path" : "/tmp/taraxa",
  "network" : {
    "rpc" : {
      "enabled": true,
      "http_port" : 7777,
    },
    ...
  }
  ...
}

can be also specified by:
--data_path=/different/path --network.rpc.enabled=false --network.rpc.http_port=9999

If some config parameters are specified in both json config file as well as command line argument, command line argument has higher priority.

This can be now used by https://github.com/Taraxa-project/gitops-ledger to override basically any config parameter by command line argument, restart nodes and override their configs. Before we would have to do it manually somehow 1 by 1 or build a new image, now it is possible to do it in few seconds...

How does the solution address the problem

Changes made

@JakubFornadel
Copy link
Collaborator Author

@rjonczy I did adjust some of the cli options names so some scripts of yours might not work after we merge this. Is it possible maybe to check somewhere what cli arguments are you calling taraxa binary ?

@JakubFornadel JakubFornadel force-pushed the issue-2261/json-config-overridable-cli branch from e9a0eaa to 76bd024 Compare February 16, 2023 15:33
@JakubFornadel JakubFornadel force-pushed the issue-2261/json-config-overridable-cli branch from 76bd024 to 094e600 Compare February 16, 2023 15:38
@rjonczy
Copy link
Contributor

rjonczy commented Feb 16, 2023

@rjonczy I did adjust some of the cli options names so some scripts of yours might not work after we merge this. Is it possible maybe to check somewhere what cli arguments are you calling taraxa binary ?

@JakubFornadel sorry, I missed that mention. I just brieflt checked, but it requires more of attention. Will go over this tomorrow morning.

@@ -4,14 +4,17 @@
"final_chain_cache_in_blocks": 5,
"network": {
"rpc": {
"enabled": true,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not know about this, e.g. geth as this disabled by default

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will change it to false

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

Successfully merging this pull request may close these issues.

Make all of our json config values overridable by command line args
5 participants