From 13d0b7c34aa2217aa183003bee865b6b18d1b754 Mon Sep 17 00:00:00 2001 From: alexcos20 Date: Thu, 8 Aug 2024 13:23:49 +0300 Subject: [PATCH 1/2] fix cleanup for compose v2 --- cleanup.sh | 98 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 50 insertions(+), 48 deletions(-) diff --git a/cleanup.sh b/cleanup.sh index 5082b7e..f3208ed 100755 --- a/cleanup.sh +++ b/cleanup.sh @@ -1,54 +1,56 @@ #/bin/bash -docker container stop ocean_aquarius_1 -docker container stop ocean_graph-node_1 -docker container stop ocean_subgraph_1 -docker container stop ocean_ipfs_1 -docker container stop ocean_postgres_1 -docker container stop ocean_provider_1 -docker container stop ocean_provider2_1 -docker container stop ocean_ocean-contracts_1 -docker container stop ocean_elasticsearch_1 -docker container stop ocean_ganache_1 -docker container stop ocean_faucet_1 -docker container stop ocean_computetodata_1 -docker container stop ocean_kindcluster_1 -docker container stop ocean_redis_1 -docker container stop ocean_dashboard_1 +docker container stop ocean-aquarius-1 +docker container stop ocean-graph-node-1 +docker container stop ocean-subgraph-1 +docker container stop ocean-ipfs-1 +docker container stop ocean-postgres-1 +docker container stop ocean-provider-1 +docker container stop ocean-provider2-1 +docker container stop ocean-ocean-contracts-1 +docker container stop ocean-elasticsearch-1 +docker container stop ocean-typesense-1 +docker container stop ocean-ganache-1 +docker container stop ocean-faucet-1 +docker container stop ocean-computetodata-1 +docker container stop ocean-kindcluster-1 +docker container stop ocean-redis-1 +docker container stop ocean-dashboard-1 docker container stop docker-registry -docker container stop ocean_pdr-trader_1 -docker container stop ocean_pdr-predictoor1_1 -docker container stop ocean_pdr-predictoor2_1 -docker container stop ocean_pdr-predictoor3_1 -docker container stop ocean_pdr-trueval_1 -docker container stop ocean_pdr-publisher_1 -docker container stop ocean_pdr-dfbuyer_1 -docker container rm ocean_aquarius_1 -docker container rm ocean_graph-node_1 -docker container rm ocean_subgraph_1 -docker container rm ocean_ipfs_1 -docker container rm ocean_postgres_1 -docker container rm ocean_provider_1 -docker container rm ocean_provider2_1 -docker container rm ocean_ocean-contracts_1 -docker container rm ocean_elasticsearch_1 -docker container rm ocean_ganache_1 -docker container rm ocean_faucet_1 -docker container rm ocean_computetodata_1 -docker container rm ocean_kindcluster_1 -docker container rm ocean_redis_1 -docker container rm ocean_dashboard_1 +docker container stop ocean-pdr-trader-1 +docker container stop ocean-pdr-predictoor1-1 +docker container stop ocean-pdr-predictoor2-1 +docker container stop ocean-pdr-predictoor3-1 +docker container stop ocean-pdr-trueval-1 +docker container stop ocean-pdr-publisher-1 +docker container stop ocean-pdr-dfbuyer-1 +docker container rm ocean-aquarius-1 +docker container rm ocean-graph-node-1 +docker container rm ocean-subgraph-1 +docker container rm ocean-ipfs-1 +docker container rm ocean-postgres-1 +docker container rm ocean-provider-1 +docker container rm ocean-provider2-1 +docker container rm ocean-ocean-contracts-1 +docker container rm ocean-elasticsearch-1 +docker container rm ocean-typesense-1 +docker container rm ocean-ganache-1 +docker container rm ocean-faucet-1 +docker container rm ocean-computetodata-1 +docker container rm ocean-kindcluster-1 +docker container rm ocean-redis-1 +docker container rm ocean-dashboard-1 docker container rm docker-registry -docker container rm ocean_pdr-trader_1 -docker container rm ocean_pdr-predictoor1_1 -docker container rm ocean_pdr-predictoor2_1 -docker container rm ocean_pdr-predictoor3_1 -docker container rm ocean_pdr-trueval_1 -docker container rm ocean_pdr-publisher_1 -docker container rm ocean_pdr-dfbuyer_1 -docker volume rm ocean_graphipfs -docker volume rm ocean_graphpgsql -docker volume rm ocean_provider1db -docker volume rm ocean_provider2db +docker container rm ocean-pdr-trader-1 +docker container rm ocean-pdr-predictoor1-1 +docker container rm ocean-pdr-predictoor2-1 +docker container rm ocean-pdr-predictoor3-1 +docker container rm ocean-pdr-trueval-1 +docker container rm ocean-pdr-publisher-1 +docker container rm ocean-pdr-dfbuyer-1 +docker volume rm ocean-graphipfs +docker volume rm ocean-graphpgsql +docker volume rm ocean-provider1db +docker volume rm ocean-provider2db docker network rm kind docker volume rm $(docker volume ls -q) From c1d929e62b63415b92aebdde118a0a9f9f72b8e4 Mon Sep 17 00:00:00 2001 From: alexcos20 Date: Thu, 8 Aug 2024 13:24:01 +0300 Subject: [PATCH 2/2] add typesense --- README.md | 4 +++- compose-files/typesense.yml | 14 ++++++++++++++ start_ocean.sh | 6 +++++- 3 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 compose-files/typesense.yml diff --git a/README.md b/README.md index f33a51b..9e7ba7a 100644 --- a/README.md +++ b/README.md @@ -106,6 +106,7 @@ The default versions are always a combination of component versions which are co | ocean-contracts | | v2.0.2 | 172.15.0.14 | | | Aquarius | | v5.1.4 | 172.15.0.5 | 5000 -> 5000 | | Elasticsearch | Aquarius | 8.5.1 | 172.15.0.6 | | +| Typesense | Ocean-node | 0.25.1 | 172.15.0.20 | 8108 -> 8108 | | Provider | | v2.1.6 | 172.15.0.4 | 8030 -> 8030 | | Provider2 | | v2.1.6 | 172.15.0.7 | 8030 -> 8030 | | RBAC Server | | main | 172.15.0.8 | 3000 -> 3000 | @@ -155,7 +156,8 @@ export AQUARIUS_LOG_LEVEL=DEBUG | Option | Description | | -------------------------- | ----------------------------------------------------------------------------------------------- | | `--no-aquarius` | Start up Ocean without the `aquarius` Building Block. | -| `--no-elasticsearch` | Start up Ocean without the `elasticsearch` Building Block. | +| `--no-elasticsearch` | Start up Ocean without the `elasticsearch` Building Block. | +| `--with-typesense` | Start up Ocean with Typesense | | `--no-provider` | Start up Ocean without the `provider` Building Block. | | `--no-ipfs` | Start up Ocean without the `ipfs` 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 | diff --git a/compose-files/typesense.yml b/compose-files/typesense.yml new file mode 100644 index 0000000..86d3f59 --- /dev/null +++ b/compose-files/typesense.yml @@ -0,0 +1,14 @@ +version: '3' +services: + typesense: + image: typesense/typesense:${TYPESENSE_VERSION:-latest} + ports: + - 8108:8108 + networks: + backend: + ipv4_address: 172.15.0.20 + volumes: + - typesense-data:/data + command: '--data-dir /data --api-key=xyz' +volumes: + typesense-data: \ No newline at end of file diff --git a/start_ocean.sh b/start_ocean.sh index 980146a..cdcad4d 100755 --- a/start_ocean.sh +++ b/start_ocean.sh @@ -27,7 +27,7 @@ DIR="${DIR/ /\\ }" COMPOSE_DIR="${DIR}/compose-files" # Default versions of Aquarius, Provider - +export TYPESENSE_VERSION=${TYPESENSE_VERSION:-0.25.1} export AQUARIUS_VERSION=${AQUARIUS_VERSION:-v5.1.5} export ELASTICSEARCH_VERSION=${ELASTICSEARCH_VERSION:-8.5.1} export PROVIDER_VERSION=${PROVIDER_VERSION:-v2.1.6} @@ -227,6 +227,10 @@ while :; do COMPOSE_FILES+=" -f ${COMPOSE_DIR}/registry.yml" printf $COLOR_Y'Starting with Registry...\n\n'$COLOR_RESET ;; + --with-typesense) + COMPOSE_FILES+=" -f ${COMPOSE_DIR}/typesense.yml" + printf $COLOR_Y'Starting with Typesense...\n\n'$COLOR_RESET + ;; --with-c2d) COMPOSE_FILES+=" -f ${COMPOSE_DIR}/registry.yml" COMPOSE_FILES+=" -f ${COMPOSE_DIR}/ipfs.yml"