Rename ipld-eth-server endpoint env variables

This commit is contained in:
Prathamesh Musale 2023-05-15 14:54:47 +05:30
parent da8bf00f78
commit 35270d08e2
7 changed files with 25 additions and 25 deletions

View File

@ -33,8 +33,8 @@ services:
- ../config/watcher-gelato/watcher-params.env - ../config/watcher-gelato/watcher-params.env
environment: environment:
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG} CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
CERC_ETH_SERVER_GQL_ENDPOINT: ${CERC_ETH_SERVER_GQL_ENDPOINT} CERC_IPLD_ETH_RPC: ${CERC_IPLD_ETH_RPC}
CERC_ETH_SERVER_RPC_ENDPOINT: ${CERC_ETH_SERVER_RPC_ENDPOINT} CERC_IPLD_ETH_GQL: ${CERC_IPLD_ETH_GQL}
command: ["./start-job-runner.sh"] command: ["./start-job-runner.sh"]
volumes: volumes:
- ../config/watcher-gelato/watcher-config-template.toml:/app/environments/watcher-config-template.toml - ../config/watcher-gelato/watcher-config-template.toml:/app/environments/watcher-config-template.toml
@ -63,8 +63,8 @@ services:
- ../config/watcher-gelato/watcher-params.env - ../config/watcher-gelato/watcher-params.env
environment: environment:
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG} CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
CERC_ETH_SERVER_GQL_ENDPOINT: ${CERC_ETH_SERVER_GQL_ENDPOINT} CERC_IPLD_ETH_RPC: ${CERC_IPLD_ETH_RPC}
CERC_ETH_SERVER_RPC_ENDPOINT: ${CERC_ETH_SERVER_RPC_ENDPOINT} CERC_IPLD_ETH_GQL: ${CERC_IPLD_ETH_GQL}
CERC_USE_STATE_SNAPSHOT: ${CERC_USE_STATE_SNAPSHOT} CERC_USE_STATE_SNAPSHOT: ${CERC_USE_STATE_SNAPSHOT}
CERC_SNAPSHOT_GQL_ENDPOINT: ${CERC_SNAPSHOT_GQL_ENDPOINT} CERC_SNAPSHOT_GQL_ENDPOINT: ${CERC_SNAPSHOT_GQL_ENDPOINT}
CERC_SNAPSHOT_BLOCKHASH: ${CERC_SNAPSHOT_BLOCKHASH} CERC_SNAPSHOT_BLOCKHASH: ${CERC_SNAPSHOT_BLOCKHASH}

View File

