Quellcode durchsuchen

replace storage-node dev-start.sh script with a script to start complete network

Mokhtar Naamani vor 4 Jahren
Ursprung
Commit
0f3a601fb2
4 geänderte Dateien mit 58 neuen und 52 gelöschten Zeilen
  1. 7 8
      setup.sh
  2. 51 0
      start.sh
  3. 0 39
      storage-node/start-dev.sh
  4. 0 5
      storage-node/stop-dev.sh

+ 7 - 8
setup.sh

@@ -19,13 +19,12 @@ rustup component add rustfmt clippy
 rustup install nightly-2020-05-23 --force
 rustup target add wasm32-unknown-unknown --toolchain nightly-2020-05-23
 
-# Ensure the stable toolchain is still the default
-rustup default stable
+# Sticking with older version of compiler to ensure working build
+rustup install 1.46.0
+rustup default 1.46.0
 
-# TODO: Install additional tools...
+# Install additional tools...
 
-# - b2sum
-# - nodejs
-# - npm
-# - yarn
-# .... ?
+# - docker engine, docker, docker-compose,
+# - nodejs, npm, yarn (classic), npx
+# - b2sum,

+ 51 - 0
start.sh

@@ -0,0 +1,51 @@
+#!/usr/bin/env bash
+set -e
+
+# Avoid pulling joystream images from docker hub. It is most likely
+# not the version that we want to work with. 
+# either build with `docker-compose build` or `docker pull` the image versions equired
+if ! docker inspect joystream/node:latest > /dev/null 2>&1;
+then
+  echo "Didn't find a joystream/node:latest docker image."
+  exit 1
+fi
+
+if ! docker inspect joystream/apps:latest > /dev/null 2>&1;
+then
+  echo "Didn't find a joystream/apps:latest docker image."
+  exit 1
+fi
+
+# clean start!
+docker-compose down -v
+
+function down()
+{
+    # Stop containers and clear volumes
+    docker-compose down -v
+}
+
+trap down EXIT
+
+# Run a development joystream-node chain
+docker-compose up -d joystream-node
+
+# configure a dev storage node and start storage node
+DEBUG=joystream:storage-cli:dev yarn storage-cli dev-init
+docker-compose up -d colossus
+
+# Initialise the content directory with standard classes, schemas and initial entities
+yarn workspace cd-schemas initialize:dev
+
+# Initialize a new database for the query node infrastructure
+docker-compose up -d db
+yarn workspace query-node-root db:migrate
+
+# Startup all query-node infrastructure services
+docker-compose up -d processor
+
+echo "press Ctrl+C to shutdown"
+
+# Start a dev instance of pioneer and wait for exit
+docker-compose up pioneer
+

+ 0 - 39
storage-node/start-dev.sh

@@ -1,39 +0,0 @@
-#!/usr/bin/env bash
-set -e
-
-# Avoid pulling joystream/node from docker hub. It is most likely
-# not the version that we want to work with. Either you should
-# build it locally or pull it down manually.
-if ! docker inspect joystream/node:latest > /dev/null 2>&1;
-then
-  echo "Didn't find local joystream/node:latest docker image."
-  exit 1
-fi
-
-SCRIPT_PATH="$(dirname "${BASH_SOURCE[0]}")"
-cd $SCRIPT_PATH
-
-# stop prior run and clear volumes
-# docker-compose down -v
-
-function down()
-{
-    # Stop containers and clear volumes
-    docker-compose down -v
-}
-
-# Run a development joystream-node chain and ipfs daemon in the background
-docker-compose up -d ipfs
-docker-compose up -d joystream-node
-
-trap down EXIT
-
-# configure the dev chain
-DEBUG=joystream:storage-cli:dev yarn storage-cli dev-init
-
-# Run the tests
-# Tests sometimes fail, so skip for now
-# yarn workspace storage-node test
-
-# Start Colossus storage-node
-DEBUG=joystream:* yarn colossus --dev

+ 0 - 5
storage-node/stop-dev.sh

@@ -1,5 +0,0 @@
-#!/usr/bin/env bash
-set -e
-
-# stop prior run and clear volumes
-docker-compose down -v