From ee452766501049de2d99cdf591aa0eeb0a8b9294 Mon Sep 17 00:00:00 2001 From: alexcos20 Date: Fri, 9 Apr 2021 02:44:50 -0700 Subject: [PATCH 1/6] add graph & split elastic --- README.md | 21 +++++++++---- compose-files/aquarius.yml | 12 +------- compose-files/elasticsearch.yml | 11 +++++++ compose-files/thegraph.yml | 52 +++++++++++++++++++++++++++++++++ start_ocean.sh | 12 +++++++- 5 files changed, 91 insertions(+), 17 deletions(-) create mode 100644 compose-files/elasticsearch.yml create mode 100644 compose-files/thegraph.yml diff --git a/README.md b/README.md index d87e4fd..4c556e6 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ - [Prerequisites](#prerequisites) - [Get Started](#get-started) - [Options](#options) - - [Component Versions](#component-versions) + - [Component Versions](#component-versions-and-exposed-ports) - [All Options](#all-options) - [Docker Building Blocks](#docker-building-blocks) - [Aquarius](#aquarius) @@ -55,13 +55,22 @@ This will run the current default versions of [Aquarius](https://github.com/ocea The startup script comes with a set of options for customizing various things. -### Component Versions +### Component Versions and exposed ports The default versions are always a combination of component versions which are considered stable. -| Aquarius | Provider | Ganache | ocean-contracts | -| -------- | -------- | -------- | --------------- | -| `v2.2.7` | `v0.4.9` | `latest` | `V0.5.9` +| Component name | Required by | Version | IP Address | Ports exposed | +| -------------- | ------------------ | --------------------------------- | --------------- | ------------- | +| ganache | ocean-contracts | latest | 172.15.0.3 | 8545 -> 8545 | +| ocean-contracts | | v0.5.9 | 172.15.0.14 | | +| Aquarius | | v2.2.8 | 172.15.0.5 | 5000 -> 5000 | +| Elasticsearch | Aquarius | 6.8.3 | 172.15.0.6 | | +| Provider | | v0.4.9 | 172.15.0.4 | 8030 -> 8030 | +| Provider2 | | v0.4.9 | 172.15.0.7 | 8030 -> 8030 | +| GraphNode | | oceanprotocol/graph-node:latest | 172.15.0.15 | 9000 -> 8000 ,9001 -> 8001 , 9020 -> 8020, 9030 -> 8030, 9040 -> 8040 | +| Graphipfs | | ipfs/go-ipfs:v0.4.23 | 172.15.0.16 | 5001 -> 5001 | +| Graphpgsql | | postgres | 172.15.0.7 | 5432 -> 5432 | + You can override the Docker image tag used for a particular component by setting its associated environment variable before calling `start_ocean.sh`: @@ -81,10 +90,12 @@ export AQUARIUS_VERSION=v2.0.0 | Option | Description | | -------------------------- | ----------------------------------------------------------------------------------------------- | | `--no-aquarius` | Start up Ocean without the `aquarius` Building Block. | +| `--no-elasticseach` | Start up Ocean without the `elasticsearch` Building Block. | | `--no-provider` | Start up Ocean without the `provider` Building Block. | | `--with-provider2` | Runs a 2nd provider, on port 8031. This is required for ocean.js/ocean.py integration tests. 2nd Provider will use the same image and parameters (log_level, ipfs gateway, compute gateway, etc) as provider1, but has a different private key | | `--no-ganache` | Start up Ocean without the `ganache` Building Block. | | `--no-dashboard` | Start up Ocean without the `dashboard` Building Block. | +| `--with-thegraph` | Start up Ocean with graphnode, ipfs & postgresql | | `--skip-deploy` | Start up Ocean without deploying the contracts. Useful when ethereum node already has contracts.| | `--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. | diff --git a/compose-files/aquarius.yml b/compose-files/aquarius.yml index 36089b1..b3756cf 100644 --- a/compose-files/aquarius.yml +++ b/compose-files/aquarius.yml @@ -1,17 +1,7 @@ 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:-latest} + image: myaquarius ports: - 5000:5000 networks: diff --git a/compose-files/elasticsearch.yml b/compose-files/elasticsearch.yml new file mode 100644 index 0000000..db3d385 --- /dev/null +++ b/compose-files/elasticsearch.yml @@ -0,0 +1,11 @@ +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" \ No newline at end of file diff --git a/compose-files/thegraph.yml b/compose-files/thegraph.yml new file mode 100644 index 0000000..dde1735 --- /dev/null +++ b/compose-files/thegraph.yml @@ -0,0 +1,52 @@ +version: '3' +services: + graph-node: + image: oceanprotocol/graph-node:latest + 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: 'barge:${NETWORK_RPC_URL}' + RUST_LOG: info + ipfs: + image: ipfs/go-ipfs:v0.4.23 + ports: + - '5001:5001' + networks: + backend: + ipv4_address: 172.15.0.16 + volumes: + - graphipfs:/data/ipfs + 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 +volumes: + graphipfs: + graphpgsql: + diff --git a/start_ocean.sh b/start_ocean.sh index 393fa0f..df3ecf0 100755 --- a/start_ocean.sh +++ b/start_ocean.sh @@ -28,7 +28,7 @@ COMPOSE_DIR="${DIR}/compose-files" # Default versions of Aquarius, Provider -export AQUARIUS_VERSION=${AQUARIUS_VERSION:-v2.2.7} +export AQUARIUS_VERSION=${AQUARIUS_VERSION:-v2.2.8} export PROVIDER_VERSION=${PROVIDER_VERSION:-v0.4.9} export CONTRACTS_VERSION=${CONTRACTS_VERSION:-v0.5.9} export PROJECT_NAME="ocean" @@ -159,6 +159,7 @@ 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}/provider.yml" COMPOSE_FILES+=" -f ${COMPOSE_DIR}/ganache.yml" COMPOSE_FILES+=" -f ${COMPOSE_DIR}/ocean_contracts.yml" @@ -191,6 +192,10 @@ while :; do COMPOSE_FILES+=" -f ${COMPOSE_DIR}/provider2.yml" printf $COLOR_Y'Starting with a 2nd Provider...\n\n'$COLOR_RESET ;; + --with-thegraph) + COMPOSE_FILES+=" -f ${COMPOSE_DIR}/thegraph.yml" + printf $COLOR_Y'Starting with TheGraph...\n\n'$COLOR_RESET + ;; --no-ganache) COMPOSE_FILES="${COMPOSE_FILES/ -f ${COMPOSE_DIR}\/ganache.yml/}" COMPOSE_FILES="${COMPOSE_FILES/ -f ${COMPOSE_DIR}\/ocean_contracts.yml/}" @@ -200,6 +205,11 @@ while :; do 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 From e869a10647438fca3628b39ae182a50637922270 Mon Sep 17 00:00:00 2001 From: alexcos20 Date: Fri, 9 Apr 2021 06:19:07 -0700 Subject: [PATCH 2/6] fix aquarius --- compose-files/aquarius.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compose-files/aquarius.yml b/compose-files/aquarius.yml index b3756cf..d3589c5 100644 --- a/compose-files/aquarius.yml +++ b/compose-files/aquarius.yml @@ -1,7 +1,7 @@ version: '3' services: aquarius: - image: myaquarius + image: oceanprotocol/aquarius:${AQUARIUS_VERSION:-latest} ports: - 5000:5000 networks: From a1aad311463545a94605ba89d5416bbd71d72928 Mon Sep 17 00:00:00 2001 From: Alex Coseru Date: Tue, 13 Apr 2021 12:15:49 +0300 Subject: [PATCH 3/6] Update dashboard.yml --- compose-files/dashboard.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compose-files/dashboard.yml b/compose-files/dashboard.yml index fd36dad..c60f403 100644 --- a/compose-files/dashboard.yml +++ b/compose-files/dashboard.yml @@ -12,4 +12,4 @@ services: volumes: - /var/run/docker.sock:/var/run/docker.sock ports: - - 9000:9000 \ No newline at end of file + - 9100:9000 From 96daa95f2ad84cc5da44f604bb2b609b0678cc93 Mon Sep 17 00:00:00 2001 From: Alex Coseru Date: Tue, 13 Apr 2021 12:17:57 +0300 Subject: [PATCH 4/6] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4c556e6..137473a 100644 --- a/README.md +++ b/README.md @@ -70,6 +70,7 @@ The default versions are always a combination of component versions which are co | GraphNode | | oceanprotocol/graph-node:latest | 172.15.0.15 | 9000 -> 8000 ,9001 -> 8001 , 9020 -> 8020, 9030 -> 8030, 9040 -> 8040 | | Graphipfs | | ipfs/go-ipfs:v0.4.23 | 172.15.0.16 | 5001 -> 5001 | | Graphpgsql | | postgres | 172.15.0.7 | 5432 -> 5432 | +| Dashboard | | portainer/portainer | 172.15.0.25 | 9100 -> 9000 | You can override the Docker image tag used for a particular component by setting its associated environment variable before calling `start_ocean.sh`: @@ -153,7 +154,7 @@ This will start a `portainer` dashboard with the following admin credentials and | Hostname | External Port | Internal URL | Local URL | Description | | ----------- | ------------- | --------------------- | --------------------- | --------------------------------------------------- | -| `dashboard` | `9000` | http://dashboard:9000 | http://localhost:9000 | [Portainer](https://github.com/portainer/portainer) | +| `dashboard` | `9100` | http://dashboard:9100 | http://localhost:9100 | [Portainer](https://github.com/portainer/portainer) | ## Contributing From c9f569cfd957f0e028c341b42e93dc3d6e36cfbd Mon Sep 17 00:00:00 2001 From: alexcos20 Date: Thu, 15 Apr 2021 23:50:01 -0700 Subject: [PATCH 5/6] fix Readme --- README.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4c556e6..0242351 100644 --- a/README.md +++ b/README.md @@ -122,13 +122,19 @@ This Building Block can be disabled by setting the `--no-aquarius` flag. | Hostname | External Port | Internal URL | Local URL | Description | | ----------- | ------------- | --------------------- | --------------------- | --------------------------------------------------- | -| `provider` | `8030` | http://provider:9000 | http://localhost:8030 | | +| `provider` | `8030` | http://provider:8030 | http://localhost:8030 | | ### Ganache | Hostname | External Port | Internal URL | Local URL | Description | | ----------- | ------------- | --------------------- | --------------------- | --------------------------------------------------- | -| `ganache` | `8545` | http://ganache:9000 | http://localhost:8545 | | +| `ganache` | `8545` | http://ganache:8545 | http://localhost:8545 | | + +### TheGraph + +| Hostname | External Port | Internal URL | Local URL | Description | +| ----------- | ------------- | --------------------- | --------------------- | --------------------------------------------------- | +| `graphnode` | `9000` | http://graphnode:9000 | http://localhost:9000 | | ### ocean-contracts From 5a59fcba5fe34b04ff54920c0c738bf06d5e6222 Mon Sep 17 00:00:00 2001 From: alexcos20 Date: Thu, 15 Apr 2021 23:53:20 -0700 Subject: [PATCH 6/6] fix readme --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 47079ff..9ae0917 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ - [Aquarius](#aquarius) - [Provider](#provider) - [Ganache](#ganache) + - [TheGraph](#thegraph) - [ocean-contracts](#ocean-contracts) - [Dashboard](#dashboard) - [Contributing](#contributing)