From cb45cf7128823b365644ed4df8548d77af06673c Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Tue, 13 Oct 2020 10:37:49 +0200 Subject: [PATCH 1/4] remove unused aquarius compose files --- compose-files/aquarius.yml | 18 +++++++--- compose-files/aquarius_elasticsearch.yml | 44 ------------------------ compose-files/aquarius_mongodb.yml | 21 ----------- start_ocean.sh | 2 +- 4 files changed, 15 insertions(+), 70 deletions(-) delete mode 100644 compose-files/aquarius_elasticsearch.yml delete mode 100644 compose-files/aquarius_mongodb.yml diff --git a/compose-files/aquarius.yml b/compose-files/aquarius.yml index 4869679..705dd74 100644 --- a/compose-files/aquarius.yml +++ b/compose-files/aquarius.yml @@ -1,13 +1,24 @@ version: '3' services: + elasticsearch: + image: elasticsearch:6.8.3 + networks: + backend: + ipv4_address: 172.15.0.6 + environment: + ES_JAVA_OPTS: "-Xms512m -Xmx512m" + MAX_MAP_COUNT: "64000" + discovery.type: "single-node" + aquarius: - image: oceanprotocol/aquarius:$AQUARIUS_VERSION + image: oceanprotocol/aquarius:${AQUARIUS_VERSION:-stable} ports: - - 5000:5000 + - 5000:5000 networks: backend: ipv4_address: 172.15.0.5 depends_on: + - elasticsearch - ocean-contracts environment: DB_MODULE: ${DB_MODULE} @@ -23,12 +34,11 @@ services: LOG_LEVEL: DEBUG EVENTS_ECIES_PRIVATE_KEY: "0x5d75837394b078ce97bc289fa8d75e21000573520bfa7784a9d28ccaae602bf8" ARTIFACTS_PATH: "/ocean-contracts/artifacts" - ADDRESS_FILE: ${OCEAN_ADDRESS_FILE:-/ocean-contracts/artifacts/address.json} + 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" - volumes: - ${OCEAN_ARTIFACTS_FOLDER}:/ocean-contracts/artifacts/ diff --git a/compose-files/aquarius_elasticsearch.yml b/compose-files/aquarius_elasticsearch.yml deleted file mode 100644 index 705dd74..0000000 --- a/compose-files/aquarius_elasticsearch.yml +++ /dev/null @@ -1,44 +0,0 @@ -version: '3' -services: - elasticsearch: - image: elasticsearch:6.8.3 - networks: - backend: - ipv4_address: 172.15.0.6 - environment: - ES_JAVA_OPTS: "-Xms512m -Xmx512m" - MAX_MAP_COUNT: "64000" - discovery.type: "single-node" - - aquarius: - image: oceanprotocol/aquarius:${AQUARIUS_VERSION:-stable} - 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: DEBUG - EVENTS_ECIES_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" - volumes: - - ${OCEAN_ARTIFACTS_FOLDER}:/ocean-contracts/artifacts/ diff --git a/compose-files/aquarius_mongodb.yml b/compose-files/aquarius_mongodb.yml deleted file mode 100644 index 08c24bb..0000000 --- a/compose-files/aquarius_mongodb.yml +++ /dev/null @@ -1,21 +0,0 @@ -version: '3' -services: - mongodb: - image: mongo:3.6 - command: mongod - networks: - backend: - ipv4_address: 172.15.0.6 - aquarius: - image: oceanprotocol/aquarius:${AQUARIUS_VERSION:-stable} - ports: - - 5000:5000 - networks: - backend: - ipv4_address: 172.15.0.5 - depends_on: - - mongodb - environment: - DB_MODULE: ${DB_MODULE} - DB_HOSTNAME: ${DB_HOSTNAME} - DB_PORT: ${DB_PORT} diff --git a/start_ocean.sh b/start_ocean.sh index 731c547..1fb3db5 100755 --- a/start_ocean.sh +++ b/start_ocean.sh @@ -156,7 +156,7 @@ 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_elasticsearch.yml" +COMPOSE_FILES+=" -f ${COMPOSE_DIR}/aquarius.yml" COMPOSE_FILES+=" -f ${COMPOSE_DIR}/provider.yml" COMPOSE_FILES+=" -f ${COMPOSE_DIR}/ganache.yml" COMPOSE_FILES+=" -f ${COMPOSE_DIR}/ocean_contracts.yml" From 52d92797bf03087ab5035da004c1f97a2dd8ecd9 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Tue, 13 Oct 2020 10:39:09 +0200 Subject: [PATCH 2/4] update docs --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index 45b3b3c..075f6f1 100644 --- a/README.md +++ b/README.md @@ -84,7 +84,6 @@ export AQUARIUS_VERSION=v2.0.0 | `--no-provider` | Start up Ocean without the `provider` Building Block. | | `--no-ganache` | Start up Ocean without the `ganache` Building Block. | | `--no-dashboard` | Start up Ocean without the `dashboard` Building Block. | -| `--mongodb` | Start up Ocean with MongoDB as DB engine for Aquarius instead of Elasticsearch. | | `--force-pull` | Force pulling the latest revision of the used Docker images. | | `--purge` | Removes the Docker containers, volumes, artifact folder and networks used by the script. | | `--exposeip` | Binds the components to that specific ip. Example: `./start_ocean.sh --exposeip 192.168.0.1` | @@ -96,7 +95,7 @@ Barge consists of a set of building blocks that can be combined to form a local ### Aquarius -By default it will start two containers (one for Aquarius and one for its database engine). By default, Barge will use Elasticsearch for its database engine. You can use the `--mongodb` option to use MongoDB instead. +By default it will start two containers (one for Aquarius and one for its database engine). By default, Barge will use Elasticsearch for its database engine. This Building Block can be disabled by setting the `--no-aquarius` flag. @@ -104,7 +103,6 @@ This Building Block can be disabled by setting the `--no-aquarius` flag. | --------------- | ------------- | -------------------- | --------------------- | ----------------------------------------------------- | | `aquarius` | `5000` | http://aquarius:5000 | http://localhost:5000 | [Aquarius](https://github.com/oceanprotocol/aquarius) | | `elasticsearch` | | | | The Elasticsearch used by Aquarius | -| `mongodb` | | | | The MongoDB used by Aquarius | ### Provider From ccc685f06d0fad2204ec00a612a80fe51553918f Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Tue, 13 Oct 2020 10:43:29 +0200 Subject: [PATCH 3/4] remove mongodb option from script --- start_ocean.sh | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/start_ocean.sh b/start_ocean.sh index 1fb3db5..d3eee4f 100755 --- a/start_ocean.sh +++ b/start_ocean.sh @@ -199,18 +199,6 @@ while :; do printf $COLOR_Y'Starting without Dashboard ...\n\n'$COLOR_RESET ;; ################################################# - # MongoDB - ################################################# - --mongodb) - COMPOSE_FILES+=" -f ${COMPOSE_DIR}/aquarius_mongodb.yml" - COMPOSE_FILES="${COMPOSE_FILES/ -f ${COMPOSE_DIR}\/aquarius_elasticsearch.yml/}" - CHECK_ELASTIC_VM_COUNT=false - export DB_MODULE="mongodb" - export DB_HOSTNAME="mongodb" - export DB_PORT="27017" - printf $COLOR_Y'Starting with MongoDB...\n\n'$COLOR_RESET - ;; - ################################################# # Cleaning switches ################################################# --purge) From 444fb56ff4ea7b58225993b9b89af0ee600b0ffa Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Tue, 13 Oct 2020 10:47:00 +0200 Subject: [PATCH 4/4] cleanup --- .gitignore | 3 --- start_ocean.sh | 7 ++++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index efe2b63..2a09498 100644 --- a/.gitignore +++ b/.gitignore @@ -8,9 +8,6 @@ ganache-db/ # Emacs *~ -# mutable secret store config (Issue #126) -networks/secret-store/config/config.toml - # Mac OS Filesystem artifacts .DS_Store **/.DS_Store diff --git a/start_ocean.sh b/start_ocean.sh index d3eee4f..783351f 100755 --- a/start_ocean.sh +++ b/start_ocean.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # -# Copyright (c) 2019 Ocean Protocol contributors +# Copyright (c) 2020 Ocean Protocol contributors # SPDX-License-Identifier: Apache-2.0 # # Usage: ./start_ocean.sh @@ -90,7 +90,8 @@ fi export OPERATOR_SERVICE_URL=https://operator-api.operator.dev-ocean.com -#add aquarius to /etc/hosts +# Add aquarius to /etc/hosts +# Workaround mainly for macOS if [ ${IP} = "localhost" ]; then if grep -q "aquarius" /etc/hosts; then @@ -191,7 +192,7 @@ while :; do printf $COLOR_Y'Starting without Ganache...\n\n'$COLOR_RESET ;; --no-aquarius) - COMPOSE_FILES="${COMPOSE_FILES/ -f ${COMPOSE_DIR}\/aquarius_elasticsearch.yml/}" + COMPOSE_FILES="${COMPOSE_FILES/ -f ${COMPOSE_DIR}\/aquarius.yml/}" printf $COLOR_Y'Starting without Aquarius...\n\n'$COLOR_RESET ;; --no-dashboard)