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

Merge pull request #118 from oceanprotocol/feature/compose_3

Elaticsearch and Compose v3
This commit is contained in:
Javier Cortejoso 2019-03-14 09:41:16 +01:00 committed by GitHub
commit c5e2e1591c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 105 additions and 25 deletions

View File

@ -76,6 +76,7 @@ Option | Description
`--no-aquarius` | Start up Ocean without the `aquarius` Building Block.
`--no-brizo` | Start up Ocean without the `brizo` Building Block.
`--no-secret-store` | Start up Ocean without the `secret-store` Building Block.
`--elasticsearch` | Start up Ocean with ElasticSearch as DB engine for Aquarius instead of MongoDB.
`--local-ganache-node` | Runs a local `ganache` node.
`--local-spree-node` | Runs a node of the local `spree` network.
`--local-nile-node` | Runs a node of the `nile` network and connects the node to the `nile` network.
@ -98,7 +99,8 @@ Hostname | External Port | Internal Url | Local Url | Des
### Aquarius
By default it will start two containers. This Building Block can be disabled by setting the `--no-aquarius` flag.
By default it will start two containers (one for aquarius and one for its database engine). By default Barge will use MongoDB as DB Engine. You can use option `--elasticsearch` to use ElasticSearch intead.
This Building Block can be disabled by setting the `--no-aquarius` flag.
Hostname | External Port | Internal Url | Local Url | Description
-----------|---------------|----------------------|-----------------------|--------------

View File

@ -1,4 +1,4 @@
version: '2.1'
version: '3'
services:
aquarius:
image: oceanprotocol/aquarius:${AQUARIUS_VERSION:-stable}
@ -7,14 +7,14 @@ services:
networks:
backend:
ipv4_address: 172.15.0.15
depends_on:
- mongodb
environment:
DB_HOSTNAME: mongodb
mongodb:
image: mongo:3.6
command: mongod
networks:
backend:
ipv4_address: 172.15.0.11
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}

View File

@ -0,0 +1,30 @@
version: '3'
services:
elasticsearch:
image: elasticsearch:6.4.1
networks:
backend:
ipv4_address: 172.15.0.11
environment:
ES_JAVA_OPTS: "-Xms500m -Xmx500m"
aquarius:
image: oceanprotocol/aquarius:${AQUARIUS_VERSION:-stable}
ports:
- 5000:5000
networks:
backend:
ipv4_address: 172.15.0.15
depends_on:
- elasticsearch
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}

View File

@ -0,0 +1,21 @@
version: '3'
services:
mongodb:
image: mongo:3.6
command: mongod
networks:
backend:
ipv4_address: 172.15.0.11
aquarius:
image: oceanprotocol/aquarius:${AQUARIUS_VERSION:-stable}
ports:
- 5000:5000
networks:
backend:
ipv4_address: 172.15.0.15
depends_on:
- mongodb
environment:
DB_MODULE: ${DB_MODULE}
DB_HOSTNAME: ${DB_HOSTNAME}
DB_PORT: ${DB_PORT}

View File

@ -1,4 +1,4 @@
version: '2.1'
version: '3'
services:
brizo:
image: oceanprotocol/brizo:${BRIZO_VERSION:-stable}

View File

@ -1,4 +1,4 @@
version: '2.1'
version: '3'
services:
keeper-contracts:
image: oceanprotocol/keeper-contracts:${KEEPER_VERSION:-stable}

View File

@ -1,4 +1,4 @@
version: '2.1'
version: '3'
networks:
backend:
@ -7,7 +7,6 @@ networks:
driver: default
config:
- subnet: 172.15.0.1/24
gateway: 172.15.0.1
volumes:
keeper-node:

View File

@ -1,4 +1,4 @@
version: '2.1'
version: '3'
services:
keeper-node:
image: trufflesuite/ganache-cli:latest

View File

@ -1,4 +1,4 @@
version: '2.1'
version: '3'
services:
keeper-node:
image: parity/parity:v2.3.2

View File

@ -1,4 +1,4 @@
version: '2.1'
version: '3'
services:
keeper-node:
image: parity/parity:v2.3.2

View File

@ -1,4 +1,4 @@
version: '2.1'
version: '3'
services:
keeper-node:
image: parity/parity:v2.3.2

View File