@ -4,17 +4,17 @@ if [ -n "$CERC_SCRIPT_DEBUG" ]; then
set -x set -x
fi fi
CERC_ETH_SERVER_GQL_ENDPOINT="${CERC_ETH_SERVER_GQL_ENDPOINT:-${DEFAULT_CERC_ETH_SERVER_GQL_ENDPOINT}}" CERC_IPLD_ETH_RPC="${CERC_IPLD_ETH_RPC:-${DEFAULT_CERC_IPLD_ETH_RPC}}"
CERC_ETH_SERVER_RPC_ENDPOINT="${CERC_ETH_SERVER_RPC_ENDPOINT:-${DEFAULT_CERC_ETH_SERVER_RPC_ENDPOINT}}" CERC_IPLD_ETH_GQL="${CERC_IPLD_ETH_GQL:-${DEFAULT_CERC_IPLD_ETH_GQL}}"
echo "Using ETH server GQL endpoint ${CERC_ETH_SERVER_GQL_ENDPOINT}" echo "Using ETH server RPC endpoint ${CERC_IPLD_ETH_RPC}"
echo "Using ETH server RPC endpoint ${CERC_ETH_SERVER_RPC_ENDPOINT}" echo "Using ETH server GQL endpoint ${CERC_IPLD_ETH_GQL}"
# Read in the config template TOML file and modify it # Read in the config template TOML file and modify it
WATCHER_CONFIG_TEMPLATE=$(cat environments/watcher-config-template.toml) WATCHER_CONFIG_TEMPLATE=$(cat environments/watcher-config-template.toml)
WATCHER_CONFIG=$(echo "$WATCHER_CONFIG_TEMPLATE" | \ WATCHER_CONFIG=$(echo "$WATCHER_CONFIG_TEMPLATE" | \
sed -E "s|REPLACE_WITH_ETH_SERVER_GQL_ENDPOINT|${CERC_ETH_SERVER_GQL_ENDPOINT}|g; \ sed -E "s|REPLACE_WITH_CERC_IPLD_ETH_GQL|${CERC_IPLD_ETH_GQL}|g; \
s|REPLACE_WITH_ETH_SERVER_RPC_ENDPOINT|${CERC_ETH_SERVER_RPC_ENDPOINT}| ") s|REPLACE_WITH_CERC_IPLD_ETH_RPC|${CERC_IPLD_ETH_RPC}| ")
# Write the modified content to a new file # Write the modified content to a new file
echo "$WATCHER_CONFIG" > environments/local.toml echo "$WATCHER_CONFIG" > environments/local.toml

View File

@ -4,19 +4,19 @@ if [ -n "$CERC_SCRIPT_DEBUG" ]; then
set -x set -x
fi fi
CERC_ETH_SERVER_GQL_ENDPOINT="${CERC_ETH_SERVER_GQL_ENDPOINT:-${DEFAULT_CERC_ETH_SERVER_GQL_ENDPOINT}}" CERC_IPLD_ETH_RPC="${CERC_IPLD_ETH_RPC:-${DEFAULT_CERC_IPLD_ETH_RPC}}"
CERC_ETH_SERVER_RPC_ENDPOINT="${CERC_ETH_SERVER_RPC_ENDPOINT:-${DEFAULT_CERC_ETH_SERVER_RPC_ENDPOINT}}" CERC_IPLD_ETH_GQL="${CERC_IPLD_ETH_GQL:-${DEFAULT_CERC_IPLD_ETH_GQL}}"
CERC_USE_STATE_SNAPSHOT="${CERC_USE_STATE_SNAPSHOT:-${DEFAULT_CERC_USE_STATE_SNAPSHOT}}" CERC_USE_STATE_SNAPSHOT="${CERC_USE_STATE_SNAPSHOT:-${DEFAULT_CERC_USE_STATE_SNAPSHOT}}"
echo "Using ETH server GQL endpoint ${CERC_ETH_SERVER_GQL_ENDPOINT}" echo "Using ETH server RPC endpoint ${CERC_IPLD_ETH_RPC}"
echo "Using ETH server RPC endpoint ${CERC_ETH_SERVER_RPC_ENDPOINT}" echo "Using ETH server GQL endpoint ${CERC_IPLD_ETH_GQL}"
# Read in the config template TOML file and modify it # Read in the config template TOML file and modify it
WATCHER_CONFIG_TEMPLATE=$(cat environments/watcher-config-template.toml) WATCHER_CONFIG_TEMPLATE=$(cat environments/watcher-config-template.toml)
WATCHER_CONFIG=$(echo "$WATCHER_CONFIG_TEMPLATE" | \ WATCHER_CONFIG=$(echo "$WATCHER_CONFIG_TEMPLATE" | \
sed -E "s|REPLACE_WITH_ETH_SERVER_GQL_ENDPOINT|${CERC_ETH_SERVER_GQL_ENDPOINT}|g; \ sed -E "s|REPLACE_WITH_CERC_IPLD_ETH_GQL|${CERC_IPLD_ETH_GQL}|g; \
s|REPLACE_WITH_ETH_SERVER_RPC_ENDPOINT|${CERC_ETH_SERVER_RPC_ENDPOINT}| ") s|REPLACE_WITH_CERC_IPLD_ETH_RPC|${CERC_IPLD_ETH_RPC}| ")
# Write the modified content to a new file # Write the modified content to a new file
echo "$WATCHER_CONFIG" > environments/local.toml echo "$WATCHER_CONFIG" > environments/local.toml

View File

@ -57,8 +57,8 @@
[upstream] [upstream]
[upstream.ethServer] [upstream.ethServer]
gqlApiEndpoint = "REPLACE_WITH_ETH_SERVER_GQL_ENDPOINT" gqlApiEndpoint = "REPLACE_WITH_CERC_IPLD_ETH_GQL"
rpcProviderEndpoint = "REPLACE_WITH_ETH_SERVER_RPC_ENDPOINT" rpcProviderEndpoint = "REPLACE_WITH_CERC_IPLD_ETH_RPC"
[upstream.cache] [upstream.cache]
name = "requests" name = "requests"

View File

@ -1,6 +1,6 @@
# ipld-eth-server endpoints # ipld-eth-server endpoints
DEFAULT_CERC_ETH_SERVER_GQL_ENDPOINT="http://ipld-eth-server:8083/graphql" CERC_IPLD_ETH_RPC="http://ipld-eth-server:8082"
DEFAULT_CERC_ETH_SERVER_RPC_ENDPOINT="http://ipld-eth-server:8082" DEFAULT_CERC_IPLD_ETH_GQL="http://ipld-eth-server:8083/graphql"
# Gelato start block # Gelato start block
DEFAULT_CERC_GELATO_START_BLOCK=11361987 DEFAULT_CERC_GELATO_START_BLOCK=11361987

View File

@ -4,7 +4,7 @@ Instructions to setup and deploy Azimuth Watcher stack
## Setup ## Setup
Prerequisite: ipld-eth-server RPC and GQL endpoints Prerequisite: `ipld-eth-server` RPC and GQL endpoints
Clone required repositories: Clone required repositories:
@ -41,7 +41,7 @@ This should create the required docker images in the local image registry.
CERC_IPLD_ETH_GQL= CERC_IPLD_ETH_GQL=
``` ```
* NOTE: If ipld-eth-server is running on the host machine, use `host.docker.internal` as the hostname to access host ports * NOTE: If `ipld-eth-server` is running on the host machine, use `host.docker.internal` as the hostname to access host ports
### Deploy the stack ### Deploy the stack

View File

@ -4,7 +4,7 @@ Instructions to setup and deploy Gelato watcher using [laconic-stack-orchestrato
## Setup ## Setup
Prerequisite: `ipld-eth-server` endpoints Prerequisite: `ipld-eth-server` RPC and GQL endpoints
Clone required repositories: Clone required repositories:
@ -38,8 +38,8 @@ Create and update an env file to be used in the next step ([defaults](../../conf
```bash ```bash
# External ipld-eth-server endpoints # External ipld-eth-server endpoints
CERC_ETH_SERVER_GQL_ENDPOINT= CERC_IPLD_ETH_RPC=
CERC_ETH_SERVER_RPC_ENDPOINT= CERC_IPLD_ETH_GQL=
# Whether to use a state snapshot to initialize the watcher # Whether to use a state snapshot to initialize the watcher
CERC_USE_STATE_SNAPSHOT=false CERC_USE_STATE_SNAPSHOT=false