From eae903ed3a4a3dcb99eb332bf91217fd0fa477d7 Mon Sep 17 00:00:00 2001 From: Jakub Nowakowski Date: Tue, 16 Jun 2020 15:33:18 +0200 Subject: [PATCH 1/3] Added scripts for Keep Dashboard installation The scripts can be used for Keep Dashboard installation and run. --- README.adoc | 7 ++++++ install-keep-dashboard.sh | 48 +++++++++++++++++++++++++++++++++++++++ install.sh | 5 +++- 3 files changed, 59 insertions(+), 1 deletion(-) create mode 100755 install-keep-dashboard.sh diff --git a/README.adoc b/README.adoc index 60b6d57..bcd7b90 100644 --- a/README.adoc +++ b/README.adoc @@ -132,6 +132,13 @@ end-to-end tests. Before you start interacting, make sure you: - Have a working relay maintainer (`run-testnet-relay.sh`) - Have 1 `keep-core` and 3 `keep-ecdsa` clients up and running +== Keep Dashboard dApp + +To run the Keep Dashboard dApp invoke: +``` +./run-keep-dashboard.sh +``` + == tBTC dApp To run the tBtc dApp invoke: diff --git a/install-keep-dashboard.sh b/install-keep-dashboard.sh new file mode 100755 index 0000000..210e1f1 --- /dev/null +++ b/install-keep-dashboard.sh @@ -0,0 +1,48 @@ +#!/bin/bash + +set -e + +LOG_START='\n\e[1;36m' # new line + bold + color +LOG_END='\n\e[0m' # new line + reset color +DONE_START='\n\e[1;32m' # new line + bold + green +DONE_END='\n\n\e[0m' # new line + reset + +WORKDIR=$PWD + +printf "${LOG_START}Starting Keep Dashboard deployment...${LOG_END}" + +printf "${LOG_START}Preparing keep-core artifacts...${LOG_END}" + +cd $WORKDIR/keep-core/solidity +ln -sf build/contracts artifacts + +printf "${LOG_START}Preparing keep-ecdsa artifacts...${LOG_END}" + +cd $WORKDIR/keep-ecdsa/solidity +ln -sf build/contracts artifacts + +printf "${LOG_START}Install Keep Dashboard dependencies...${LOG_END}" + +cd $WORKDIR/keep-core/solidity/dashboard + +npm install + +printf "${LOG_START}Updating Keep Dashboard dependnecies...${LOG_END}" + +cd $WORKDIR/keep-core/solidity +npm link + +cd $WORKDIR/keep-ecdsa/solidity +npm link + +cd $WORKDIR/tbtc/solidity +npm link + +printf "${LOG_START}Updating Keep Dashboard configuration...${LOG_END}" + +cd $WORKDIR/keep-core/solidity/dashboard +npm link @keep-network/keep-core +npm link @keep-network/keep-ecdsa +npm link @keep-network/tbtc + +printf "${DONE_START}Keep Dashboard initialized successfully!${DONE_END}" diff --git a/install.sh b/install.sh index c114320..7dd458d 100755 --- a/install.sh +++ b/install.sh @@ -14,8 +14,11 @@ set -e # Install tBTC. ./install-tbtc.sh +# Install Keep Dashboard. +./install-keep-dashboard.sh + # Install tBTC dApp. ./install-tbtc-dapp.sh # Install relay-maintainer. -./install-testnet-relay.sh \ No newline at end of file +./install-testnet-relay.sh From eb5eb52026df995d4a975ccedd7f8a7cb4e65e84 Mon Sep 17 00:00:00 2001 From: Jakub Nowakowski Date: Fri, 19 Jun 2020 11:34:24 +0200 Subject: [PATCH 2/3] Added script to run keep dashboard --- run-keep-dashboard.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 run-keep-dashboard.sh diff --git a/run-keep-dashboard.sh b/run-keep-dashboard.sh new file mode 100755 index 0000000..c56bab8 --- /dev/null +++ b/run-keep-dashboard.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +set -e + +LOG_START='\n\e[1;36m' # new line + bold + color +LOG_END='\n\e[0m' # new line + reset color +DONE_START='\n\e[1;32m' # new line + bold + green +DONE_END='\n\n\e[0m' # new line + reset + +WORKDIR=$PWD + +printf "${LOG_START}Starting Keep Dashboard...${LOG_END}" + +cd $WORKDIR/keep-core/solidity/dashboard + +npm run start From 539958318f7cb8e1c1b936523ff3e668bbe3a353 Mon Sep 17 00:00:00 2001 From: Jakub Nowakowski Date: Mon, 22 Jun 2020 09:51:02 +0200 Subject: [PATCH 3/3] Added symlink for tbtc artifacts In the dashboard we also use tBTC contract. Here we added required symlink to artifacts we use. --- install-keep-dashboard.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/install-keep-dashboard.sh b/install-keep-dashboard.sh index 210e1f1..4443088 100755 --- a/install-keep-dashboard.sh +++ b/install-keep-dashboard.sh @@ -21,6 +21,11 @@ printf "${LOG_START}Preparing keep-ecdsa artifacts...${LOG_END}" cd $WORKDIR/keep-ecdsa/solidity ln -sf build/contracts artifacts +printf "${LOG_START}Preparing tBTC artifacts...${LOG_END}" + +cd $WORKDIR/tbtc/solidity +ln -sf build/contracts artifacts + printf "${LOG_START}Install Keep Dashboard dependencies...${LOG_END}" cd $WORKDIR/keep-core/solidity/dashboard