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
[GOAL2-624] Add a kmd_config.json.example to the installer dir #112
Conversation
…efault kmd config.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that you'll need to do bit more than just that -
- Format the json so it would be human readable ( unless there is a good reason not to do so )
- Add this json to the following locations -
- installer/rpm/algorand.spec
- scripts/build_deb.sh
- scripts/build_package.sh
@tsachiherman wrote:
👍 Formatted the file for 1.), good thinking. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd go for another kind of change. Don't create the file yourself. kmd has a function that tries to read a config file, if it fails and returns the default one.
Modify the function to also dump the example file. That way you guarantee consistency of the fields.
if err != nil { | ||
exampleFilename := filepath.Join(dataDir, kmdConfigExampleFilename) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use codecs.SaveObjectToFile() and save it formatted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where to modify the default configuration ip and port?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Proposed code would save the file on every instance invocation. Was that the intent ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good. I like the idea of self-generating config files compared to static ones.
Don't change `assetcreators` table/column names
Summary
A common request from developers is for some kind of
kmd_config.json.example
to look at and work from. This PR proposes to add such anexample
to theinstaller
dir, next to the normal algodconfig.json.example
. It is equivalent to the current default kmd configuration.Test Plan
Automated test suite will check for regressions.