This commit is contained in:
Alex Coseru 2023-11-28 10:37:23 +02:00 committed by GitHub
commit 7fc79a641b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 28 additions and 401 deletions

View File

@ -1,40 +1,16 @@
#/bin/bash
docker container stop ocean_aquarius_1
docker container stop ocean_graph-node_1
docker container stop ocean_subgraph_1
docker container stop ocean_ipfs_1
docker container stop ocean_postgres_1
docker container stop ocean_provider_1
docker container stop ocean_provider2_1
docker container stop ocean_ocean-contracts_1
docker container stop ocean_elasticsearch_1
docker container stop ocean_typesense_1
docker container stop ocean_ganache_1
docker container stop ocean_faucet_1
docker container stop ocean_computetodata_1
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 rm ocean_aquarius_1
docker container rm ocean_graph-node_1
docker container rm ocean_subgraph_1
docker container rm ocean_ipfs_1
docker container rm ocean_postgres_1
docker container rm ocean_provider_1
docker container rm ocean_provider2_1
docker container rm ocean_ocean-contracts_1
docker container rm ocean_elasticsearch_1
docker container rm ocean_typesense_1
docker container rm ocean_ganache_1
docker container rm ocean_faucet_1
docker container rm ocean_computetodata_1
docker container rm ocean_kindcluster_1
docker container rm ocean_redis_1
docker container rm ocean_dashboard_1
docker container rm docker-registry
docker volume rm ocean_graphipfs
docker volume rm ocean_graphpgsql
docker volume rm ocean_provider1db
docker volume rm ocean_provider2db
docker volume rm ocean_typesense1
docker network rm kind
docker volume rm $(docker volume ls -q)

View File

@ -1,38 +0,0 @@
version: '3'
services:
aquarius:
image: oceanprotocol/aquarius:${AQUARIUS_VERSION:-latest}
ports:
- 5000:5000
networks:
backend:
ipv4_address: 172.15.0.5
depends_on:
- elasticsearch
- ocean-contracts
environment:
DB_MODULE: ${DB_MODULE}
DB_HOSTNAME: ${DB_HOSTNAME}
DB_PORT: ${DB_PORT}
DB_USERNAME: ${DB_USERNAME}
DB_PASSWORD: ${DB_PASSWORD}
DB_SSL: ${DB_SSL}
DB_VERIFY_CERTS: ${DB_VERIFY_CERTS}
DB_CA_CERTS: ${DB_CA_CERTS}
DB_CLIENT_KEY: ${DB_CLIENT_KEY}
DB_CLIENT_CERT: ${DB_CLIENT_CERT}
LOG_LEVEL: ${AQUARIUS_LOG_LEVEL}
PRIVATE_KEY: "0x5d75837394b078ce97bc289fa8d75e21000573520bfa7784a9d28ccaae602bf8"
ARTIFACTS_PATH: "/ocean-contracts/artifacts"
ADDRESS_FILE: "/ocean-contracts/artifacts/address.json"
DEPLOY_CONTRACTS: ${DEPLOY_CONTRACTS}
NETWORK_NAME: ${CONTRACTS_NETWORK_NAME}
EVENTS_RPC: "http://172.15.0.3:8545"
EVENTS_ALLOW: "0"
RUN_EVENTS_MONITOR: "1"
AQUARIUS_URL: http://172.15.0.5:5000
EVENTS_MONITOR_SLEEP_TIME: ${EVENTS_MONITOR_SLEEP_TIME}
SUBGRAPH_URLS: |
{"8996": "http://172.15.0.15:8000"}
volumes:
- ${OCEAN_ARTIFACTS_FOLDER}:/ocean-contracts/artifacts/

View File

