fablo
fablo copied to clipboard
feature- add CLI options to init command
Currently, executing fablo init
initializes a small network configuration file. However, it would greatly enhance user experience if I could specify the number of organizations and peers directly from the command line interface (CLI). This would enable the generation of the configuration JSON file based on the inputs provided via CLI options.
hey @dzikowski any thoughts over this? I may raise PR to add this feature soon then.
I think it might be a bit tricky to implement, but you can start it if you want
This one is indeed a tricky one cause its such a difficult task to identify where exactly the fablo-config.json
is getting created. Turns out that, this line - https://github.com/hyperledger-labs/fablo/blob/cbd4ed0049d1b0876927cdbea80ee10531bbc7ba/fablo.sh#L122
initializes a temporary directory which has fablo
as starting name and then some random string eg. fablo.34dfgrt
and this is created at /tmp/fablo.xxxxxx
. I understand this gets created but from where are we getting this sample config file already defined in this folder. basically it should initialise the temp folder but from where do am I getting this sample config file?
from console debugging I identified where the flow is going turn out that the schema for the sample-config file is getting modified here -https://github.com/hyperledger-labs/fablo/blob/cbd4ed0049d1b0876927cdbea80ee10531bbc7ba/src/init/index.ts but again changing log statements here had no effect on actual command run.
What I am guessing is that when I do init
everything gets mounted to a docker container and that container and log statements and everything gets executed from there and that container gets destroyed after the execution, again I am not sure, I am guessing from this command - https://github.com/hyperledger-labs/fablo/blob/cbd4ed0049d1b0876927cdbea80ee10531bbc7ba/fablo.sh#L145C1-L150C9
@dzikowski @Hejwo you guys have done a lot of engineering and encapsulation while setting up this sample fablo-config.json
:disappointed_relieved: