mirror of
https://github.com/oceanprotocol/barge.git
synced 2024-11-22 09:47:04 +01:00
refactored to use different blockchain nodes underneath
This commit is contained in:
parent
f55a386074
commit
91499da37b
@ -1,17 +1,13 @@
|
||||
# Use this file to set the env vars required for Brizo.
|
||||
|
||||
KEEPER_URL=http://parity-node:8545
|
||||
LOCAL_CONTRACTS=true
|
||||
KEEPER_NETWORK_NAME=ocean_poa_net_local
|
||||
|
||||
SECRET_STORE_URL=http://secret-store:12001
|
||||
PARITY_URL=http://parity-node:8545
|
||||
# Set a valid parity address and password to have seamless interaction with the `keeper`
|
||||
PARITY_ADDRESS=0x00bd138abd70e2f00903268f3db08f2d25677c9e
|
||||
PARITY_PASSWORD=node0
|
||||
|
||||
AQUARIUS_URL=http://aquarius:5000
|
||||
BRIZO_URL=http://brizo:8030
|
||||
SECRET_STORE_URL=http://secret-store:12001
|
||||
RPC_URL=${KEEPER_URL}
|
||||
|
||||
AZURE_ACCOUNT_NAME=
|
||||
AZURE_ACCOUNT_KEY=
|
||||
|
@ -8,10 +8,10 @@ services:
|
||||
backend:
|
||||
ipv4_address: 172.15.0.17
|
||||
depends_on:
|
||||
- keeper-contracts
|
||||
- blockchain-node
|
||||
env_file:
|
||||
- ${BRIZO_ENV_FILE}
|
||||
environment:
|
||||
KEEPER_URL: http://${RPC_URL}:8545
|
||||
KEEPER_URL: http://${KEEPER_RPC_URL}:${KEEPER_RPC_PORT}
|
||||
volumes:
|
||||
- ${ARTIFACTS_FOLDER}:/usr/local/keeper-contracts/:ro
|
||||
|
@ -2,18 +2,16 @@ version: '2.1'
|
||||
services:
|
||||
keeper-contracts:
|
||||
image: oceanprotocol/keeper-contracts:${OCEAN_VERSION:-stable}
|
||||
ports:
|
||||
- "${KEEPER_PORT}:8545"
|
||||
networks:
|
||||
backend:
|
||||
ipv4_address: 172.15.0.14
|
||||
environment:
|
||||
LOCAL_CONTRACTS: "true"
|
||||
LOCAL_CONTRACTS: "false"
|
||||
DEPLOY_CONTRACTS: ${DEPLOY_CONTRACTS}
|
||||
DATABASE_PATH: "/ganache-db"
|
||||
REUSE_DATABASE: ${REUSE_DATABASE}
|
||||
REUSE_DATABASE: "false"
|
||||
NETWORK_NAME: ${KEEPER_NETWORK_NAME}
|
||||
POA_HOST: "parity-node"
|
||||
POA_HOST: ${KEEPER_RPC_URL}
|
||||
depends_on:
|
||||
- blockchain-node
|
||||
volumes:
|
||||
- ${ARTIFACTS_FOLDER}:/keeper-contracts/artifacts/
|
||||
- ${GANACHE_DATABASE_PATH}/ganache-db:/ganache-db
|
||||
- ${KEEPER_ARTIFACTS_FOLDER}:/keeper-contracts/artifacts/
|
||||
|
9
compose-files/nodes/ganache_node.yml
Normal file
9
compose-files/nodes/ganache_node.yml
Normal file
@ -0,0 +1,9 @@
|
||||
version: '2.1'
|
||||
services:
|
||||
blockchain-node:
|
||||
image: trufflesuite/ganache-cli:latest
|
||||
ports:
|
||||
- 8545:8545
|
||||
networks:
|
||||
backend:
|
||||
ipv4_address: 172.15.0.12
|
19
compose-files/nodes/kovan_node.yml
Normal file
19
compose-files/nodes/kovan_node.yml
Normal file
@ -0,0 +1,19 @@
|
||||
version: '2.1'
|
||||
services:
|
||||
blockchain-node:
|
||||
image: oceanprotocol/parity-ethereum:beta
|
||||
entrypoint: /opt/parity/parity
|
||||
command:
|
||||
--chain kovan
|
||||
--light
|
||||
--ws-interface all
|
||||
--jsonrpc-cors all
|
||||
--jsonrpc-interface all
|
||||
--jsonrpc-hosts all
|
||||
--jsonrpc-apis all
|
||||
--unsafe-expose
|
||||
ports:
|
||||
- 8545:8545
|
||||
networks:
|
||||
backend:
|
||||
ipv4_address: 172.15.0.12
|
@ -1,6 +1,6 @@
|
||||
version: '2.1'
|
||||
services:
|
||||
parity-node:
|
||||
blockchain-node:
|
||||
image: oceanprotocol/parity-ethereum:beta
|
||||
entrypoint: /opt/parity/parity
|
||||
command:
|
@ -4,7 +4,7 @@ services:
|
||||
image: oceanprotocol/pleuston:${OCEAN_VERSION:-stable}
|
||||
networks:
|
||||
backend:
|
||||
ipv4_address: 172.15.0.18
|
||||
ipv4_address: 172.15.0.19
|
||||
ports:
|
||||
- 3000:3000
|
||||
depends_on:
|
||||
@ -14,6 +14,6 @@ services:
|
||||
# Need browser to connect to exposed ports
|
||||
KEEPER_HOST: localhost
|
||||
AQUARIUS_HOST: localhost
|
||||
LOCAL_CONTRACTS: 'true'
|
||||
LOCAL_CONTRACTS: ${DEPLOY_CONTRACTS}
|
||||
volumes:
|
||||
- ${ARTIFACTS_FOLDER}:/pleuston/node_modules/@oceanprotocol/keeper-contracts/artifacts/:ro
|
||||
|
@ -7,12 +7,12 @@ services:
|
||||
command:
|
||||
--config /etc/parity/secretstore/config.toml --jsonrpc-cors all --jsonrpc-interface all --jsonrpc-hosts all --jsonrpc-apis all
|
||||
volumes:
|
||||
- ../parity/secret_store/config/:/etc/parity/secretstore/
|
||||
- secret-store:/parity_data/
|
||||
- ../parity/secret_store/keys/:/parity_data/keys/ocean-network/
|
||||
- ../parity/secret_store/config/:/etc/parity/secretstore/
|
||||
- secret-store:/parity_data/
|
||||
- ../parity/secret_store/keys/:/parity_data/keys/ocean-network/
|
||||
ports:
|
||||
- 12000:12000
|
||||
- 12001
|
||||
- 12000:12000
|
||||
- 12001
|
||||
networks:
|
||||
backend:
|
||||
ipv4_address: 172.15.0.13
|
||||
@ -29,3 +29,18 @@ services:
|
||||
backend:
|
||||
ipv4_address: 172.15.0.16
|
||||
command: nginx -g 'daemon off;'
|
||||
|
||||
secret-store-signing-node:
|
||||
image: oceanprotocol/parity-ethereum:master
|
||||
entrypoint: /opt/parity/parity
|
||||
command:
|
||||
--chain dev
|
||||
--light
|
||||
--jsonrpc-interface all
|
||||
--jsonrpc-apis secretstore
|
||||
--jsonrpc-cors all
|
||||
ports:
|
||||
- 9545:8545
|
||||
networks:
|
||||
backend:
|
||||
ipv4_address: 172.15.0.18
|
@ -14,8 +14,8 @@ services:
|
||||
volumes:
|
||||
- ./parity/config:/parity/config:ro
|
||||
- validator0:/root/.local/share/io.parity.ethereum/
|
||||
- ./parity/authorities/validator0.json:/root/.local/share/io.parity.ethereum/keys/${NETWORK_NAME}/validator.json:ro
|
||||
- ./parity/keys:/root/.local/share/io.parity.ethereum/keys/${NETWORK_NAME}
|
||||
- ./parity/authorities/validator0.json:/root/.local/share/io.parity.ethereum/keys/${KEEPER_NETWORK_NAME}/validator.json:ro
|
||||
- ./parity/keys:/root/.local/share/io.parity.ethereum/keys/${KEEPER_NETWORK_NAME}
|
||||
- ./parity/authorities/validator0.pwd:/parity/validator.pwd:ro
|
||||
- ./parity/node0.network.key:/root/.local/share/io.parity.ethereum/network/key:ro
|
||||
ports:
|
||||
@ -32,7 +32,7 @@ services:
|
||||
volumes:
|
||||
- ./parity/config:/parity/config:ro
|
||||
- validator1:/root/.local/share/io.parity.ethereum/
|
||||
- ./parity/authorities/validator1.json:/root/.local/share/io.parity.ethereum/keys/${NETWORK_NAME}/validator.json:ro
|
||||
- ./parity/authorities/validator1.json:/root/.local/share/io.parity.ethereum/keys/${KEEPER_NETWORK_NAME}/validator.json:ro
|
||||
- ./parity/authorities/validator1.pwd:/parity/validator.pwd:ro
|
||||
- ./parity/node1.network.key:/root/.local/share/io.parity.ethereum/network/key:ro
|
||||
networks:
|
||||
@ -47,7 +47,7 @@ services:
|
||||
volumes:
|
||||
- ./parity/config:/parity/config:ro
|
||||
- validator2:/root/.local/share/io.parity.ethereum/
|
||||
- ./parity/authorities/validator2.json:/root/.local/share/io.parity.ethereum/keys/${NETWORK_NAME}/validator.json:ro
|
||||
- ./parity/authorities/validator2.json:/root/.local/share/io.parity.ethereum/keys/${KEEPER_NETWORK_NAME}/validator.json:ro
|
||||
- ./parity/authorities/validator2.pwd:/parity/validator.pwd:ro
|
||||
- ./parity/node2.network.key:/root/.local/share/io.parity.ethereum/network/key:ro
|
||||
networks:
|
||||
@ -64,7 +64,7 @@ services:
|
||||
--unsafe-expose
|
||||
volumes:
|
||||
- ./parity/config:/parity/config:ro
|
||||
- ./parity/keys:/root/.local/share/io.parity.ethereum/keys/${NETWORK_NAME}
|
||||
- ./parity/keys:/root/.local/share/io.parity.ethereum/keys/${KEEPER_NETWORK_NAME}
|
||||
ports:
|
||||
- 8180:8180
|
||||
- 8546:8546
|
||||
|
@ -2,19 +2,25 @@
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
|
||||
COMPOSE_DIR="${DIR}/compose-files"
|
||||
# Must be set to true for the first run, change it to "false" to avoid migrating the smart contracts on each run.
|
||||
export DEPLOY_CONTRACTS="true"
|
||||
|
||||
export PROJECT_NAME="ocean"
|
||||
|
||||
# keeper options
|
||||
export KEEPER_DEPLOY_CONTRACTS="false"
|
||||
export KEEPER_ARTIFACTS_FOLDER=$HOME/.ocean/keeper-contracts/artifacts
|
||||
# Specify which ethereum client to run or connect to: development, kovan, or ocean_poa_net_local
|
||||
export KEEPER_NETWORK_NAME="development"
|
||||
|
||||
# Ganache specific option, these two options have no effect when not running ganache-cli
|
||||
export GANACHE_DATABASE_PATH="${DIR}"
|
||||
export REUSE_DATABASE="false"
|
||||
# Specify which ethereum client to run or connect to: kovan, ganache, or ocean_poa_net_local
|
||||
export KEEPER_NETWORK_NAME="ganache"
|
||||
export ARTIFACTS_FOLDER=$HOME/.ocean/keeper-contracts/artifacts
|
||||
export GANACHE_REUSE_DATABASE="false"
|
||||
|
||||
export BRIZO_ENV_FILE=$DIR/brizo.env
|
||||
export PROJECT_NAME="ocean"
|
||||
|
||||
# Specify the ethereum default RPC container provider
|
||||
export RPC_URL='keeper-contracts'
|
||||
export KEEPER_PORT='8545'
|
||||
export KEEPER_RPC_URL='blockchain-node'
|
||||
export KEEPER_RPC_PORT='8545'
|
||||
export KEEPER_URL="http://"${KEEPER_RPC_URL}:${KEEPER_RPC_PORT}
|
||||
|
||||
|
||||
# colors
|
||||
@ -42,33 +48,68 @@ export OCEAN_VERSION=latest
|
||||
COMPOSE_FILES=""
|
||||
COMPOSE_FILES+=" -f ${COMPOSE_DIR}/network_volumes.yml"
|
||||
COMPOSE_FILES+=" -f ${COMPOSE_DIR}/mongo.yml"
|
||||
COMPOSE_FILES+=" -f ${COMPOSE_DIR}/keeper_contracts.yml"
|
||||
COMPOSE_FILES+=" -f ${COMPOSE_DIR}/pleuston.yml"
|
||||
COMPOSE_FILES+=" -f ${COMPOSE_DIR}/aquarius.yml"
|
||||
COMPOSE_FILES+=" -f ${COMPOSE_DIR}/brizo.yml"
|
||||
COMPOSE_FILES+=" -f ${COMPOSE_DIR}/secret_store.yml"
|
||||
|
||||
while :; do
|
||||
case $1 in
|
||||
#################################################
|
||||
# Version switches
|
||||
#################################################
|
||||
--latest)
|
||||
export OCEAN_VERSION=latest
|
||||
printf $COLOR_Y'Switched to latest components...\n\n'$COLOR_RESET
|
||||
;;
|
||||
--reuse-database)
|
||||
export REUSE_DATABASE="true"
|
||||
printf $COLOR_Y'Starting and reusing the database ...\n\n'$COLOR_RESET
|
||||
;;
|
||||
#################################################
|
||||
# Exclude switches
|
||||
#################################################
|
||||
--no-pleuston)
|
||||
COMPOSE_FILES=${COMPOSE_FILES/ -f ${COMPOSE_DIR}\/pleuston.yml/}
|
||||
printf $COLOR_Y'Starting without Pleuston...\n\n'$COLOR_RESET
|
||||
;;
|
||||
--local-parity-node)
|
||||
COMPOSE_FILES+=" -f ${COMPOSE_DIR}/parity_client.yml"
|
||||
COMPOSE_FILES+=" -f ${COMPOSE_DIR}/secret_store.yml"
|
||||
export RPC_URL='parity-node'
|
||||
export KEEPER_NETWORK_NAME="ocean_poa_net_local"
|
||||
export KEEPER_PORT='8546'
|
||||
printf $COLOR_Y'Starting with local Parity node...\n\n'$COLOR_RESET
|
||||
#################################################
|
||||
# Contract/Storage switches
|
||||
#################################################
|
||||
--reuse-ganache-database)
|
||||
export GANACHE_REUSE_DATABASE="true"
|
||||
printf $COLOR_Y'Starting and reusing the database ...\n\n'$COLOR_RESET
|
||||
;;
|
||||
#################################################
|
||||
# Node type switches
|
||||
#################################################
|
||||
# connect you to kovan
|
||||
--local-kovan-node)
|
||||
COMPOSE_FILES+=" -f ${COMPOSE_DIR}/nodes/kovan_node.yml"
|
||||
export KEEPER_NETWORK_NAME="kovan"
|
||||
printf $COLOR_Y'Starting with local Kovan node...\n\n'$COLOR_RESET
|
||||
;;
|
||||
# connects to ocean testnet
|
||||
--local-lake-node)
|
||||
COMPOSE_FILES+=" -f ${COMPOSE_DIR}/nodes/lake_node.yml"
|
||||
export KEEPER_NETWORK_NAME="ocean_poa_aws"
|
||||
printf $COLOR_Y'Starting with local Pond node...\n\n'$COLOR_RESET
|
||||
;;
|
||||
# spins up a new ganache blockchain
|
||||
--local-ganache-node)
|
||||
COMPOSE_FILES+=" -f ${COMPOSE_DIR}/keeper_contracts.yml"
|
||||
COMPOSE_FILES+=" -f ${COMPOSE_DIR}/nodes/ganache_node.yml"
|
||||
export KEEPER_NETWORK_NAME="development"
|
||||
export KEEPER_DEPLOY_CONTRACTS="true"
|
||||
printf $COLOR_Y'Starting with local Ganache node...\n\n'$COLOR_RESET
|
||||
;;
|
||||
# spins up pond local testnet
|
||||
--local-pond-node)
|
||||
COMPOSE_FILES+=" -f ${COMPOSE_DIR}/keeper_contracts.yml"
|
||||
COMPOSE_FILES+=" -f ${COMPOSE_DIR}/nodes/pond_node.yml"
|
||||
export KEEPER_NETWORK_NAME="ocean_poa_net_local"
|
||||
export KEEPER_DEPLOY_CONTRACTS="true"
|
||||
printf $COLOR_Y'Starting with local Pond node...\n\n'$COLOR_RESET
|
||||
;;
|
||||
#################################################
|
||||
# Cleaning switches
|
||||
#################################################
|
||||
--purge)
|
||||
docker network rm $PROJECT_NAME_backend || true
|
||||
docker network rm $PROJECT_NAME_default || true
|
||||
|
Loading…
Reference in New Issue
Block a user