Esempio n. 1
0
 def build0(cls, *_):
     os.makedirs(Makefile.build_path, exist_ok=True)
     if not os.path.isfile(
             os.path.join(Makefile.build_path,
                          'node100/config/genesis.json')):
         pipe(
             'docker run --rm -v %s/:/tendermint:Z %s init --home /tendermint/node100'
             % (Makefile.build_path, Makefile.node_name))
     pipe('docker-compose -f %s up' % (Makefile.compose_run_file0))
Esempio n. 2
0
 def build(cls, *_):
     os.makedirs(Makefile.build_path, exist_ok=True)
     if not os.path.isfile(
             os.path.join(Makefile.build_path,
                          'node0/config/genesis.json')):
         pipe(
             'docker run --rm -v %s/:/tendermint:Z %s testnet --v %s --o . --populate-persistent-peers --starting-ip-address 192.167.233.2'
             % (Makefile.build_path, Makefile.node_name, Makefile.count))
     pipe('docker-compose -f %s up' % (Makefile.compose_run_file))
Esempio n. 3
0
 def pipe(cls, cmd, *_):
     if not cls.silent: print(cmd)
     pipe(cmd)
Esempio n. 4
0
 def down(cls, *_):
     pipe('docker-compose -f %s down' % (cls.compose_file))
Esempio n. 5
0
 def up(cls, *_):
     pipe('docker-compose -f %s up' % (cls.compose_file))
Esempio n. 6
0
 def stop(cls, *_):
     pipe('docker-compose -f %s stop' % (cls.compose_file))
Esempio n. 7
0
 def start(cls, *_):
     pipe('docker-compose -f %s start' % (cls.compose_file))
Esempio n. 8
0
 def down0(cls, *_):
     pipe('docker-compose -f %s down' % (Makefile.compose_run_file0))
Esempio n. 9
0
 def restart(cls, *_):
     pipe('docker-compose -f %s restart' % (Makefile.compose_run_file))
Esempio n. 10
0
 def stop(cls, *_):
     pipe('docker-compose -f %s stop' % (Makefile.compose_run_file))
Esempio n. 11
0
 def tendermint(cls, *_):
     os.makedirs(Makefile.build_path, exist_ok=True)
     if not os.path.isfile(Makefile.tendermint_file_path):
         pipe(
             'curl -o %s -L https://github.com/HyperService-Consortium/NSB/releases/download/v0.7.4/tendermint-linux-v0.32.2-8ba8497a'
             % (Makefile.tendermint_file_path, ))
Esempio n. 12
0
 def image(cls, *_):
     pipe('cp build/NSB node/NSB')
     pipe('docker build --tag %s node' % Makefile.node_name)
Esempio n. 13
0
 def clean(cls, *_):
     pipe('rm -rf -r %s/node*' % (Makefile.build_path))
     pipe('rm -rf -r %s/data*' % (Makefile.build_path))
     pipe('rm -rf -r %s/nsbstate.db' % (Makefile.build_path))
     pipe('rm -rf -r %s/trienode.db' % (Makefile.build_path))
Esempio n. 14
0
 def start0(cls, *_):
     pipe('docker-compose -f %s start' % (Makefile.compose_run_file0))