From 4815fd8772b80b2cf4f481335a03e9b349dc5c1b Mon Sep 17 00:00:00 2001 From: alexcos20 Date: Mon, 22 May 2023 10:06:10 +0300 Subject: [PATCH] add pdr* components --- cleanup.sh | 6 ++++++ compose-files/pdr-predictoor.yml | 20 ++++++++++++++++++++ compose-files/pdr-trader.yml | 20 ++++++++++++++++++++ compose-files/pdr-trueval.yml | 20 ++++++++++++++++++++ compose-files/thegraph.yml | 1 + start_ocean.sh | 23 +++++++++++++++++++++++ 6 files changed, 90 insertions(+) create mode 100644 compose-files/pdr-predictoor.yml create mode 100644 compose-files/pdr-trader.yml create mode 100644 compose-files/pdr-trueval.yml diff --git a/cleanup.sh b/cleanup.sh index be8b1f8..4f87596 100755 --- a/cleanup.sh +++ b/cleanup.sh @@ -15,6 +15,9 @@ docker container stop ocean_kindcluster_1 docker container stop ocean_redis_1 docker container stop ocean_dashboard_1 docker container stop docker-registry +docker container stop ocean_pdr-trader_1 +docker container stop ocean_pdr-predictoor_1 +docker container stop ocean_pdr-trueval_1 docker container rm ocean_aquarius_1 docker container rm ocean_graph-node_1 docker container rm ocean_subgraph_1 @@ -31,6 +34,9 @@ docker container rm ocean_kindcluster_1 docker container rm ocean_redis_1 docker container rm ocean_dashboard_1 docker container rm docker-registry +docker container rm ocean_pdr-trader_1 +docker container rm ocean_pdr-predictoor_1 +docker container rm ocean_pdr-trueval_1 docker volume rm ocean_graphipfs docker volume rm ocean_graphpgsql docker volume rm ocean_provider1db diff --git a/compose-files/pdr-predictoor.yml b/compose-files/pdr-predictoor.yml new file mode 100644 index 0000000..5241948 --- /dev/null +++ b/compose-files/pdr-predictoor.yml @@ -0,0 +1,20 @@ +version: '3' +services: + pdr-predictoor: + image: oceanprotocol/pdr-predictoor:${PDR_PREDICTOOR_VERSION:-latest} + networks: + backend: + ipv4_address: 172.15.0.41 + depends_on: + - ocean-contracts + environment: + RPC_URL: ${NETWORK_RPC_URL} + SUBGRAPH_URL: http://172.15.0.15:8000/subgraphs/name/oceanprotocol/ocean-subgraph + PRIVATE_KEY: "0xef4b441145c1d0f3b4bc6d61d29f5c6e502359481152f869247c7a4244d45209" + ADDRESS_FILE: /ocean-contracts/artifacts/address.json + WAIT_FOR_SUBGRAPH: "true" + depends_on: + - ganache + volumes: + - ${OCEAN_ARTIFACTS_FOLDER}:/ocean-contracts/artifacts/ + - ${OCEAN_SUBGRAPH_FOLDER}:/ocean-subgraph/ \ No newline at end of file diff --git a/compose-files/pdr-trader.yml b/compose-files/pdr-trader.yml new file mode 100644 index 0000000..81f5475 --- /dev/null +++ b/compose-files/pdr-trader.yml @@ -0,0 +1,20 @@ +version: '3' +services: + pdr-trader: + image: oceanprotocol/pdr-trader:${PDR_TRADER_VERSION:-latest} + networks: + backend: + ipv4_address: 172.15.0.42 + depends_on: + - ocean-contracts + environment: + RPC_URL: ${NETWORK_RPC_URL} + SUBGRAPH_URL: http://172.15.0.15:8000/subgraphs/name/oceanprotocol/ocean-subgraph + PRIVATE_KEY: "0x8467415bb2ba7c91084d932276214b11a3dd9bdb2930fefa194b666dd8020b99" + ADDRESS_FILE: /ocean-contracts/artifacts/address.json + WAIT_FOR_SUBGRAPH: "true" + depends_on: + - ganache + volumes: + - ${OCEAN_ARTIFACTS_FOLDER}:/ocean-contracts/artifacts/ + - ${OCEAN_SUBGRAPH_FOLDER}:/ocean-subgraph/ \ No newline at end of file diff --git a/compose-files/pdr-trueval.yml b/compose-files/pdr-trueval.yml new file mode 100644 index 0000000..48028b7 --- /dev/null +++ b/compose-files/pdr-trueval.yml @@ -0,0 +1,20 @@ +version: '3' +services: + pdr-trueval: + image: oceanprotocol/pdr-trueval:${PDR_TRUEVAL_VERSION:-latest} + networks: + backend: + ipv4_address: 172.15.0.40 + depends_on: + - ocean-contracts + environment: + RPC_URL: ${NETWORK_RPC_URL} + SUBGRAPH_URL: http://172.15.0.15:8000/subgraphs/name/oceanprotocol/ocean-subgraph + PRIVATE_KEY: "0xc594c6e5def4bab63ac29eed19a134c130388f74f019bc74b8f4389df2837a58" + ADDRESS_FILE: /ocean-contracts/artifacts/address.json + WAIT_FOR_SUBGRAPH: "true" + depends_on: + - ganache + volumes: + - ${OCEAN_ARTIFACTS_FOLDER}:/ocean-contracts/artifacts/ + - ${OCEAN_SUBGRAPH_FOLDER}:/ocean-subgraph/ \ No newline at end of file diff --git a/compose-files/thegraph.yml b/compose-files/thegraph.yml index 5338906..9ed46ee 100644 --- a/compose-files/thegraph.yml +++ b/compose-files/thegraph.yml @@ -49,6 +49,7 @@ services: - ocean-contracts volumes: - ${OCEAN_ARTIFACTS_FOLDER}:/ocean-contracts/artifacts/ + - ${OCEAN_SUBGRAPH_FOLDER}:/ocean-subgraph/ volumes: graphpgsql: diff --git a/start_ocean.sh b/start_ocean.sh index 1d2a5fe..5902978 100755 --- a/start_ocean.sh +++ b/start_ocean.sh @@ -41,6 +41,13 @@ export POD_CONFIGURATION_VERSION=${POD_CONFIGURATION_VERSION:-oceanprotocol/pod- export POD_PUBLISHING_VERSION=${POD_PUBLISHING_VERSION:-oceanprotocol/pod-publishing:v4main} export WAIT_FOR_C2DIMAGES=${WAIT_FOR_C2DIMAGES:-false} + + +export PDR_TRUEVAL_VERSION=${PDR_TRUEVAL_VERSION:-latest} +export PDR_PREDICTOOR_VERSION=${PDR_PREDICTOOR_VERSION:-latest} +export PDR_TRADER_VERSION=${PDR_TRADER_VERSION:-latest} + + export PROJECT_NAME="ocean" export FORCEPULL="false" @@ -80,6 +87,10 @@ export OCEAN_ARTIFACTS_FOLDER="${OCEAN_HOME}/ocean-contracts/artifacts" mkdir -p ${OCEAN_ARTIFACTS_FOLDER} export OCEAN_C2D_FOLDER="${OCEAN_HOME}/ocean-c2d/" mkdir -p ${OCEAN_C2D_FOLDER} +export OCEAN_SUBGRAPH_FOLDER="${OCEAN_HOME}/ocean-subgraph/" +rm -f "${OCEAN_SUBGRAPH_FOLDER}/ready" +mkdir -p ${OCEAN_SUBGRAPH_FOLDER} + export ADDRESS_FILE="${OCEAN_ARTIFACTS_FOLDER}/address.json" echo "export ADDRESS_FILE=${ADDRESS_FILE}" @@ -285,6 +296,18 @@ while :; do export GANACHE_INSTAMINE=strict export GANACHE_BLOCKTIME=1 ;; + --with-pdr-trueval) + COMPOSE_FILES+=" -f ${COMPOSE_DIR}/pdr-trueval.yml" + printf $COLOR_Y'Starting with pdr-trueval...\n\n'$COLOR_RESET + ;; + --with-pdr-trader) + COMPOSE_FILES+=" -f ${COMPOSE_DIR}/pdr-trader.yml" + printf $COLOR_Y'Starting with pdr-trader...\n\n'$COLOR_RESET + ;; + --with-pdr-predictoor) + COMPOSE_FILES+=" -f ${COMPOSE_DIR}/pdr-predictoor.yml" + printf $COLOR_Y'Starting with pdr-predictoor...\n\n'$COLOR_RESET + ;; ################################################# # Cleaning switches #################################################