bcgov / von-network

A portable development level Indy Node network.
Apache License 2.0
159 stars 188 forks source link

suggestions for running option #185

Open timo-kang opened 2 years ago

timo-kang commented 2 years ago

Hi, I'm using this network and I think It would be better if there's more options on running network.

  1. init flag
    • if this flag is true, run init_indy_keys.
    • when I specify the IPS argument, I need to change the commented part on von_generate_transactions file.
  2. update initEnv funcion on manage file.
    • I fixed initEnv function since I'm too lazy to put every arguments on a commend when I try to run the network.
    • I've just moved down the part that parses env variables on .env file.
WadeBarnes commented 2 years ago

@kingworm, Can you provide more details regarding why you feel these additional options are needed?

The basics of running von-network are: ./manage build - Build ./manage start - Start von-network, all initialization is done automatically. ./manage stop - Stop von-network retaining current ledger data and configuration. ./manage down - Stop von-network and delete current ledger data and configuration.

timo-kang commented 2 years ago

Hi @WadeBarnes,

When I run ./manage start, specifically giving an options with IPS=host1, host2, host3, ..., It causes error something like that it needs to run init_indy_keys. So I uncommented taht part.

the second suggestion is about that when I specify IPS part, for example, initEnv returns IPS="" because parsing an .env file is ahead of parsing a command argument

Aberasturi commented 2 years ago

Hello @kingworm,

I usually use .env file to configure the network or other env variables or key/values without modifing manage script.

for example I have the next ones in my .env file and the genesis file is generated with the IP 192.168.1.34 automatically when i start the network with manage start

  IP=192.168.1.34
  IPS=192.168.1.34,192.168.1.34,192.168.1.34,192.168.1.34
  DOCKERHOST=192.168.1.34
  GENESIS_URL=file:///tmp/genesis.txn

Hope this helps.

timo-kang commented 2 years ago

Hello @kingworm,

I usually use .env file to configure the network or other env variables or key/values without modifing manage script.

for example I have the next ones in my .env file and the genesis file is generated with the IP 192.168.1.34 automatically when i start the network with manage start

IP=192.168.1.34
IPS=192.168.1.34,192.168.1.34,192.168.1.34,192.168.1.34
DOCKERHOST=192.168.1.34
GENESIS_URL=file:///tmp/genesis.txn

Hope this helps.

Hello @Aberasturi , Thank you for leaving a comment on this issue.

the example that you gave is too obvious one, all IP args are 192.168.1.34. If you have .env file like

IP=192.168.1.34
IPS=192.168.100.1,192.168.100.11,192.168.100.21,192.168.100.31
GENESIS_URL=file:///tmp/genesis.txn

then when you start the network with manage start, env variables always returns IP="", IPS="" since those arguments overwrites over .env file in initEnv function.