1
0
mirror of https://github.com/oceanprotocol/barge.git synced 2024-11-22 01:37:01 +01:00

Merge pull request #221 from oceanprotocol/feature/v3-aquarius

Consolidate Aquarius compose files
This commit is contained in:
Alex Coseru 2020-10-13 17:23:56 +03:00 committed by GitHub
commit efc24d9112
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 20 additions and 91 deletions

3
.gitignore vendored
View File

@ -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

View File

@ -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

View File

@ -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/

View File

@ -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/

View File

@ -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}

View File

@ -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
@ -156,7 +157,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"
@ -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)
@ -199,18 +200,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)