Fix stack.sh
This commit is contained in:
parent
caf31647e0
commit
6958ff61f8
|
@ -27,5 +27,5 @@
|
||||||
action: "{{ operation }}"
|
action: "{{ operation }}"
|
||||||
home_dir: "{{ home_path }}"
|
home_dir: "{{ home_path }}"
|
||||||
roles:
|
roles:
|
||||||
- tendermint
|
|
||||||
- bigchaindb
|
- bigchaindb
|
||||||
|
- tendermint
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# Copyright © 2020 Interplanetary Database Association e.V.,
|
# Copyright © 2020, 2021 Interplanetary Database Association e.V.,
|
||||||
# BigchainDB and IPDB software contributors.
|
# BigchainDB and IPDB software contributors.
|
||||||
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
|
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
|
||||||
# Code is Apache-2.0 and docs are CC-BY-4.0
|
# Code is Apache-2.0 and docs are CC-BY-4.0
|
||||||
|
@ -44,5 +44,5 @@ tendermint_docker_name: "tendermint"
|
||||||
bigchaindb_default_server_port: 9984
|
bigchaindb_default_server_port: 9984
|
||||||
bigchaindb_default_ws_port: 9985
|
bigchaindb_default_ws_port: 9985
|
||||||
bigchaindb_tendermint_port: 26657
|
bigchaindb_tendermint_port: 26657
|
||||||
tendermint_abci_port: 45558
|
tendermint_abci_port: 26658
|
||||||
bigchaindb_docker_net: "bigchaindb_docker_net"
|
bigchaindb_docker_net: "bigchaindb_docker_net"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Comment: This script is was carved out of start.yml task command. It's
|
# Comment: This script is was carved out of start.yml task command. It's
|
||||||
# purpose is to generated tendermint configuration files for each node in
|
# purpose is to generate tendermint configuration files for each node in
|
||||||
# `stack', and compile genesis.json file. These files are further used in
|
# `stack', and compile genesis.json file. These files are further used in
|
||||||
# tm_start script.
|
# tm_start script.
|
||||||
|
|
||||||
|
@ -14,12 +14,13 @@ cat /tendermint/config/genesis.json \
|
||||||
| jq ".validators=[]" > /tendermint/config/genesis.tmp
|
| jq ".validators=[]" > /tendermint/config/genesis.tmp
|
||||||
|
|
||||||
mv /tendermint/config/genesis.tmp /tendermint/config/genesis.json
|
mv /tendermint/config/genesis.tmp /tendermint/config/genesis.json
|
||||||
rm /tendermint/config/node_key.json
|
rm -f /tendermint/config/node_key.json
|
||||||
|
|
||||||
for i in $(seq $STACK_SIZE); do
|
for i in $(seq $STACK_SIZE); do
|
||||||
|
|
||||||
tendermint gen_validator > /tendermint/config/priv_validator$i.json;
|
tendermint gen_validator > /tendermint/config/priv_validator$i.json;
|
||||||
tendermint gen_node_key > /tendermint/config/node_id$i;
|
tendermint gen_node_key > /tendermint/config/node_id$i;
|
||||||
|
mv /tendermint/config/node_key.json /tendermint/config/node_key$i.json
|
||||||
cat tendermint/config/priv_validator$i.json \
|
cat tendermint/config/priv_validator$i.json \
|
||||||
| jq ".Key.pub_key" \
|
| jq ".Key.pub_key" \
|
||||||
| jq ". as \$k | {pub_key: \$k, \
|
| jq ". as \$k | {pub_key: \$k, \
|
||||||
|
|
|
@ -14,11 +14,14 @@
|
||||||
# Copy confguration files from mounted config volume
|
# Copy confguration files from mounted config volume
|
||||||
cp /tendermint_config/genesis.json \
|
cp /tendermint_config/genesis.json \
|
||||||
/tendermint/config/genesis.json
|
/tendermint/config/genesis.json
|
||||||
cp /tendermint_config/priv_validator_key$_ITEM.json \
|
|
||||||
/tendermint/config/priv_validator_key.json
|
|
||||||
cp /tendermint_config/node_key$_ITEM.json \
|
cp /tendermint_config/node_key$_ITEM.json \
|
||||||
/tendermint/config/node_key.json
|
/tendermint/config/node_key.json
|
||||||
|
|
||||||
|
cat /tendermint_config/priv_validator$_ITEM.json \
|
||||||
|
| jq ".LastSignState" > /tendermint/data/priv_validator_state.json
|
||||||
|
cat /tendermint_config/priv_validator$_ITEM.json \
|
||||||
|
| jq ".Key" > /tendermint/config/priv_validator_key.json
|
||||||
|
|
||||||
# Create peers array (to be passed to `tendermint node' command
|
# Create peers array (to be passed to `tendermint node' command
|
||||||
peers=()
|
peers=()
|
||||||
for i in $(seq $STACK_SIZE); do
|
for i in $(seq $STACK_SIZE); do
|
||||||
|
|
Loading…
Reference in New Issue