-
Notifications
You must be signed in to change notification settings - Fork 12
/
deploy-testnet.sh
executable file
·51 lines (40 loc) · 1.49 KB
/
deploy-testnet.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#######################################################
#
# Deployng process:
#
# 1. Git pull the nft_parachain on the server
# 2. SCP secret files in the root folder of nft_parachain
# - einstein_store_key.json
# - newton_store_key.json
# - einstein_key_file
# 3. Run this script
#
### Build and run Einstein node (bootnode) and Newton node
docker-compose -f docker-compose-testnet.yml up -d --build
sleep 30
### Deploy aura store keys
# Einstein
curl http://localhost:9935 -H "Content-Type:application/json;charset=utf-8" -d "@./einstein_store_key.json"
# Newton
curl http://localhost:9936 -H "Content-Type:application/json;charset=utf-8" -d "@./newton_store_key.json"
### Deploy standpa store keys
# Einstein
curl http://localhost:9935 -H "Content-Type:application/json;charset=utf-8" -d "@./einstein_store_key_grandpa.json"
# Newton
curl http://localhost:9936 -H "Content-Type:application/json;charset=utf-8" -d "@./newton_store_key_grandpa.json"
sleep 30
### Stop and restart nodes so that they start finalizing
docker stop nft_parachain_node_einstein_1
docker stop nft_parachain_node_newton_1
docker stop nft_parachain_node_bohr_1
docker start nft_parachain_node_einstein_1
docker start nft_parachain_node_newton_1
docker start nft_parachain_node_bohr_1
### Cleanup
# Delete key file used to set bootnode peer ID
rm einstein_key_file
# Delete store key files
rm ./einstein_store_key.json
rm ./newton_store_key.json
rm ./einstein_store_key_grandpa.json
rm ./newton_store_key_grandpa.json