forked from hyperledger-iroha/iroha-dco
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
deploy iroha network on clean machines
Signed-off-by: dumitru <[email protected]>
- Loading branch information
1 parent
c310584
commit 76c2ac1
Showing
11 changed files
with
127 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,7 @@ build/* | |
*.o | ||
*.pb.cc | ||
*.pb.h | ||
*.retry | ||
.gradle/* | ||
.vscode/* | ||
.idea/* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"block_store_path" : "/tmp/block_store/", | ||
"torii_port" : 50051, | ||
"internal_port" : 10001, | ||
"pg_opt" : "host=iroha_postgres port=5432 user=iroha password=aaa", | ||
"redis_host" : "iroha_redis", | ||
"redis_port" : 6379, | ||
"max_proposal_size" : 10, | ||
"proposal_delay" : 5000, | ||
"vote_delay" : 5000, | ||
"load_delay" : 5000 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import optparse | ||
from pathlib import Path | ||
|
||
|
||
home = str(Path.home()) | ||
|
||
parser = optparse.OptionParser() | ||
|
||
parser.add_option('-p', '--postgres-password', | ||
help="postgress password") | ||
|
||
parser.add_option('-u', '--postgres-user', | ||
help="postgress user") | ||
|
||
|
||
options, args = parser.parse_args() | ||
|
||
if not options.postgres_password or not options.postgres_user: | ||
raise ValueError("No user or pass provided") | ||
|
||
|
||
with open(home+"/iroha_data/config.sample", "w") as f: | ||
s = """{{ | ||
"block_store_path" : "/tmp/block_store/", | ||
"torii_port" : 50051, | ||
"internal_port" : 10001, | ||
"pg_opt" : "host=iroha_postgres port=5432 user={} password={}", | ||
"redis_host" : "iroha_redis", | ||
"redis_port" : 6379, | ||
"max_proposal_size" : 10, | ||
"proposal_delay" : 5000, | ||
"vote_delay" : 5000, | ||
"load_delay" : 5000 | ||
}}""".format(options.postgres_user, options.postgres_password) | ||
|
||
f.write(s) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
key: 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
key: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,9 @@ | ||
[centos7] | ||
[hosts] | ||
104.155.94.58 | ||
35.205.142.238 | ||
|
||
[ubuntu16] | ||
35.195.78.162 | ||
35.195.60.152 | ||
35.195.251.237 | ||
35.195.52.118 | ||
35.195.159.165 | ||
|
||
[all:vars] | ||
ansible_ssh_user=iroha | ||
#Does not check host ssh keys. If we check keys and recreate VM with the same IP, it will cause troubles. | ||
host_key_checking=False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
key: {{ item.0 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
#!/usr/bin/env bash | ||
echo node$1 | ||
iroha-cli --genesis_block --peers_address /data/peers.list | ||
irohad --genesis_block genesis.block --config /data/config.sample --keypair_name node$1 | ||
echo key=$KEY | ||
echo $PWD | ||
iroha-cli --genesis_block --peers_address peers.list | ||
irohad --genesis_block genesis.block --config config.sample --keypair_name $KEY |
Binary file not shown.