From d39e7ac6d7b471154f318ea558599507f9e72a15 Mon Sep 17 00:00:00 2001 From: Javier Cortejoso Date: Fri, 8 Feb 2019 09:13:23 +0100 Subject: [PATCH 01/16] Upgraded compose version to 3 --- compose-files/aquarius.yml | 2 +- compose-files/brizo.yml | 2 +- compose-files/keeper_contracts.yml | 2 +- compose-files/network_volumes.yml | 3 +-- compose-files/nodes/ganache_node.yml | 2 +- compose-files/nodes/kovan_node.yml | 2 +- compose-files/nodes/nile_node.yml | 2 +- compose-files/nodes/spree_node.yml | 2 +- compose-files/pleuston.yml | 2 +- compose-files/secret_store.yml | 2 +- 10 files changed, 10 insertions(+), 11 deletions(-) diff --git a/compose-files/aquarius.yml b/compose-files/aquarius.yml index 9451ba4..b1fae4c 100644 --- a/compose-files/aquarius.yml +++ b/compose-files/aquarius.yml @@ -1,4 +1,4 @@ -version: '2.1' +version: '3' services: aquarius: image: oceanprotocol/aquarius:${AQUARIUS_VERSION:-stable} diff --git a/compose-files/brizo.yml b/compose-files/brizo.yml index ef9812c..e24d7a1 100644 --- a/compose-files/brizo.yml +++ b/compose-files/brizo.yml @@ -1,4 +1,4 @@ -version: '2.1' +version: '3' services: brizo: image: oceanprotocol/brizo:${BRIZO_VERSION:-stable} diff --git a/compose-files/keeper_contracts.yml b/compose-files/keeper_contracts.yml index 5d8bf67..553a46d 100644 --- a/compose-files/keeper_contracts.yml +++ b/compose-files/keeper_contracts.yml @@ -1,4 +1,4 @@ -version: '2.1' +version: '3' services: keeper-contracts: image: oceanprotocol/keeper-contracts:${KEEPER_VERSION:-stable} diff --git a/compose-files/network_volumes.yml b/compose-files/network_volumes.yml index 14bf031..bf1ce3c 100644 --- a/compose-files/network_volumes.yml +++ b/compose-files/network_volumes.yml @@ -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: diff --git a/compose-files/nodes/ganache_node.yml b/compose-files/nodes/ganache_node.yml index 76b7aed..8b73eb5 100644 --- a/compose-files/nodes/ganache_node.yml +++ b/compose-files/nodes/ganache_node.yml @@ -1,4 +1,4 @@ -version: '2.1' +version: '3' services: keeper-node: image: trufflesuite/ganache-cli:latest diff --git a/compose-files/nodes/kovan_node.yml b/compose-files/nodes/kovan_node.yml index 1b84811..77607c8 100644 --- a/compose-files/nodes/kovan_node.yml +++ b/compose-files/nodes/kovan_node.yml @@ -1,4 +1,4 @@ -version: '2.1' +version: '3' services: keeper-node: image: parity/parity:stable diff --git a/compose-files/nodes/nile_node.yml b/compose-files/nodes/nile_node.yml index 2008866..7d7a757 100644 --- a/compose-files/nodes/nile_node.yml +++ b/compose-files/nodes/nile_node.yml @@ -1,4 +1,4 @@ -version: '2.1' +version: '3' services: keeper-node: image: parity/parity:stable diff --git a/compose-files/nodes/spree_node.yml b/compose-files/nodes/spree_node.yml index 92fd45e..d1941b2 100644 --- a/compose-files/nodes/spree_node.yml +++ b/compose-files/nodes/spree_node.yml @@ -1,4 +1,4 @@ -version: '2.1' +version: '3' services: keeper-node: image: parity/parity:stable diff --git a/compose-files/pleuston.yml b/compose-files/pleuston.yml index 7edd400..8b2f1fa 100644 --- a/compose-files/pleuston.yml +++ b/compose-files/pleuston.yml @@ -1,4 +1,4 @@ -version: '2.1' +version: '3' services: pleuston: image: oceanprotocol/pleuston:${PLEUSTON_VERSION:-stable} diff --git a/compose-files/secret_store.yml b/compose-files/secret_store.yml index c56566e..f6a78b2 100644 --- a/compose-files/secret_store.yml +++ b/compose-files/secret_store.yml @@ -1,4 +1,4 @@ -version: '2.1' +version: '3' services: secret-store: image: oceanprotocol/parity-ethereum:master From 231b13103c7ee90fbe8d835ee84293d36deb62b1 Mon Sep 17 00:00:00 2001 From: Javier Cortejoso Date: Fri, 8 Feb 2019 10:57:56 +0100 Subject: [PATCH 02/16] Added elasticsearch --- compose-files/aquarius.yml | 12 ++---------- compose-files/elasticsearch.yml | 7 +++++++ compose-files/mongodb.yml | 8 ++++++++ start_ocean.sh | 16 ++++++++++++++++ 4 files changed, 33 insertions(+), 10 deletions(-) create mode 100644 compose-files/elasticsearch.yml create mode 100644 compose-files/mongodb.yml diff --git a/compose-files/aquarius.yml b/compose-files/aquarius.yml index b1fae4c..ff5f1ec 100644 --- a/compose-files/aquarius.yml +++ b/compose-files/aquarius.yml @@ -7,14 +7,6 @@ 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_HOSTNAME: ${DB_HOSTNAME} + DB_PORT: ${DB_PORT} diff --git a/compose-files/elasticsearch.yml b/compose-files/elasticsearch.yml new file mode 100644 index 0000000..76193af --- /dev/null +++ b/compose-files/elasticsearch.yml @@ -0,0 +1,7 @@ +version: '3' +services: + elasticsearch: + image: elasticsearch:5 + networks: + backend: + ipv4_address: 172.15.0.11 diff --git a/compose-files/mongodb.yml b/compose-files/mongodb.yml new file mode 100644 index 0000000..5ce3294 --- /dev/null +++ b/compose-files/mongodb.yml @@ -0,0 +1,8 @@ +version: '3' +services: + mongodb: + image: mongo:3.6 + command: mongod + networks: + backend: + ipv4_address: 172.15.0.11 diff --git a/start_ocean.sh b/start_ocean.sh index eac8c48..ff564f0 100755 --- a/start_ocean.sh +++ b/start_ocean.sh @@ -36,6 +36,10 @@ export KEEPER_MNEMONIC='' export CONFIGURE_ACL="true" export ACL_CONTRACT_ADDRESS="" +# Default Aquarius Backend to Mongo +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) @@ -71,6 +75,7 @@ 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}/mongodb.yml" COMPOSE_FILES+=" -f ${COMPOSE_DIR}/brizo.yml" COMPOSE_FILES+=" -f ${COMPOSE_DIR}/secret_store.yml" @@ -113,6 +118,7 @@ while :; do ;; --no-aquarius) COMPOSE_FILES="${COMPOSE_FILES/ -f ${COMPOSE_DIR}\/aquarius.yml/}" + COMPOSE_FILES="${COMPOSE_FILES/ -f ${COMPOSE_DIR}\/mongodb.yml/}" printf $COLOR_Y'Starting without Aquarius...\n\n'$COLOR_RESET ;; --no-secret-store) @@ -131,6 +137,16 @@ while :; do printf $COLOR_Y'Starting only Secret Store...\n\n'$COLOR_RESET ;; ################################################# + # Elasticsearch + ################################################# + --elasticsearch) + COMPOSE_FILES+=" -f ${COMPOSE_DIR}/elasticsearch.yml" + COMPOSE_FILES="${COMPOSE_FILES/ -f ${COMPOSE_DIR}\/mongodb.yml/}" + export DB_HOSTNAME="elasticsearch" + export DB_PORT="9200" + printf $COLOR_Y'Starting with Elasticsearch...\n\n'$COLOR_RESET + ;; + ################################################# # Contract/Storage switches ################################################# --reuse-ganache-database) From b7ec4957ef5b9607c869fb45d95bcbe160e8a37f Mon Sep 17 00:00:00 2001 From: Javier Cortejoso Date: Fri, 8 Feb 2019 16:13:45 +0100 Subject: [PATCH 03/16] Removed error files --- networks/nile/keys/nile/Accept: | 0 networks/nile/keys/nile/Finished | 0 networks/nile/keys/nile/Host: | 0 networks/nile/keys/nile/POST | 0 networks/nile/keys/nile/Package | 0 networks/nile/keys/nile/Running | 0 networks/nile/keys/nile/User-Agent: | 0 networks/nile/keys/nile/quit | 0 8 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 networks/nile/keys/nile/Accept: delete mode 100644 networks/nile/keys/nile/Finished delete mode 100644 networks/nile/keys/nile/Host: delete mode 100644 networks/nile/keys/nile/POST delete mode 100644 networks/nile/keys/nile/Package delete mode 100644 networks/nile/keys/nile/Running delete mode 100644 networks/nile/keys/nile/User-Agent: delete mode 100644 networks/nile/keys/nile/quit diff --git a/networks/nile/keys/nile/Accept: b/networks/nile/keys/nile/Accept: deleted file mode 100644 index e69de29..0000000 diff --git a/networks/nile/keys/nile/Finished b/networks/nile/keys/nile/Finished deleted file mode 100644 index e69de29..0000000 diff --git a/networks/nile/keys/nile/Host: b/networks/nile/keys/nile/Host: deleted file mode 100644 index e69de29..0000000 diff --git a/networks/nile/keys/nile/POST b/networks/nile/keys/nile/POST deleted file mode 100644 index e69de29..0000000 diff --git a/networks/nile/keys/nile/Package b/networks/nile/keys/nile/Package deleted file mode 100644 index e69de29..0000000 diff --git a/networks/nile/keys/nile/Running b/networks/nile/keys/nile/Running deleted file mode 100644 index e69de29..0000000 diff --git a/networks/nile/keys/nile/User-Agent: b/networks/nile/keys/nile/User-Agent: deleted file mode 100644 index e69de29..0000000 diff --git a/networks/nile/keys/nile/quit b/networks/nile/keys/nile/quit deleted file mode 100644 index e69de29..0000000 From 662898a0eb43491f3fa3bd6a12e47628cc19ba72 Mon Sep 17 00:00:00 2001 From: Javier Cortejoso Date: Fri, 8 Feb 2019 16:14:36 +0100 Subject: [PATCH 04/16] Updated acl_contract addresses --- kovan_acl_contract_addresses.txt | 2 ++ nile_acl_contract_addresses.txt | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/kovan_acl_contract_addresses.txt b/kovan_acl_contract_addresses.txt index 78279f4..c89a0a5 100644 --- a/kovan_acl_contract_addresses.txt +++ b/kovan_acl_contract_addresses.txt @@ -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 diff --git a/nile_acl_contract_addresses.txt b/nile_acl_contract_addresses.txt index 572a1da..b0f9759 100644 --- a/nile_acl_contract_addresses.txt +++ b/nile_acl_contract_addresses.txt @@ -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 From b977d39a2f8f7fbf5521a11050db6c1efe2fc3ee Mon Sep 17 00:00:00 2001 From: Javier Cortejoso Date: Fri, 8 Feb 2019 16:15:01 +0100 Subject: [PATCH 05/16] Two files for aquarius --- compose-files/aquarius.yml | 8 +++++++ compose-files/aquarius_elasticsearch.yml | 28 ++++++++++++++++++++++++ compose-files/aquarius_mongodb.yml | 21 ++++++++++++++++++ compose-files/elasticsearch.yml | 7 ------ compose-files/mongodb.yml | 8 ------- start_ocean.sh | 20 +++++++++++------ 6 files changed, 70 insertions(+), 22 deletions(-) create mode 100644 compose-files/aquarius_elasticsearch.yml create mode 100644 compose-files/aquarius_mongodb.yml delete mode 100644 compose-files/elasticsearch.yml delete mode 100644 compose-files/mongodb.yml diff --git a/compose-files/aquarius.yml b/compose-files/aquarius.yml index ff5f1ec..be123e1 100644 --- a/compose-files/aquarius.yml +++ b/compose-files/aquarius.yml @@ -8,5 +8,13 @@ services: backend: ipv4_address: 172.15.0.15 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} diff --git a/compose-files/aquarius_elasticsearch.yml b/compose-files/aquarius_elasticsearch.yml new file mode 100644 index 0000000..a774087 --- /dev/null +++ b/compose-files/aquarius_elasticsearch.yml @@ -0,0 +1,28 @@ +version: '3' +services: + elasticsearch: + image: elasticsearch:5 + 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} + 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} diff --git a/compose-files/aquarius_mongodb.yml b/compose-files/aquarius_mongodb.yml new file mode 100644 index 0000000..f729df5 --- /dev/null +++ b/compose-files/aquarius_mongodb.yml @@ -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} diff --git a/compose-files/elasticsearch.yml b/compose-files/elasticsearch.yml deleted file mode 100644 index 76193af..0000000 --- a/compose-files/elasticsearch.yml +++ /dev/null @@ -1,7 +0,0 @@ -version: '3' -services: - elasticsearch: - image: elasticsearch:5 - networks: - backend: - ipv4_address: 172.15.0.11 diff --git a/compose-files/mongodb.yml b/compose-files/mongodb.yml deleted file mode 100644 index 5ce3294..0000000 --- a/compose-files/mongodb.yml +++ /dev/null @@ -1,8 +0,0 @@ -version: '3' -services: - mongodb: - image: mongo:3.6 - command: mongod - networks: - backend: - ipv4_address: 172.15.0.11 diff --git a/start_ocean.sh b/start_ocean.sh index ff564f0..db32435 100755 --- a/start_ocean.sh +++ b/start_ocean.sh @@ -36,7 +36,8 @@ export KEEPER_MNEMONIC='' export CONFIGURE_ACL="true" export ACL_CONTRACT_ADDRESS="" -# Default Aquarius Backend to Mongo +# Default Aquarius parameters +export DB_MODULE="mongodb" export DB_HOSTNAME="mongodb" export DB_PORT="27017" @@ -74,8 +75,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}/mongodb.yml" +COMPOSE_FILES+=" -f ${COMPOSE_DIR}/aquarius_mongodb.yml" COMPOSE_FILES+=" -f ${COMPOSE_DIR}/brizo.yml" COMPOSE_FILES+=" -f ${COMPOSE_DIR}/secret_store.yml" @@ -117,8 +117,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}\/mongodb.yml/}" + COMPOSE_FILES="${COMPOSE_FILES/ -f ${COMPOSE_DIR}\/aquarius_mongodb.yml/}" printf $COLOR_Y'Starting without Aquarius...\n\n'$COLOR_RESET ;; --no-secret-store) @@ -140,10 +139,17 @@ while :; do # Elasticsearch ################################################# --elasticsearch) - COMPOSE_FILES+=" -f ${COMPOSE_DIR}/elasticsearch.yml" - COMPOSE_FILES="${COMPOSE_FILES/ -f ${COMPOSE_DIR}\/mongodb.yml/}" + COMPOSE_FILES+=" -f ${COMPOSE_DIR}/aquarius_elasticsearch.yml" + COMPOSE_FILES="${COMPOSE_FILES/ -f ${COMPOSE_DIR}\/aquarius_mongodb.yml/}" 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 ;; ################################################# From 9709e5c36afb7485254edffab5d33c16ca0c829f Mon Sep 17 00:00:00 2001 From: Javier Cortejoso Date: Fri, 8 Feb 2019 16:51:59 +0100 Subject: [PATCH 06/16] Fix elastic --- compose-files/aquarius_elasticsearch.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/compose-files/aquarius_elasticsearch.yml b/compose-files/aquarius_elasticsearch.yml index a774087..774f434 100644 --- a/compose-files/aquarius_elasticsearch.yml +++ b/compose-files/aquarius_elasticsearch.yml @@ -5,6 +5,8 @@ services: networks: backend: ipv4_address: 172.15.0.11 + environment: + ES_JAVA_OPTS: "-Xms500m -Xmx500m" aquarius: image: oceanprotocol/aquarius:${AQUARIUS_VERSION:-stable} @@ -14,7 +16,7 @@ services: backend: ipv4_address: 172.15.0.15 depends_on: - - mongodb + - elasticsearch environment: DB_MODULE: ${DB_MODULE} DB_HOSTNAME: ${DB_HOSTNAME} From 1b3805d3febf0607aa470789b2a6b80396c7523c Mon Sep 17 00:00:00 2001 From: eruizgar91 Date: Mon, 11 Feb 2019 12:13:29 +0100 Subject: [PATCH 07/16] Add module variable and upgrade version to 6.4.1 --- compose-files/aquarius_elasticsearch.yml | 2 +- start_ocean.sh | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/compose-files/aquarius_elasticsearch.yml b/compose-files/aquarius_elasticsearch.yml index 774f434..408b7ff 100644 --- a/compose-files/aquarius_elasticsearch.yml +++ b/compose-files/aquarius_elasticsearch.yml @@ -1,7 +1,7 @@ version: '3' services: elasticsearch: - image: elasticsearch:5 + image: elasticsearch:6.4.1 networks: backend: ipv4_address: 172.15.0.11 diff --git a/start_ocean.sh b/start_ocean.sh index db32435..6ba1b62 100755 --- a/start_ocean.sh +++ b/start_ocean.sh @@ -141,7 +141,8 @@ while :; do --elasticsearch) COMPOSE_FILES+=" -f ${COMPOSE_DIR}/aquarius_elasticsearch.yml" COMPOSE_FILES="${COMPOSE_FILES/ -f ${COMPOSE_DIR}\/aquarius_mongodb.yml/}" - export DB_HOSTNAME="elasticsearch" + export DB_MODULE="elasticsearch" + export DB_HOSTNAME="elasticsearch" export DB_PORT="9200" export DB_USERNAME="elastic" export DB_PASSWORD="changeme" From 9bcef9eca9828c4d3347b8758e964b5fa6e36e20 Mon Sep 17 00:00:00 2001 From: Javier Cortejoso Date: Tue, 12 Feb 2019 19:54:41 +0100 Subject: [PATCH 08/16] ES 6.4.1 --- compose-files/aquarius_elasticsearch.yml | 2 +- start_ocean.sh | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/compose-files/aquarius_elasticsearch.yml b/compose-files/aquarius_elasticsearch.yml index 774f434..408b7ff 100644 --- a/compose-files/aquarius_elasticsearch.yml +++ b/compose-files/aquarius_elasticsearch.yml @@ -1,7 +1,7 @@ version: '3' services: elasticsearch: - image: elasticsearch:5 + image: elasticsearch:6.4.1 networks: backend: ipv4_address: 172.15.0.11 diff --git a/start_ocean.sh b/start_ocean.sh index db32435..e324ff2 100755 --- a/start_ocean.sh +++ b/start_ocean.sh @@ -141,6 +141,7 @@ while :; do --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" From 5f7e9054a0e1b6492b8d0ee4c965e7d0b57226c6 Mon Sep 17 00:00:00 2001 From: Javier Cortejoso Date: Wed, 27 Feb 2019 17:11:13 +0100 Subject: [PATCH 09/16] Updated readme with --elasticsearch --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b67a527..00411e5 100644 --- a/README.md +++ b/README.md @@ -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 -----------|---------------|----------------------|-----------------------|-------------- From ff27bca33e7113396b2db579b7d20e20ae7b2653 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20Guti=C3=A9rrez?= Date: Tue, 5 Mar 2019 14:29:29 +0100 Subject: [PATCH 10/16] Added owner role address environment variable on Keeper contracts compose --- compose-files/keeper_contracts.yml | 1 + start_ocean.sh | 1 + 2 files changed, 2 insertions(+) diff --git a/compose-files/keeper_contracts.yml b/compose-files/keeper_contracts.yml index 5d8bf67..cbcb7e5 100644 --- a/compose-files/keeper_contracts.yml +++ b/compose-files/keeper_contracts.yml @@ -7,6 +7,7 @@ services: ipv4_address: 172.15.0.14 environment: NMEMORIC: ${KEEPER_MNEMONIC} + OWNER_ROLE_ADDRESS: ${KEEPER_OWNER_ROLE_ADDRESS} DEPLOY_CONTRACTS: ${KEEPER_DEPLOY_CONTRACTS} LOCAL_CONTRACTS: ${KEEPER_DEPLOY_CONTRACTS} REUSE_DATABASE: ${GANACHE_REUSE_DATABASE} diff --git a/start_ocean.sh b/start_ocean.sh index 5292127..e678c60 100755 --- a/start_ocean.sh +++ b/start_ocean.sh @@ -13,6 +13,7 @@ export PROJECT_NAME="ocean" export FORCEPULL="false" # keeper options +export KEEPER_OWNER_ROLE_ADDRESS="${KEEPER_OWNER_ROLE_ADDRESS}" export KEEPER_DEPLOY_CONTRACTS="false" export KEEPER_ARTIFACTS_FOLDER="${HOME}/.ocean/keeper-contracts/artifacts" # Specify which ethereum client to run or connect to: development, kovan, spree or nile From 530f0d56cac3334ccb46e4fdaa9a3f661bd6cb1f Mon Sep 17 00:00:00 2001 From: Tom Marble Date: Mon, 11 Mar 2019 09:47:16 -0500 Subject: [PATCH 11/16] Warn user if ~/.ocean is owned by root (#122) * Warn user if ~/.ocean is owned by root Reminder that #100 is not yet fixed * Updates start_ocean.sh Adds copyright notice (per @ttmc) Changes function name for file ownership to check_if_owned_by_root (per @aaitor) - adds a check for the KEEPER_ARTIFACTS_FOLDER (as required by --purge) Signed-off-by: Tom Marble --- start_ocean.sh | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/start_ocean.sh b/start_ocean.sh index e678c60..e4cc40e 100755 --- a/start_ocean.sh +++ b/start_ocean.sh @@ -1,4 +1,7 @@ #!/usr/bin/env bash +# start_ocean.sh +# Copyright (c) 2019 Ocean Protocol contributors +# SPDX-License-Identifier: Apache-2.0 set -e @@ -12,10 +15,13 @@ COMPOSE_DIR="${DIR}/compose-files" export PROJECT_NAME="ocean" export FORCEPULL="false" +# Ocean filesystem artifacts +export OCEAN_HOME="${HOME}/.ocean" + # keeper options export KEEPER_OWNER_ROLE_ADDRESS="${KEEPER_OWNER_ROLE_ADDRESS}" export KEEPER_DEPLOY_CONTRACTS="false" -export KEEPER_ARTIFACTS_FOLDER="${HOME}/.ocean/keeper-contracts/artifacts" +export KEEPER_ARTIFACTS_FOLDER="${OCEAN_HOME}/keeper-contracts/artifacts" # Specify which ethereum client to run or connect to: development, kovan, spree or nile export KEEPER_NETWORK_NAME="nile" export NODE_COMPOSE_FILE="${COMPOSE_DIR}/nodes/nile_node.yml" @@ -63,6 +69,21 @@ function show_banner { echo "" } +function check_if_owned_by_root { + if [ -d "$OCEAN_HOME" ]; then + uid=$(ls -nd "$OCEAN_HOME" | awk '{print $3;}') + if [ "$uid" = "0" ]; then + printf $COLOR_R"WARN: $OCEAN_HOME is owned by root\n"$COLOR_RESET >&2 + else + uid=$(ls -nd "$KEEPER_ARTIFACTS_FOLDER" | awk '{print $3;}') + if [ "$uid" = "0" ]; then + printf $COLOR_R"WARN: $KEEPER_ARTIFACTS_FOLDER is owned by root\n"$COLOR_RESET >&2 + fi + fi + fi +} + +check_if_owned_by_root show_banner COMPOSE_FILES="" From b3ac197bd26242d59c414e9acb084c180e924b70 Mon Sep 17 00:00:00 2001 From: Javier Cortejoso Date: Fri, 15 Mar 2019 16:11:44 +0100 Subject: [PATCH 12/16] Do not use node-key in public networks --- compose-files/nodes/kovan_node.yml | 1 - compose-files/nodes/nile_node.yml | 1 - 2 files changed, 2 deletions(-) diff --git a/compose-files/nodes/kovan_node.yml b/compose-files/nodes/kovan_node.yml index 295b250..1d78f7a 100644 --- a/compose-files/nodes/kovan_node.yml +++ b/compose-files/nodes/kovan_node.yml @@ -13,7 +13,6 @@ services: --jsonrpc-hosts all --jsonrpc-apis all --unsafe-expose - --node-key 0xb3244c104fb56d28d3979f6cd14a8b5cf5b109171d293f4454c97c173a9f9374 volumes: - ../networks/kovan/keys:/home/parity/.local/share/io.parity.ethereum/keys/kovan ports: diff --git a/compose-files/nodes/nile_node.yml b/compose-files/nodes/nile_node.yml index 2880e51..9b53c1e 100644 --- a/compose-files/nodes/nile_node.yml +++ b/compose-files/nodes/nile_node.yml @@ -16,7 +16,6 @@ services: --jsonrpc-apis all --unsafe-expose --unlock 0x00bd138abd70e2f00903268f3db08f2d25677c9e - --node-key 0xb3244c104fb56d28d3979f6cd14a8b5cf5b109171d293f4454c97c173a9f9374 volumes: - ../networks/nile/config:/home/parity/parity/config - keeper-node:/home/parity/.local/share/io.parity.ethereum/ From b50b25f6e7dcd6aeef5e588811242aa1cc8b0a25 Mon Sep 17 00:00:00 2001 From: Javier Cortejoso Date: Fri, 15 Mar 2019 16:12:01 +0100 Subject: [PATCH 13/16] Disable secret-store in Nile and Kovan --- start_ocean.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/start_ocean.sh b/start_ocean.sh index ccf4750..210dae4 100755 --- a/start_ocean.sh +++ b/start_ocean.sh @@ -191,9 +191,11 @@ while :; do # connects you to kovan --local-kovan-node) export NODE_COMPOSE_FILE="${COMPOSE_DIR}/nodes/kovan_node.yml" + COMPOSE_FILES="${COMPOSE_FILES/ -f ${COMPOSE_DIR}\/secret_store.yml/}" export KEEPER_NETWORK_NAME="kovan" export ACL_CONTRACT_ADDRESS="$(get_acl_address ${KEEPER_VERSION})" printf $COLOR_Y'Starting with local Kovan node...\n\n'$COLOR_RESET + printf $COLOR_Y'Starting without Secret Store...\n\n'$COLOR_RESET ;; # spins up a new ganache blockchain --local-ganache-node) @@ -208,9 +210,11 @@ while :; do # connects you to nile ocean testnet --local-nile-node) export NODE_COMPOSE_FILE="${COMPOSE_DIR}/nodes/nile_node.yml" + COMPOSE_FILES="${COMPOSE_FILES/ -f ${COMPOSE_DIR}\/secret_store.yml/}" export KEEPER_NETWORK_NAME="nile" export ACL_CONTRACT_ADDRESS="$(get_acl_address ${KEEPER_VERSION})" printf $COLOR_Y'Starting with local Nile node...\n\n'$COLOR_RESET + printf $COLOR_Y'Starting without Secret Store...\n\n'$COLOR_RESET ;; # spins up spree local testnet --local-spree-node) From b9cb03d20a8333364f22ac161794909d584af752 Mon Sep 17 00:00:00 2001 From: "aitor@oceanprotocol.com" Date: Tue, 19 Mar 2019 11:53:13 +0100 Subject: [PATCH 14/16] removing light flag, a local client needs the events to execute the e2e flow --- compose-files/nodes/nile_node.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/compose-files/nodes/nile_node.yml b/compose-files/nodes/nile_node.yml index 9b53c1e..dfd0b1a 100644 --- a/compose-files/nodes/nile_node.yml +++ b/compose-files/nodes/nile_node.yml @@ -9,7 +9,6 @@ services: --base-path /home/parity/base --engine-signer 0x00bd138abd70e2f00903268f3db08f2d25677c9e --ws-interface all - --light --jsonrpc-cors all --jsonrpc-interface all --jsonrpc-hosts all From 4b7ff1c27007f5e4b819579f19aec171343c888b Mon Sep 17 00:00:00 2001 From: Troy McConaghy Date: Tue, 26 Mar 2019 09:27:49 +0100 Subject: [PATCH 15/16] Change default network from nile to spree --- README.md | 10 +++++----- start_ocean.sh | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 00411e5..d48182d 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ You need to have the newest versions of: ## Get Started -Bring up an instance of the whole Ocean Protocol network stack (connected to the Nile Testnet) with the `./start_ocean.sh` script: +Bring up an instance of the whole Ocean Protocol network stack (including a local Spree network) with the `./start_ocean.sh` script: ```bash git clone git@github.com:oceanprotocol/barge.git @@ -78,7 +78,7 @@ Option | Description `--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-spree-node` | Runs a node of the local `spree` network. This is the default. `--local-nile-node` | Runs a node of the `nile` network and connects the node to the `nile` network. `--local-kovan-node` | Runs a light node of the `kovan` network and connects the node to the `kovan` network. `--reuse-ganache-database` | Configures a running `ganache` node to use a persistent database. @@ -124,13 +124,13 @@ Hostname | External Port | Internal Url | Local Url --------------|---------------|-------------------------|-----------------------|-------------- `keeper-node` | `8545` | http://keeper-node:8545 | http://localhost:8545 | An Ethereum RPC node -This node can be one of the following types (with the default being `nile`): +This node can be one of the following types (with the default being `spree`): Node | Description ----------|------------- `ganache` | Runs a local [ganache-cli](https://github.com/trufflesuite/ganache-cli) node that is not persistent by default. The contracts from the desired `keeper-contracts` version will be deployed upon launch of this node. -`spree` | Runs a local node of the Spree Network. See [Spree Network](#spree-network) for details. The contracts from the desired `keeper-contracts` version will be deployed upon launch of this node. -`nile` | This is the default. Runs a local node of the Nile Network and connects to the [Nile Testnet](https://docs.oceanprotocol.com/concepts/testnets/#nile-testnet). +`spree` | This is the default. Runs a local node of the Spree Network. See [Spree Network](#spree-network) for details. The contracts from the desired `keeper-contracts` version will be deployed upon launch of this node. +`nile` | Runs a local node of the Nile Network and connects to the [Nile Testnet](https://docs.oceanprotocol.com/concepts/testnets/#nile-testnet). `kovan` | Runs a local node of the Kovan Network and connects to the [Kovan Testnet](https://docs.oceanprotocol.com/concepts/testnets/#kovan-testnet). ### Secret Store diff --git a/start_ocean.sh b/start_ocean.sh index 210dae4..a234ab8 100755 --- a/start_ocean.sh +++ b/start_ocean.sh @@ -24,7 +24,7 @@ export KEEPER_DEPLOY_CONTRACTS="false" export KEEPER_ARTIFACTS_FOLDER="${OCEAN_HOME}/keeper-contracts/artifacts" # Specify which ethereum client to run or connect to: development, kovan, spree or nile export KEEPER_NETWORK_NAME="nile" -export NODE_COMPOSE_FILE="${COMPOSE_DIR}/nodes/nile_node.yml" +export NODE_COMPOSE_FILE="${COMPOSE_DIR}/nodes/spree_node.yml" # Ganache specific option, these two options have no effect when not running ganache-cli export GANACHE_DATABASE_PATH="${DIR}" From f3c3378125d4d55d4e45a19b2ee9e525cd7032ad Mon Sep 17 00:00:00 2001 From: Troy McConaghy Date: Thu, 28 Mar 2019 11:30:22 +0100 Subject: [PATCH 16/16] Default KEEPER_NETWORK_NAME="nile" --> "spree" --- start_ocean.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/start_ocean.sh b/start_ocean.sh index a234ab8..07c8f9c 100755 --- a/start_ocean.sh +++ b/start_ocean.sh @@ -23,7 +23,7 @@ export KEEPER_OWNER_ROLE_ADDRESS="${KEEPER_OWNER_ROLE_ADDRESS}" export KEEPER_DEPLOY_CONTRACTS="false" export KEEPER_ARTIFACTS_FOLDER="${OCEAN_HOME}/keeper-contracts/artifacts" # Specify which ethereum client to run or connect to: development, kovan, spree or nile -export KEEPER_NETWORK_NAME="nile" +export KEEPER_NETWORK_NAME="spree" export NODE_COMPOSE_FILE="${COMPOSE_DIR}/nodes/spree_node.yml" # Ganache specific option, these two options have no effect when not running ganache-cli