-
Notifications
You must be signed in to change notification settings - Fork 115
/
start-multistorage.sh
executable file
·64 lines (53 loc) · 1.73 KB
/
start-multistorage.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
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/usr/bin/env bash
set -e
# Run a complete joystream development network on your machine using docker
export JOYSTREAM_NODE_TAG=${JOYSTREAM_NODE_TAG:=$(./scripts/runtime-code-shasum.sh)}
INIT_CHAIN_SCENARIO=${INIT_CHAIN_SCENARIO:=setupNewChainMultiStorage}
if [ "${PERSIST}" == true ]
then
echo "Services starting up.."
else
function down()
{
# Stop containers and clear volumes
docker-compose down -v
}
trap down EXIT
fi
if [ "${SKIP_NODE}" != true ]
then
## Run a local development chain
docker-compose up -d joystream-node
fi
## Query Node Infrastructure
./query-node/start.sh
## Orion
docker-compose up -d orion
## Init the chain with some state
if [[ $SKIP_CHAIN_SETUP != 'true' ]]; then
export SKIP_QUERY_NODE_CHECKS=true
HOST_IP=$(tests/network-tests/get-host-ip.sh)
export COLOSSUS_1_URL=${COLOSSUS_1_URL:="http://${HOST_IP}:3333"}
export DISTRIBUTOR_1_URL=${DISTRIBUTOR_1_URL:="http://${HOST_IP}:3334"}
export COLOSSUS_2_URL=${COLOSSUS_2_URL:="http://${HOST_IP}:3335"}
export DISTRIBUTOR_2_URL=${DISTRIBUTOR_2_URL:="http://${HOST_IP}:3336"}
./tests/network-tests/run-test-scenario.sh ${INIT_CHAIN_SCENARIO}
## Member faucet
export INVITER_KEY=$(cat ./tests/network-tests/output.json | jq -r .faucet.suri)
docker-compose up -d faucet
## Storage Infrastructure Nodes
docker-compose up -d colossus-1
docker-compose up -d distributor-1
docker-compose up -d colossus-2
docker-compose up -d distributor-2
fi
if [ "${PERSIST}" == true ]
then
echo "All services started in the background"
echo "Remember to run 'docker-compose down -v' to kill all docker services before starting new playground."
else
echo "use Ctrl+C to shutdown the development network."
while true; do
read
done
fi