@ -1,42 +0,0 @@
version: '3'
services:
kindcluster:
image: oceanprotocol/c2d_barge_kind:v0.0.1
privileged: true
ports:
- 8443:8443
- 10080:10080
- 31000:31000
networks:
backend:
ipv4_address: 172.15.0.13
environment:
STATIC_IP: 172.15.0.13
REGISTRY: "172.15.0.11:5050"
REGISTRY_USER: "username"
REGISTRY_PASSWORD: '$REGISTRY_TOKEN'
volumes:
- ${OCEAN_CERTS_FOLDER}/registry:/certs
computetodata:
image: oceanprotocol/c2d_barge_deployer:latest
privileged: true
environment:
KIND_IP: 172.15.0.13
IPFS_GATEWAY: ${IPFS_GATEWAY}
IPFS_HTTP_GATEWAY: ${IPFS_HTTP_GATEWAY}
REGISTRY: "172.15.0.11:5000/"
OPERATOR_SERVICE_IMAGE: ${OPERATOR_SERVICE_VERSION}
OPERATOR_ENGINE_IMAGE: ${OPERATOR_ENGINE_VERSION}
POD_CONFIGURATION_IMAGE: ${POD_CONFIGURATION_VERSION}
POD_PUBLISHING_IMAGE: ${POD_PUBLISHING_VERSION}
WAIT_FOR_C2DIMAGES: ${WAIT_FOR_C2DIMAGES}
networks:
backend:
ipv4_address: 172.15.0.12
depends_on:
- kindcluster
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /usr/bin/docker:/usr/bin/docker
- ${OCEAN_C2D_FOLDER}:/ocean/c2d/
- ${OCEAN_CERTS_FOLDER}/registry:/certs

View File

@ -1,16 +0,0 @@
version: '3'
services:
elasticsearch:
image: elasticsearch:${ELASTICSEARCH_VERSION:-latest}
ports:
- 9200:9200
networks:
backend:
ipv4_address: 172.15.0.6
environment:
ES_JAVA_OPTS: "-Xms512m -Xmx512m"
MAX_MAP_COUNT: "64000"
discovery.type: "single-node"
ELASTIC_PASSWORD: "changeme"
xpack.security.enabled: "false"
xpack.security.http.ssl.enabled: "false"

View File

