From d5e3de791d4351c82daa201a7ee7b8acb4bd6ca7 Mon Sep 17 00:00:00 2001 From: Christoph-Samuel Pitter Date: Thu, 10 Aug 2023 10:07:20 +0400 Subject: [PATCH 1/2] restore default 'sdd start' to its original non-broken behavior, restore ci work flow to start the default set of containers --- .github/workflows/ci.yaml | 2 +- streamr-docker-dev/bin.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index c542d45..8a226ec 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -47,7 +47,7 @@ jobs: - name: Check out the repo uses: actions/checkout@v3.5.2 - name: Start Streamr Docker Stack - run: ./streamr-docker-dev/bin.sh start --except deploy-network-subgraphs --except graph-node --except graph-deploy-tatum-subgraph --except graph-deploy-streamregistry-subgraph --except deploy-hub-subgraph --except graph-deploy-dataunion-subgraph --wait --timeout 600 + run: ./streamr-docker-dev/bin.sh start --wait --timeout 600 - name: Collect docker logs on failure if: failure() uses: jwalton/gh-docker-logs@v2.2.1 diff --git a/streamr-docker-dev/bin.sh b/streamr-docker-dev/bin.sh index e8630b8..b01c2cf 100755 --- a/streamr-docker-dev/bin.sh +++ b/streamr-docker-dev/bin.sh @@ -22,7 +22,7 @@ if [ -n "${CI-}" ]; then # Apply CI override when running on CI server fi # don't start these services unless explicitly started -EXCEPT_SERVICES_DEFAULT=() # array of string e.g. ("a" "b") +EXCEPT_SERVICES_DEFAULT=("deploy-network-subgraphs-fastchain" "graph-node-fastchain" "dev-chain-fast") # array of string e.g. ("a" "b") # Service Aliases NODE_NO_STORAGE='broker-node-no-storage-1 broker-node-no-storage-2' From d8bc54ffea40791ca6b9d1b51f263ae7f8b97f79 Mon Sep 17 00:00:00 2001 From: Christoph-Samuel Pitter Date: Thu, 10 Aug 2023 14:49:14 +0400 Subject: [PATCH 2/2] new stack is now completely independent of old stack and both can be run at the same time --- docker-compose.yml | 141 +++++++++++++++++++++++--------------- streamr-docker-dev/bin.sh | 2 +- 2 files changed, 85 insertions(+), 58 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index fb245ce..ff721fd 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -322,19 +322,6 @@ services: target: /home/parity/parity_data volume: nocopy: true - dev-chain-fast: - container_name: streamr-dev-chain-fast - image: streamr/dev-chain-fast:dev - networks: - - streamr-network - ports: - - "8547:8545" - restart: unless-stopped - healthcheck: - test: ["CMD", "curl", "--fail", "--silent", "--show-error", "--max-time", "9", "--header", "Content-Type: application/json", "--data", '[{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1},{"jsonrpc":"2.0","method":"eth_syncing","params":[],"id":1}]', "http://localhost:8545/api/health"] - interval: 1m30s - timeout: 10s - retries: 3 graph-node: container_name: streamr-dev-thegraph-node image: graphprotocol/graph-node:v0.30.0 @@ -365,36 +352,6 @@ services: interval: 5s timeout: 10s retries: 10 - graph-node-fastchain: - container_name: streamr-dev-thegraph-node - image: graphprotocol/graph-node:v0.30.0 - restart: unless-stopped - networks: - - streamr-network - ports: - - '8000:8000' - - '8001:8001' - - '8020:8020' - - '8030:8030' - - '8040:8040' - depends_on: - - ipfs - - postgres - - dev-chain-fast - environment: - postgres_host: postgres - postgres_user: streamr - postgres_pass: let-me-in - postgres_db: streamr - ipfs: 'streamr-dev-ipfs:5001' - ethereum: 'xDai:http://streamr-dev-chain-fast:8545' - RUST_LOG: info - GRAPH_ALLOW_NON_DETERMINISTIC_FULLTEXT_SEARCH: "true" - healthcheck: - test: ["CMD", "nc", "-z", "localhost", "8000"] - interval: 5s - timeout: 10s - retries: 10 graph-deploy-streamregistry-subgraph: container_name: streamr-dev-graph-deploy-streamregistry-subgraph image: streamr/graph-deploy-streamregistry-subgraph:dev @@ -423,20 +380,6 @@ services: target: /firstrun volume: nocopy: false - deploy-network-subgraphs-fastchain: - container_name: streamr-dev-deploy-network-subgraphs - image: streamr/deploy-network-subgraphs:dev-fastchain - restart: on-failure # exits on success - networks: - - streamr-network - depends_on: - - graph-node-fastchain - volumes: - - type: volume - source: data-graph-deploy - target: /firstrun - volume: - nocopy: false deploy-hub-subgraph: container_name: streamr-dev-deploy-hub-subgraph image: streamr/deploy-hub-subgraph:dev @@ -500,6 +443,88 @@ services: interval: 5s timeout: 10s retries: 10 + dev-chain-fast: + container_name: streamr-dev-chain-fast + image: streamr/dev-chain-fast:dev + networks: + - streamr-network + ports: + - "8547:8545" + restart: unless-stopped + healthcheck: + test: ["CMD", "curl", "--fail", "--silent", "--show-error", "--max-time", "9", "--header", "Content-Type: application/json", "--data", '[{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1},{"jsonrpc":"2.0","method":"eth_syncing","params":[],"id":1}]', "http://localhost:8545/api/health"] + interval: 1m30s + timeout: 10s + retries: 3 + graph-node-fastchain: + container_name: streamr-dev-thegraph-node-fastchain + image: graphprotocol/graph-node:v0.30.0 + restart: unless-stopped + networks: + - streamr-network + ports: + - '8800:8000' + # - '8001:8001' + # - '8020:8020' + # - '8030:8030' + # - '8040:8040' + depends_on: + - ipfs + - postgres-fastchain + - dev-chain-fast + environment: + postgres_host: postgres-fastchain + postgres_user: streamr + postgres_pass: let-me-in + postgres_db: streamr + ipfs: 'streamr-dev-ipfs:5001' + ethereum: 'xDai:http://streamr-dev-chain-fast:8545' + RUST_LOG: info + GRAPH_ALLOW_NON_DETERMINISTIC_FULLTEXT_SEARCH: "true" + healthcheck: + test: ["CMD", "nc", "-z", "localhost", "8000"] + interval: 5s + timeout: 10s + retries: 10 + deploy-network-subgraphs-fastchain: + container_name: streamr-dev-deploy-network-subgraphs-fastchain + image: streamr/deploy-network-subgraphs:dev-fastchain + restart: on-failure # exits on success + networks: + - streamr-network + depends_on: + - graph-node-fastchain + volumes: + - type: volume + source: data-graph-deploy-fastchain + target: /firstrun + volume: + nocopy: false + postgres-fastchain: + container_name: streamr-dev-postgres-fastchain + image: postgres + restart: unless-stopped + networks: + - streamr-network + # ports: + # - '5432:5432' + command: ["postgres", "-cshared_preload_libraries=pg_stat_statements"] + environment: + POSTGRES_USER: streamr + POSTGRES_PASSWORD: let-me-in + POSTGRES_DB: streamr + POSTGRES_INITDB_ARGS: "-E UTF8 --locale=C" + volumes: + - type: volume + source: data-postgres-fastchain + target: /var/lib/postgresql/data + volume: + nocopy: true + healthcheck: + test: ["CMD-SHELL", "pg_isready -U streamr -d streamr"] + interval: 5s + timeout: 10s + retries: 10 postgres: container_name: streamr-dev-postgres image: postgres @@ -565,7 +590,9 @@ volumes: data-parity-sidechain-node0: data-ipfs: data-postgres: + data-postgres-fastchain: data-graph-deploy: + data-graph-deploy-fastchain: data-graph-deploy-legacy: data-deploy-hub-subgraph: data-graph-deploy-dataunion: diff --git a/streamr-docker-dev/bin.sh b/streamr-docker-dev/bin.sh index b01c2cf..e8630b8 100755 --- a/streamr-docker-dev/bin.sh +++ b/streamr-docker-dev/bin.sh @@ -22,7 +22,7 @@ if [ -n "${CI-}" ]; then # Apply CI override when running on CI server fi # don't start these services unless explicitly started -EXCEPT_SERVICES_DEFAULT=("deploy-network-subgraphs-fastchain" "graph-node-fastchain" "dev-chain-fast") # array of string e.g. ("a" "b") +EXCEPT_SERVICES_DEFAULT=() # array of string e.g. ("a" "b") # Service Aliases NODE_NO_STORAGE='broker-node-no-storage-1 broker-node-no-storage-2'