start.sh 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. #!/usr/bin/env bash
  2. set -e
  3. # Run a complete joystream development network on your machine using docker
  4. INIT_CHAIN_SCENARIO=${INIT_CHAIN_SCENARIO:=setupNewChain}
  5. if [ "${PERSIST}" == true ]
  6. then
  7. echo "Services startup up.."
  8. else
  9. # Clean start!
  10. docker-compose down -v
  11. function down()
  12. {
  13. # Stop containers and clear volumes
  14. docker-compose down -v
  15. }
  16. trap down EXIT
  17. fi
  18. ## Run a local development chain
  19. docker-compose up -d joystream-node
  20. ## Init the chain with some state
  21. export SKIP_MOCK_CONTENT=true
  22. export SKIP_QUERY_NODE_CHECKS=true
  23. # TODO: Move back to this approach once Giza<->Olympia integration tests merged
  24. # HOST_IP=$(tests/network-tests/get-host-ip.sh)
  25. # export COLOSSUS_1_URL="http://${HOST_IP}:3333"
  26. # export COLOSSUS_1_TRANSACTOR_KEY=$(docker run --rm --pull=always docker.io/parity/subkey:2.0.1 inspect ${COLOSSUS_1_TRANSACTOR_URI} --output-type json | jq .ss58Address -r)
  27. # export DISTRIBUTOR_1_URL="http://${HOST_IP}:3334"
  28. ./tests/integration-tests/run-test-scenario.sh ${INIT_CHAIN_SCENARIO}
  29. ## Member faucet
  30. docker-compose up -d faucet
  31. ## Storage Infrastructure Configuration
  32. # TODO: Move back to INIT_CHAIN_SCENARIO approach once Giza<->Olympia integration tests merged
  33. ./storage-playground-config.sh
  34. ## Query Node Infrastructure
  35. ./query-node/start.sh
  36. ## Storage Infrastructure Nodes
  37. docker-compose up -d colossus-1
  38. docker-compose up -d distributor-1
  39. ## Orion
  40. docker-compose up -d orion
  41. if [ "${PERSIST}" == true ]
  42. then
  43. echo "All services started in the background"
  44. else
  45. echo "use Ctrl+C to shutdown the development network."
  46. while true; do
  47. read
  48. done
  49. fi