git.delta.rocks / unique-network / refs/commits / 4fc7c3c8399c

difftreelog

Merge branch 'master' of https://github.com/usetech-llc/nft_parachain

str-mv2020-07-22parents: #5e168aa #bf3198e.patch.diff
in: master

5 files changed

modifiedDockerfile-testnetdiffbeforeafterboth
--- a/Dockerfile-testnet
+++ b/Dockerfile-testnet
@@ -15,7 +15,6 @@
 #RUN git clone https://github.com/usetech-llc/nft_parachain /nft_parachain
 RUN mkdir nft_parachain
 WORKDIR /nft_parachain
-COPY . .
 
 RUN curl https://sh.rustup.rs -sSf | sh -s -- -y && \
 	export PATH="$PATH:$HOME/.cargo/bin" && \
@@ -26,6 +25,8 @@
     rustup target list --installed && \
     rustup show
 
+COPY . .
+
 RUN export PATH="$PATH:$HOME/.cargo/bin" && \
     cargo build "--$PROFILE" 
 	# && \
modifieddeploy-testnet.shdiffbeforeafterboth
--- a/deploy-testnet.sh
+++ b/deploy-testnet.sh
@@ -13,6 +13,8 @@
 ### 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"
@@ -27,9 +29,15 @@
 # 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-compose -f docker-compose-testnet.yml down
-docker-compose -f docker-compose-testnet.yml up -d
+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
 
@@ -39,3 +47,5 @@
 # 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
modifieddocker-compose-testnet.ymldiffbeforeafterboth
--- a/docker-compose-testnet.yml
+++ b/docker-compose-testnet.yml
@@ -4,7 +4,6 @@
   node_einstein:
     image: nft-parachain
     ports:
-      - 9944:9944
       - 9935:9935
     build:
       context: ./
@@ -17,14 +16,14 @@
     environment:
       - NODE=einstein
       - P2PPORT=30335
-      - WSPORT=9944
+      - WSPORT=9945
       - RPCPORT=9935
       - BOOTNODE=True
+      - VALIDATOR=True
 
   node_newton:
     image: nft-parachain
     ports:
-      - 9946:9946
       - 9936:9936
     build:
       context: ./
@@ -41,8 +40,31 @@
       - RPCPORT=9936
       - BOOTNODE=False
       - BOOTPORT=30335
-      - BOOTID=12D3KooWRYNrSRQvJ73esUhpyETQNJWGfC2LQ9dW3HJtzHJM28Hc
+      - BOOTID=12D3KooWRLrjXxByPkSCzcsRyf6652brnJT9s4AQHR3uujJ35mxz
+      - VALIDATOR=True
 
+  node_bohr:
+    image: nft-parachain
+    ports:
+      - 9944:9944
+    build:
+      context: ./
+      dockerfile: Dockerfile-testnet
+    volumes:
+      - ./chain-data-bohr:/chain-data
+    networks: 
+      - substrate_network
+    restart: always
+    environment:
+      - NODE=bohr
+      - P2PPORT=30334
+      - WSPORT=9944
+      - RPCPORT=9934
+      - BOOTNODE=False
+      - BOOTPORT=30335
+      - BOOTID=12D3KooWRLrjXxByPkSCzcsRyf6652brnJT9s4AQHR3uujJ35mxz
+      - VALIDATOR=False
+      
 networks: 
   substrate_network:
     driver: bridge
modifiedrun-testnet.shdiffbeforeafterboth
8echo RPC Port : $RPCPORT8echo RPC Port : $RPCPORT
99
10echo Boot = $BOOTNODE10echo Boot = $BOOTNODE
11echo Validator = $VALIDATOR
1112
12if [ "$BOOTNODE" = True ]; 13if [ "$BOOTNODE" = True ];
13then14then
14echo This is a Bootnode;15echo This is a Bootnode;
15BOOTNODES="";16BOOTNODES="";
17NODEKEY="--node-key-file einstein_key_file";
16else18else
17echo Bootnode Port : $BOOTPORT19echo Bootnode Port : $BOOTPORT;
18echo Bootnode PeerID : $BOOTID20echo Bootnode PeerID : $BOOTID;
19BOOTNODES="--bootnodes /dns4/node_einstein/tcp/$BOOTPORT/p2p/$BOOTID";21BOOTNODES="--bootnodes /dns4/node_einstein/tcp/$BOOTPORT/p2p/$BOOTID";
22NODEKEY="";
20fi23fi
2124
25if [ "$VALIDATOR" = True ];
26then
27echo This is a Validator node;
22/usr/local/bin/nft \28/usr/local/bin/nft \
23 --base-path /chain-data \29 --base-path /chain-data \
24 --chain ./nftTestnetSpecRaw.json \30 --chain ./nftTestnetSpecRaw.json \
32 --rpc-external \38 --rpc-external \
33 -lruntime \39 -lruntime \
34 $BOOTNODES40 $BOOTNODES \
41 $NODEKEY;
42else
43echo This is a Gateway node;
44/usr/local/bin/nft \
45 --base-path /chain-data \
46 --chain ./nftTestnetSpecRaw.json \
47 --port $P2PPORT \
48 --ws-port $WSPORT \
49 --rpc-port $RPCPORT \
50 --name $NODE \
51 --ws-external \
52 --rpc-cors all \
53 -lruntime \
54 $BOOTNODES;
55fi
3556
36
addedupload_secrets.shdiffbeforeafterboth
--- /dev/null
+++ b/upload_secrets.sh
@@ -0,0 +1,7 @@
+scp -P 8022 ./einstein_key_file developer@212.248.19.53:~/nft_parachain/einstein_key_file
+
+scp -P 8022 ./einstein_store_key.json developer@212.248.19.53:~/nft_parachain/einstein_store_key.json
+scp -P 8022 ./newton_store_key.json developer@212.248.19.53:~/nft_parachain/newton_store_key.json
+
+scp -P 8022 ./einstein_store_key_grandpa.json developer@212.248.19.53:~/nft_parachain/einstein_store_key_grandpa.json
+scp -P 8022 ./newton_store_key_grandpa.json developer@212.248.19.53:~/nft_parachain/newton_store_key_grandpa.json