scripts(archive): consolidated helpers and backup copies sync
Some checks failed
Deploy to Phoenix / deploy (push) Has been cancelled
Some checks failed
Deploy to Phoenix / deploy (push) Has been cancelled
Made-with: Cursor
This commit is contained in:
@@ -17,7 +17,7 @@ echo "Configuring DBIS service dependencies..."
|
||||
|
||||
# DBIS service IPs
|
||||
POSTGRES_IP="${DBIS_POSTGRES_PRIMARY:-192.168.11.105}"
|
||||
REDIS_IP="192.168.11.120"
|
||||
REDIS_IP="192.168.11.125"
|
||||
DB_PASSWORD="8cba649443f97436db43b34ab2c0e75b5cf15611bef9c099cee6fb22cc3d7771"
|
||||
|
||||
for vmid in 10150 10151; do
|
||||
|
||||
@@ -11,7 +11,7 @@ echo "Configuring DBIS service dependencies..."
|
||||
|
||||
# DBIS service IPs
|
||||
POSTGRES_IP="192.168.11.105"
|
||||
REDIS_IP="192.168.11.120"
|
||||
REDIS_IP="192.168.11.125"
|
||||
DB_PASSWORD="8cba649443f97436db43b34ab2c0e75b5cf15611bef9c099cee6fb22cc3d7771"
|
||||
|
||||
for vmid in 10150 10151; do
|
||||
|
||||
@@ -24,7 +24,7 @@ done
|
||||
for vmid in 10150 10151; do
|
||||
ssh root@${NODE_IP} "pct enter $vmid -- bash -c '
|
||||
find /opt -name \".env\" -exec sed -i \"s|DATABASE_URL=.*|DATABASE_URL=postgresql://dbis:8cba649443f97436db43b34ab2c0e75b5cf15611bef9c099cee6fb22cc3d7771@${DBIS_POSTGRES_PRIMARY:-192.168.11.105}:5432/dbis_core|g\" {} \;
|
||||
find /opt -name \".env\" -exec sed -i \"s|REDIS_URL=.*|REDIS_URL=redis://${DBIS_REDIS_IP:-192.168.11.120}:6379|g\" {} \;
|
||||
find /opt -name \".env\" -exec sed -i \"s|REDIS_URL=.*|REDIS_URL=redis://${DBIS_REDIS_IP:-192.168.11.125}:6379|g\" {} \;
|
||||
echo \"Dependencies configured for CT $vmid\"
|
||||
'"
|
||||
done
|
||||
|
||||
@@ -196,7 +196,7 @@ done
|
||||
for vmid in 10150 10151; do
|
||||
ssh root@${NODE_IP} "pct enter $vmid -- bash -c '
|
||||
find /opt -name \".env\" -exec sed -i \"s|DATABASE_URL=.*|DATABASE_URL=postgresql://dbis:8cba649443f97436db43b34ab2c0e75b5cf15611bef9c099cee6fb22cc3d7771@${DBIS_POSTGRES_PRIMARY:-192.168.11.105}:5432/dbis_core|g\" {} \;
|
||||
find /opt -name \".env\" -exec sed -i \"s|REDIS_URL=.*|REDIS_URL=redis://192.168.11.120:6379|g\" {} \;
|
||||
find /opt -name \".env\" -exec sed -i \"s|REDIS_URL=.*|REDIS_URL=redis://192.168.11.125:6379|g\" {} \;
|
||||
echo \"Dependencies configured for CT $vmid\"
|
||||
'"
|
||||
done
|
||||
|
||||
@@ -196,7 +196,7 @@ done
|
||||
for vmid in 10150 10151; do
|
||||
ssh root@${NODE_IP} "pct enter $vmid -- bash -c '
|
||||
find /opt -name \".env\" -exec sed -i \"s|DATABASE_URL=.*|DATABASE_URL=postgresql://dbis:8cba649443f97436db43b34ab2c0e75b5cf15611bef9c099cee6fb22cc3d7771@192.168.11.105:5432/dbis_core|g\" {} \;
|
||||
find /opt -name \".env\" -exec sed -i \"s|REDIS_URL=.*|REDIS_URL=redis://192.168.11.120:6379|g\" {} \;
|
||||
find /opt -name \".env\" -exec sed -i \"s|REDIS_URL=.*|REDIS_URL=redis://192.168.11.125:6379|g\" {} \;
|
||||
echo \"Dependencies configured for CT $vmid\"
|
||||
'"
|
||||
done
|
||||
|
||||
@@ -180,7 +180,7 @@ declare -a ENDPOINTS=(
|
||||
# Application Services - DBIS Core Services
|
||||
"10100|${DBIS_POSTGRES_PRIMARY:-192.168.11.105}|dbis-postgres-primary|PostgreSQL|tcp|5432|||Running|Primary database"
|
||||
"10101|${DBIS_POSTGRES_REPLICA:-192.168.11.106}|dbis-postgres-replica-1|PostgreSQL|tcp|5432|||Running|Database replica"
|
||||
"10120|192.168.11.120|dbis-redis|Redis|tcp|6379|||Running|Cache layer"
|
||||
"10120|192.168.11.125|dbis-redis|Redis|tcp|6379|||Running|Cache layer"
|
||||
"10130|${IP_DBIS_FRONTEND:-${IP_SERVICE_13:-${IP_SERVICE_13:-${IP_SERVICE_13:-192.168.11.13}}}0}|dbis-frontend|Web|http|80|dbis-admin.d-bis.org,secure.d-bis.org|Running|Frontend admin console"
|
||||
"10130|${IP_DBIS_FRONTEND:-${IP_SERVICE_13:-${IP_SERVICE_13:-${IP_SERVICE_13:-192.168.11.13}}}0}|dbis-frontend|Web|https|443|||Running|Frontend admin console"
|
||||
"10150|${IP_DBIS_API:-192.168.11.155}|dbis-api-primary|API|http|3000|dbis-api.d-bis.org|Running|Primary API server"
|
||||
|
||||
@@ -174,7 +174,7 @@ declare -a ENDPOINTS=(
|
||||
# Application Services - DBIS Core Services
|
||||
"10100|192.168.11.105|dbis-postgres-primary|PostgreSQL|tcp|5432|||Running|Primary database"
|
||||
"10101|192.168.11.106|dbis-postgres-replica-1|PostgreSQL|tcp|5432|||Running|Database replica"
|
||||
"10120|192.168.11.120|dbis-redis|Redis|tcp|6379|||Running|Cache layer"
|
||||
"10120|192.168.11.125|dbis-redis|Redis|tcp|6379|||Running|Cache layer"
|
||||
"10130|192.168.11.130|dbis-frontend|Web|http|80|dbis-admin.d-bis.org,secure.d-bis.org|Running|Frontend admin console"
|
||||
"10130|192.168.11.130|dbis-frontend|Web|https|443|||Running|Frontend admin console"
|
||||
"10150|192.168.11.155|dbis-api-primary|API|http|3000|dbis-api.d-bis.org|Running|Primary API server"
|
||||
|
||||
@@ -83,7 +83,7 @@ IP_TO_VMID["${IP_VALIDATOR_3:-${IP_VALIDATOR_3:-${IP_VALIDATOR_3:-${IP_VALIDATOR
|
||||
IP_TO_VMID["${IP_VALIDATOR_4:-${IP_VALIDATOR_4:-${IP_VALIDATOR_4:-${IP_VALIDATOR_4:-192.168.11.104}}}}"]="1004"
|
||||
IP_TO_VMID["${DBIS_POSTGRES_PRIMARY:-192.168.11.105}"]="10100"
|
||||
IP_TO_VMID["${DBIS_POSTGRES_REPLICA:-192.168.11.106}"]="10101"
|
||||
IP_TO_VMID["192.168.11.120"]="10120"
|
||||
IP_TO_VMID["192.168.11.125"]="10120"
|
||||
IP_TO_VMID["${IP_DBIS_FRONTEND:-${IP_SERVICE_13:-${IP_SERVICE_13:-${IP_SERVICE_13:-192.168.11.13}}}0}"]="10130"
|
||||
IP_TO_VMID["${IP_BLOCKSCOUT:-${IP_DEVICE_14:-${IP_DEVICE_14:-${IP_DEVICE_14:-192.168.11.14}}}0}"]="5000"
|
||||
IP_TO_VMID["${IP_BESU_RPC_0:-${IP_BESU_RPC_0:-${IP_BESU_RPC_0:-${IP_BESU_RPC_0:-192.168.11.150}}}}"]="1500"
|
||||
|
||||
@@ -77,7 +77,7 @@ IP_TO_VMID["192.168.11.103"]="1003"
|
||||
IP_TO_VMID["192.168.11.104"]="1004"
|
||||
IP_TO_VMID["192.168.11.105"]="10100"
|
||||
IP_TO_VMID["192.168.11.106"]="10101"
|
||||
IP_TO_VMID["192.168.11.120"]="10120"
|
||||
IP_TO_VMID["192.168.11.125"]="10120"
|
||||
IP_TO_VMID["192.168.11.130"]="10130"
|
||||
IP_TO_VMID["192.168.11.140"]="5000"
|
||||
IP_TO_VMID["192.168.11.150"]="1500"
|
||||
|
||||
@@ -40,7 +40,7 @@ IP_TO_VMID["${DBIS_POSTGRES_REPLICA:-192.168.11.106}"]="10101"
|
||||
IP_TO_VMID["192.168.11.110"]="106"
|
||||
IP_TO_VMID["192.168.11.111"]="107"
|
||||
IP_TO_VMID["192.168.11.112"]="108"
|
||||
IP_TO_VMID["192.168.11.120"]="10120"
|
||||
IP_TO_VMID["192.168.11.125"]="10120"
|
||||
IP_TO_VMID["${IP_DBIS_FRONTEND:-${IP_SERVICE_13:-${IP_SERVICE_13:-${IP_SERVICE_13:-192.168.11.13}}}0}"]="10130"
|
||||
IP_TO_VMID["${IP_BLOCKSCOUT:-${IP_DEVICE_14:-${IP_DEVICE_14:-${IP_DEVICE_14:-192.168.11.14}}}0}"]="5000"
|
||||
IP_TO_VMID["${IP_BESU_RPC_0:-${IP_BESU_RPC_0:-${IP_BESU_RPC_0:-${IP_BESU_RPC_0:-192.168.11.150}}}}"]="1500"
|
||||
@@ -94,7 +94,7 @@ IP_TO_HOSTNAME["${DBIS_POSTGRES_REPLICA:-192.168.11.106}"]="dbis-postgres-replic
|
||||
IP_TO_HOSTNAME["192.168.11.110"]="redis-rpc-translator"
|
||||
IP_TO_HOSTNAME["192.168.11.111"]="web3signer-rpc-translator"
|
||||
IP_TO_HOSTNAME["192.168.11.112"]="vault-rpc-translator"
|
||||
IP_TO_HOSTNAME["192.168.11.120"]="dbis-redis"
|
||||
IP_TO_HOSTNAME["192.168.11.125"]="dbis-redis"
|
||||
IP_TO_HOSTNAME["${IP_DBIS_FRONTEND:-${IP_SERVICE_13:-${IP_SERVICE_13:-${IP_SERVICE_13:-192.168.11.13}}}0}"]="dbis-frontend"
|
||||
IP_TO_HOSTNAME["${IP_BLOCKSCOUT:-${IP_DEVICE_14:-${IP_DEVICE_14:-${IP_DEVICE_14:-192.168.11.14}}}0}"]="blockscout-1"
|
||||
IP_TO_HOSTNAME["${IP_BESU_RPC_0:-${IP_BESU_RPC_0:-${IP_BESU_RPC_0:-${IP_BESU_RPC_0:-192.168.11.150}}}}"]="besu-sentry-1"
|
||||
|
||||
@@ -34,7 +34,7 @@ IP_TO_VMID["192.168.11.106"]="10101"
|
||||
IP_TO_VMID["192.168.11.110"]="106"
|
||||
IP_TO_VMID["192.168.11.111"]="107"
|
||||
IP_TO_VMID["192.168.11.112"]="108"
|
||||
IP_TO_VMID["192.168.11.120"]="10120"
|
||||
IP_TO_VMID["192.168.11.125"]="10120"
|
||||
IP_TO_VMID["192.168.11.130"]="10130"
|
||||
IP_TO_VMID["192.168.11.140"]="5000"
|
||||
IP_TO_VMID["192.168.11.150"]="1500"
|
||||
@@ -88,7 +88,7 @@ IP_TO_HOSTNAME["192.168.11.106"]="dbis-postgres-replica-1"
|
||||
IP_TO_HOSTNAME["192.168.11.110"]="redis-rpc-translator"
|
||||
IP_TO_HOSTNAME["192.168.11.111"]="web3signer-rpc-translator"
|
||||
IP_TO_HOSTNAME["192.168.11.112"]="vault-rpc-translator"
|
||||
IP_TO_HOSTNAME["192.168.11.120"]="dbis-redis"
|
||||
IP_TO_HOSTNAME["192.168.11.125"]="dbis-redis"
|
||||
IP_TO_HOSTNAME["192.168.11.130"]="dbis-frontend"
|
||||
IP_TO_HOSTNAME["192.168.11.140"]="blockscout-1"
|
||||
IP_TO_HOSTNAME["192.168.11.150"]="besu-sentry-1"
|
||||
|
||||
@@ -162,7 +162,7 @@ echo "Configuring DBIS service dependencies..."
|
||||
|
||||
# DBIS service IPs
|
||||
POSTGRES_IP="192.168.11.105"
|
||||
REDIS_IP="192.168.11.120"
|
||||
REDIS_IP="192.168.11.125"
|
||||
DB_PASSWORD="8cba649443f97436db43b34ab2c0e75b5cf15611bef9c099cee6fb22cc3d7771"
|
||||
|
||||
for vmid in 10150 10151; do
|
||||
|
||||
@@ -184,7 +184,7 @@ echo ""
|
||||
# Test matrix: from_container -> to_container
|
||||
test_pairs=(
|
||||
"10100:192.168.11.105:10000:192.168.11.44:DBIS PostgreSQL:Order PostgreSQL"
|
||||
"10100:192.168.11.105:10120:192.168.11.120:DBIS PostgreSQL:DBIS Redis"
|
||||
"10100:192.168.11.105:10120:192.168.11.125:DBIS PostgreSQL:DBIS Redis"
|
||||
"10000:192.168.11.44:10001:192.168.11.45:Order PostgreSQL Primary:Order PostgreSQL Replica"
|
||||
"10000:192.168.11.44:10020:192.168.11.38:Order PostgreSQL:Order Redis"
|
||||
"10130:192.168.11.130:10150:192.168.11.155:DBIS Frontend:DBIS API"
|
||||
|
||||
@@ -150,7 +150,7 @@ declare -A CONTAINERS=(
|
||||
["10092"]="order-mcp-legal:192.168.11.37:2048:2:20"
|
||||
["10100"]="dbis-postgres-primary:192.168.11.105:4096:4:50"
|
||||
["10101"]="dbis-postgres-replica-1:192.168.11.106:4096:4:50"
|
||||
["10120"]="dbis-redis:192.168.11.120:2048:2:20"
|
||||
["10120"]="dbis-redis:192.168.11.125:2048:2:20"
|
||||
["10130"]="dbis-frontend:192.168.11.130:2048:2:20"
|
||||
["10150"]="dbis-api-primary:192.168.11.155:4096:4:30"
|
||||
["10151"]="dbis-api-secondary:192.168.11.156:4096:4:30"
|
||||
|
||||
Reference in New Issue
Block a user