@ -1,32 +0,0 @@
version: '3'
services:
provider:
image: oceanprotocol/provider-py:${PROVIDER_VERSION:-latest}
ports:
- 8030:8030
networks:
backend:
ipv4_address: 172.15.0.4
depends_on:
- ocean-contracts
environment:
ARTIFACTS_PATH: "/ocean-contracts/artifacts"
ADDRESS_FILE: "/ocean-contracts/artifacts/address.json"
DEPLOY_CONTRACTS: ${DEPLOY_CONTRACTS}
NETWORK_URL: ${NETWORK_RPC_URL}
PARITY_URL: ${NETWORK_RPC_URL}
PROVIDER_PRIVATE_KEY: ${PROVIDER_PRIVATE_KEY}
LOG_LEVEL: ${PROVIDER_LOG_LEVEL}
OCEAN_PROVIDER_URL: 'http://0.0.0.0:8030'
OCEAN_PROVIDER_WORKERS: ${PROVIDER_WORKERS}
IPFS_GATEWAY: ${PROVIDER_IPFS_GATEWAY}
OCEAN_PROVIDER_TIMEOUT: '9000'
OPERATOR_SERVICE_URL: ${OPERATOR_SERVICE_URL}
AQUARIUS_URL: ${AQUARIUS_URL:-http://172.15.0.5:5000}
ARWEAVE_GATEWAY: https://arweave.net/
REQUEST_TIMEOUT: ${REQUEST_TIMEOUT:-10}
volumes:
- ${OCEAN_ARTIFACTS_FOLDER}:/ocean-contracts/artifacts/
- provider1db:/ocean-provider/db/
volumes:
provider1db:

View File

@ -1,33 +0,0 @@
version: '3'
services:
provider2:
image: oceanprotocol/provider-py:${PROVIDER_VERSION:-latest}
ports:
- 8031:8030
networks:
backend:
ipv4_address: 172.15.0.7
depends_on:
- ocean-contracts
- provider
environment:
ARTIFACTS_PATH: "/ocean-contracts/artifacts"
ADDRESS_FILE: "/ocean-contracts/artifacts/address.json"
DEPLOY_CONTRACTS: ${DEPLOY_CONTRACTS}
NETWORK_URL: ${NETWORK_RPC_URL}
PARITY_URL: ${NETWORK_RPC_URL}
PROVIDER_PRIVATE_KEY: ${PROVIDER2_PRIVATE_KEY}
LOG_LEVEL: ${PROVIDER_LOG_LEVEL}
OCEAN_PROVIDER_URL: 'http://0.0.0.0:8030'
OCEAN_PROVIDER_WORKERS: ${PROVIDER_WORKERS}
IPFS_GATEWAY: ${PROVIDER_IPFS_GATEWAY}
OCEAN_PROVIDER_TIMEOUT: '9000'
OPERATOR_SERVICE_URL: ${OPERATOR_SERVICE_URL}
AQUARIUS_URL: ${AQUARIUS_URL:-http://172.15.0.5:5000}
ARWEAVE_GATEWAY: https://arweave.net/
REQUEST_TIMEOUT: ${REQUEST_TIMEOUT:-10}
volumes:
- ${OCEAN_ARTIFACTS_FOLDER}:/ocean-contracts/artifacts/
- provider2db:/ocean-provider/db/
volumes:
provider2db:

View File

@ -1,13 +0,0 @@
version: '3'
services:
rbac:
image: oceanprotocol/rbac-server:${RBAC_VERSION:-next}
ports:
- 3000:3000
networks:
backend:
ipv4_address: 172.15.0.8
environment:
DEFAULT_AUTH_SERVICE: "json"
JSON_DATA: '[{"address":"0xe2DD09d719Da89e5a3D0F2549c7E24566e947260","id":"0","userRoles":["user","publisher","consumer"]},{"address":"0xBE5449a6A97aD46c8558A3356267Ee5D2731ab5e","id":"1","userRoles":["user","publisher","consumer"]},{"address":"0xA78deb2Fa79463945C247991075E2a0e98Ba7A09","id":"2","userRoles":["user","publisher","consumer"]},{"address":"0x02354A1F160A3fd7ac8b02ee91F04104440B28E7","id":"3","userRoles":["user","publisher","consumer"]},{"address":"0xe17D2A07EFD5b112F4d675ea2d122ddb145d117B","id":"4","userRoles":["user","publisher","consumer"]},{"address":"0xA32C84D2B44C041F3a56afC07a33f8AC5BF1A071","id":"5","userRoles":["user","publisher","consumer"]},{"address":"0xFF3fE9eb218EAe9ae1eF9cC6C4db238B770B65CC","id":"6","userRoles":["user"]},{"address":"0x529043886F21D9bc1AE0feDb751e34265a246e47","id":"7","userRoles":["consumer"]},{"address":"0xe08A1dAe983BC701D05E492DB80e0144f8f4b909","id":"8","userRoles":["publisher"]},{"address":"0xbcE5A3468386C64507D30136685A99cFD5603135","id":"9","userRoles":["consumer","publisher"]}]'

View File

@ -1,15 +0,0 @@
version: '3'
services:
redis:
image: bitnami/redis:6.2.7
ports:
- 6379:6379
networks:
backend:
ipv4_address: 172.15.0.18
environment:
- ALLOW_EMPTY_PASSWORD=yes
volumes:
- redis1vol:/bitnami/redis/data
volumes:
redis1vol:

View File

@ -1,21 +0,0 @@
version: '3'
services:
registry:
restart: always
container_name: docker-registry
image: registry:2
ports:
- 5050:5000
networks:
backend:
ipv4_address: 172.15.0.11
environment:
REGISTRY_HTTP_ADDR: "172.15.0.11:5000"
REGISTRY_HTTP_TLS_CERTIFICATE: /certs/registry.crt
REGISTRY_HTTP_TLS_KEY: /certs/registry.key
volumes:
- registryvol:/var/lib/registry
- ${OCEAN_CERTS_FOLDER}/registry:/certs
volumes:
registryvol:

View File

@ -1,56 +0,0 @@
version: '3'
services:
graph-node:
image: graphprotocol/graph-node:v0.28.2
ports:
- '9000:8000'
- '9001:8001'
- '9020:8020'
- '9030:8030'
- '9040:8040'
networks:
backend:
ipv4_address: 172.15.0.15
depends_on:
- ipfs
- postgres
- ocean-contracts
environment:
postgres_host: 172.15.0.17
postgres_user: graph-node
postgres_pass: let-me-in
postgres_db: graph-node
ipfs: '172.15.0.16:5001'
ethereum: 'development:${NETWORK_RPC_URL}'
RUST_LOG: ${SUBGRAPH_LOG_LEVEL}
postgres:
image: postgres
ports:
- '5432:5432'
networks:
backend:
ipv4_address: 172.15.0.17
command: ['postgres', '-cshared_preload_libraries=pg_stat_statements']
environment:
POSTGRES_USER: graph-node
POSTGRES_PASSWORD: let-me-in
POSTGRES_DB: graph-node
volumes:
- graphpgsql:/var/lib/postgresql/data
subgraph:
image: oceanprotocol/subgraph:${SUBGRAPH_VERSION:-latest}
networks:
backend:
ipv4_address: 172.15.0.19
environment:
DEPLOY_SUBGRAPH: ${DEPLOY_SUBGRAPH}
depends_on:
- graph-node
- ocean-contracts
volumes:
- ${OCEAN_ARTIFACTS_FOLDER}:/ocean-contracts/artifacts/
volumes:
graphpgsql:

View File

@ -0,0 +1,14 @@
version: '3'
services:
typesense:
image: typesense/typesense:${TYPESENSE_VERSION:-latest}
ports:
- 8108:8108
networks:
backend:
ipv4_address: 172.15.0.6
volumes:
- typesense-data:/data
command: '--data-dir /data --api-key=xyz'
volumes:
typesense-data:

View File

@ -28,27 +28,15 @@ COMPOSE_DIR="${DIR}/compose-files"
# Default versions of Aquarius, Provider
export AQUARIUS_VERSION=${AQUARIUS_VERSION:-v5.1.5}
export ELASTICSEARCH_VERSION=${ELASTICSEARCH_VERSION:-8.5.1}
export PROVIDER_VERSION=${PROVIDER_VERSION:-v2.1.3}
export SUBGRAPH_VERSION=${SUBGRAPH_VERSION:-v3.0.10}
export CONTRACTS_VERSION=${CONTRACTS_VERSION:-v1.1.15}
export RBAC_VERSION=${RBAC_VERSION:-next}
export OPERATOR_SERVICE_VERSION=${OPERATOR_SERVICE_VERSION:-oceanprotocol/operator-service:v4main}
export OPERATOR_ENGINE_VERSION=${OPERATOR_ENGINE_VERSION:-oceanprotocol/operator-engine:v4main}
export POD_CONFIGURATION_VERSION=${POD_CONFIGURATION_VERSION:-oceanprotocol/pod-configuration:v4main}
export POD_PUBLISHING_VERSION=${POD_PUBLISHING_VERSION:-oceanprotocol/pod-publishing:v4main}
export WAIT_FOR_C2DIMAGES=${WAIT_FOR_C2DIMAGES:-false}
export CONTRACTS_VERSION=${CONTRACTS_VERSION:-v2.0.3}
export TYPESENSE_VERSION=${TYPESENSE_VERSION:-0.25.1}
export PROJECT_NAME="ocean"
export FORCEPULL="false"
# Export LOG LEVEL
export AQUARIUS_LOG_LEVEL=${AQUARIUS_LOG_LEVEL:-INFO}
export PROVIDER_LOG_LEVEL=${PROVIDER_LOG_LEVEL:-INFO}
export SUBGRAPH_LOG_LEVEL=${SUBGRAPH_LOG_LEVEL:-info}
export NODES_LOG_LEVEL=${AQUARIUS_LOG_LEVEL:-INFO}
# Export User UID and GID
export LOCAL_USER_ID=$(id -u)
@ -70,7 +58,6 @@ export GANACHE_HARDFORK=${GANACHE_HARDFORK:-"istanbul"}
export OCEAN_HOME="${HOME}/.ocean"
export CONTRACTS_OWNER_ROLE_ADDRESS="${CONTRACTS_OWNER_ROLE_ADDRESS}"
export DEPLOY_CONTRACTS=true
export DEPLOY_SUBGRAPH=true
export OCEAN_ARTIFACTS_FOLDER="${OCEAN_HOME}/ocean-contracts/artifacts"
mkdir -p ${OCEAN_ARTIFACTS_FOLDER}
export OCEAN_C2D_FOLDER="${OCEAN_HOME}/ocean-c2d/"
@ -86,37 +73,12 @@ cp -r ./certs/* ${OCEAN_CERTS_FOLDER}
# Specify which ethereum client to run or connect to: development
export CONTRACTS_NETWORK_NAME="development"
# Default Aquarius parameters: use Elasticsearch
export EVENTS_MONITOR_SLEEP_TIME=5
export DB_MODULE="elasticsearch"
export DB_HOSTNAME="http://172.15.0.6"
export DB_PORT="9200"
export DB_USERNAME="elastic"
export DB_PASSWORD="changeme"
export DB_SSL="false"
export DB_VERIFY_CERTS="false"
export DB_CA_CERTS=""
export DB_CLIENT_KEY=""
export DB_CLIENT_CERT=""
CHECK_ELASTIC_VM_COUNT=true
export IPFS_GATEWAY=http://172.15.0.16:5001
export IPFS_HTTP_GATEWAY=http://172.15.0.16:8080/ipfs/
#Provider
export REQUEST_TIMEOUT=10
export PROVIDER_WORKERS=10
export PROVIDER_IPFS_GATEWAY=https://gateway.ipfs.io/
export PROVIDER_PRIVATE_KEY=0xfd5c1ccea015b6d663618850824154a3b3fb2882c46cefb05b9a93fea8c3d215
export PROVIDER2_PRIVATE_KEY=0xc852b55146fd168ec3d392bbd70988c18463efa460a395dede376453aca1180e
if [ ${IP} = "localhost" ]; then
export AQUARIUS_URI=http://172.15.0.5:5000
else
export AQUARIUS_URI=http://${IP}:5000
fi
export NODE1_PRIVATE_KEY=0xfd5c1ccea015b6d663618850824154a3b3fb2882c46cefb05b9a93fea8c3d215
export NODE2_PRIVATE_KEY=0xc852b55146fd168ec3d392bbd70988c18463efa460a395dede376453aca1180e
#export OPERATOR_SERVICE_URL=http://127.0.0.1:8050
export OPERATOR_SERVICE_URL=${OPERATOR_SERVICE_URL:-"http://172.15.0.13:31000/"}
# colors
COLOR_R="\033[0;31m" # red
@ -151,17 +113,6 @@ function check_if_owned_by_root {
}
function check_max_map_count {
vm_max_map_count=$(docker run --rm busybox sysctl -q vm.max_map_count)
vm_max_map_count=${vm_max_map_count##* }
vm_max_map_count=262144
if [ $vm_max_map_count -lt 262144 ]; then
printf $COLOR_R'vm.max_map_count current kernel value ($vm_max_map_count) is too low for Elasticsearch\n'$COLOR_RESET
printf $COLOR_R'You must update vm.max_map_count to at least 262144\n'$COLOR_RESET
printf $COLOR_R'Please refer to https://www.elastic.co/guide/en/elasticsearch/reference/6.6/vm-max-map-count.html\n'$COLOR_RESET
exit 1
fi
}
function clean_local_contracts {
rm -f "${OCEAN_ARTIFACTS_FOLDER}/ready"
@ -173,14 +124,13 @@ show_banner
COMPOSE_FILES=""
COMPOSE_FILES+=" -f ${COMPOSE_DIR}/network_volumes.yml"
COMPOSE_FILES+=" -f ${COMPOSE_DIR}/dashboard.yml"
COMPOSE_FILES+=" -f ${COMPOSE_DIR}/aquarius.yml"
COMPOSE_FILES+=" -f ${COMPOSE_DIR}/elasticsearch.yml"
COMPOSE_FILES+=" -f ${COMPOSE_DIR}/ipfs.yml"
COMPOSE_FILES+=" -f ${COMPOSE_DIR}/provider.yml"
COMPOSE_FILES+=" -f ${COMPOSE_DIR}/redis.yml"
COMPOSE_FILES+=" -f ${COMPOSE_DIR}/ganache.yml"
COMPOSE_FILES+=" -f ${COMPOSE_DIR}/dashboard.yml"
COMPOSE_FILES+=" -f ${COMPOSE_DIR}/ocean_contracts.yml"
COMPOSE_FILES+=" -f ${COMPOSE_DIR}/ipfs.yml"
COMPOSE_FILES+=" -f ${COMPOSE_DIR}/typesense.yml"
DOCKER_COMPOSE_EXTRA_OPTS="${DOCKER_COMPOSE_EXTRA_OPTS:-}"
@ -199,48 +149,6 @@ while :; do
export FORCEPULL="true"
printf $COLOR_Y'Pulling the latest revision of the used Docker images...\n\n'$COLOR_RESET
;;
#################################################
# Exclude switches
#################################################
--no-provider)
COMPOSE_FILES="${COMPOSE_FILES/ -f ${COMPOSE_DIR}\/provider.yml/}"
COMPOSE_FILES="${COMPOSE_FILES/ -f ${COMPOSE_DIR}\/redis.yml/}"
printf $COLOR_Y'Starting without Provider...\n\n'$COLOR_RESET
;;
--with-provider2)
COMPOSE_FILES+=" -f ${COMPOSE_DIR}/provider2.yml"
printf $COLOR_Y'Starting with a 2nd Provider...\n\n'$COLOR_RESET
;;
--with-registry)
COMPOSE_FILES+=" -f ${COMPOSE_DIR}/registry.yml"
printf $COLOR_Y'Starting with Registry...\n\n'$COLOR_RESET
;;
--with-c2d)
COMPOSE_FILES+=" -f ${COMPOSE_DIR}/registry.yml"
COMPOSE_FILES+=" -f ${COMPOSE_DIR}/ipfs.yml"
COMPOSE_FILES+=" -f ${COMPOSE_DIR}/c2d.yml"
printf $COLOR_Y'Starting with C2D...\n\n'$COLOR_RESET
;;
--with-rbac)
COMPOSE_FILES+=" -f ${COMPOSE_DIR}/rbac.yml"
printf $COLOR_Y'Starting with RBAC Server...\n\n'$COLOR_RESET
;;
--no-ipfs)
COMPOSE_FILES="${COMPOSE_FILES/ -f ${COMPOSE_DIR}\/ipfs.yml/}"
printf $COLOR_Y'Starting without IPFS...\n\n'$COLOR_RESET
;;
--with-thegraph)
COMPOSE_FILES+=" -f ${COMPOSE_DIR}/thegraph.yml"
printf $COLOR_Y'Starting with TheGraph...\n\n'$COLOR_RESET
;;
--no-aquarius)
COMPOSE_FILES="${COMPOSE_FILES/ -f ${COMPOSE_DIR}\/aquarius.yml/}"
printf $COLOR_Y'Starting without Aquarius...\n\n'$COLOR_RESET
;;
--no-elasticsearch)
COMPOSE_FILES="${COMPOSE_FILES/ -f ${COMPOSE_DIR}\/elasticsearch.yml/}"
printf $COLOR_Y'Starting without Elastic search...\n\n'$COLOR_RESET
;;
--no-dashboard)
COMPOSE_FILES="${COMPOSE_FILES/ -f ${COMPOSE_DIR}\/dashboard.yml/}"
printf $COLOR_Y'Starting without Dashboard ...\n\n'$COLOR_RESET
@ -249,10 +157,6 @@ while :; do
export DEPLOY_CONTRACTS=false
printf $COLOR_Y'Ocean contracts will not be deployed, the last deployment (if any) will be intact ...\n\n'$COLOR_RESET
;;
--skip-subgraph-deploy)
export DEPLOY_SUBGRAPH=false
printf $COLOR_Y'Ocean subgraph will not be deployed, the last deployment (if any) will be intact ...\n\n'$COLOR_RESET
;;
#################################################
# Cleaning switches
#################################################
@ -271,7 +175,6 @@ while :; do
break
;;
*)
[ ${CHECK_ELASTIC_VM_COUNT} = "true" ] && check_max_map_count
printf $COLOR_Y'Starting Ocean V4...\n\n'$COLOR_RESET
[ ${DEPLOY_CONTRACTS} = "true" ] && clean_local_contracts
[ ${FORCEPULL} = "true" ] && eval docker-compose "$DOCKER_COMPOSE_EXTRA_OPTS" --project-name=$PROJECT_NAME "$COMPOSE_FILES" pull