@ -1,4 +1,4 @@
version: '2.1'
version: '3'
services:
pleuston:
image: oceanprotocol/pleuston:${PLEUSTON_VERSION:-stable}

View File

@ -1,4 +1,4 @@
version: '2.1'
version: '3'
services:
secret-store:
image: oceanprotocol/parity-ethereum:master

View File

@ -14,4 +14,6 @@ v0.6.7=0x294aabd9559b547069c48b45d14bb1ea8d81e440
v0.6.8=0x294aabd9559b547069c48b45d14bb1ea8d81e440
v0.6.9=0x294aabd9559b547069c48b45d14bb1ea8d81e440
v0.6.10=0xa5a8c65a5db8f1d18ccbb4759692e4dbe1434974
v0.6.11=0xa5a8c65a5db8f1d18ccbb4759692e4dbe1434974
v0.6.12=0xa5a8c65a5db8f1d18ccbb4759692e4dbe1434974
latest=0xa5a8c65a5db8f1d18ccbb4759692e4dbe1434974

View File

@ -14,4 +14,6 @@ v0.6.7=0x416276914b5a6dd1b88bb0e35096200b08131113
v0.6.8=0x416276914b5a6dd1b88bb0e35096200b08131113
v0.6.9=0x416276914b5a6dd1b88bb0e35096200b08131113
v0.6.10=0x6bd5fdc37b9c87ba73dda230e5dc18e9fda71ff9
latest=0x6bd5fdc37b9c87ba73dda230e5dc18e9fda71ff9
v0.6.11=0x2db2cec56a7ff5f330ee4c845c06043e1ff71c7f
v0.6.12=0x1be580a31d79a7facf1f5c70d8f2727f2ede75bd
latest=0x1be580a31d79a7facf1f5c70d8f2727f2ede75bd

View File

@ -40,6 +40,11 @@ export KEEPER_MNEMONIC=''
export CONFIGURE_ACL="true"
export ACL_CONTRACT_ADDRESS=""
# Default Aquarius parameters
export DB_MODULE="mongodb"
export DB_HOSTNAME="mongodb"
export DB_PORT="27017"
# Export User UID and GID
export LOCAL_USER_ID=$(id -u)
export LOCAL_GROUP_ID=$(id -g)
@ -89,7 +94,7 @@ show_banner
COMPOSE_FILES=""
COMPOSE_FILES+=" -f ${COMPOSE_DIR}/network_volumes.yml"
COMPOSE_FILES+=" -f ${COMPOSE_DIR}/pleuston.yml"
COMPOSE_FILES+=" -f ${COMPOSE_DIR}/aquarius.yml"
COMPOSE_FILES+=" -f ${COMPOSE_DIR}/aquarius_mongodb.yml"
COMPOSE_FILES+=" -f ${COMPOSE_DIR}/brizo.yml"
COMPOSE_FILES+=" -f ${COMPOSE_DIR}/secret_store.yml"
@ -130,7 +135,7 @@ while :; do
printf $COLOR_Y'Starting without Brizo...\n\n'$COLOR_RESET
;;
--no-aquarius)
COMPOSE_FILES="${COMPOSE_FILES/ -f ${COMPOSE_DIR}\/aquarius.yml/}"
COMPOSE_FILES="${COMPOSE_FILES/ -f ${COMPOSE_DIR}\/aquarius_mongodb.yml/}"
printf $COLOR_Y'Starting without Aquarius...\n\n'$COLOR_RESET
;;
--no-secret-store)
@ -149,6 +154,24 @@ while :; do
printf $COLOR_Y'Starting only Secret Store...\n\n'$COLOR_RESET
;;
#################################################
# Elasticsearch
#################################################
--elasticsearch)
COMPOSE_FILES+=" -f ${COMPOSE_DIR}/aquarius_elasticsearch.yml"
COMPOSE_FILES="${COMPOSE_FILES/ -f ${COMPOSE_DIR}\/aquarius_mongodb.yml/}"
export DB_MODULE="elasticsearch"
export DB_HOSTNAME="elasticsearch"
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=""
printf $COLOR_Y'Starting with Elasticsearch...\n\n'$COLOR_RESET
;;
#################################################
# Contract/Storage switches
#################################################
--reuse-ganache-database)
@ -236,3 +259,4 @@ while :; do
esac
shift
done