From 6beeca1ea1e5f48f7977da537a2c48dbaa3c2196 Mon Sep 17 00:00:00 2001 From: Andrey Date: Tue, 12 Nov 2024 13:38:57 +0200 Subject: [PATCH] Add deploy scripts. --- deploy/deploy.bash | 34 ++++++++++++++++++------- deploy/monitoring-seer-crawlers.service | 2 +- 2 files changed, 26 insertions(+), 10 deletions(-) diff --git a/deploy/deploy.bash b/deploy/deploy.bash index 84575ad..18ac488 100755 --- a/deploy/deploy.bash +++ b/deploy/deploy.bash @@ -272,6 +272,14 @@ cp "${SCRIPT_DIR}/${SEER_CRAWLER_IMX_ZKEVM_SEPOLIA_SERVICE_FILE}" "${USER_SYSTEM XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart "${SEER_CRAWLER_IMX_ZKEVM_SEPOLIA_SERVICE_FILE}" +echo +echo +echo -e "${PREFIX_INFO} Replacing existing seer crawler for Game7 blockchain service definition with ${SEEER_CRAWLER_GAME7_SERVICE_FILE}" +chmod 644 "${SCRIPT_DIR}/${SEEER_CRAWLER_GAME7_SERVICE_FILE}" +cp "${SCRIPT_DIR}/${SEEER_CRAWLER_GAME7_SERVICE_FILE}" "${USER_SYSTEMD_DIR}/${SEEER_CRAWLER_GAME7_SERVICE_FILE}" +XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload +XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart "${SEEER_CRAWLER_GAME7_SERVICE_FILE}" + echo echo echo -e "${PREFIX_INFO} Replacing existing seer crawler for Game7 Testnet blockchain service definition with ${SEER_CRAWLER_GAME7_TESTNET_SERVICE_FILE}" @@ -388,6 +396,14 @@ cp "${SCRIPT_DIR}/${SEER_SYNCHRONIZER_IMX_ZKEVM_SEPOLIA_SERVICE_FILE}" "${USER_S XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart "${SEER_SYNCHRONIZER_IMX_ZKEVM_SEPOLIA_SERVICE_FILE}" +echo +echo +echo -e "${PREFIX_INFO} Replacing existing seer synchronizer for Game7 blockchain service definition with ${SEER_SYNCHRONIZER_GAME7_SERVICE_FILE}" +chmod 644 "${SCRIPT_DIR}/${SEER_SYNCHRONIZER_GAME7_SERVICE_FILE}" +cp "${SCRIPT_DIR}/${SEER_SYNCHRONIZER_GAME7_SERVICE_FILE}" "${USER_SYSTEMD_DIR}/${SEER_SYNCHRONIZER_GAME7_SERVICE_FILE}" +XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload +XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart "${SEER_SYNCHRONIZER_GAME7_SERVICE_FILE}" + echo echo echo -e "${PREFIX_INFO} Replacing existing seer synchronizer for Game7 Testnet blockchain service definition with ${SEER_SYNCHRONIZER_GAME7_TESTNET_SERVICE_FILE}" @@ -451,6 +467,15 @@ cp "${SCRIPT_DIR}/${SEER_HISTORICAL_SYNCHRONIZER_ARBITRUM_SEPOLIA_TIMER_FILE}" " XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart "${SEER_HISTORICAL_SYNCHRONIZER_ARBITRUM_SEPOLIA_TIMER_FILE}" +echo +echo +echo -e "${PREFIX_INFO} Replacing existing seer historical synchronizer for Game7 blockchain service and timer with: ${SEER_HISTORICAL_SYNCHRONIZER_GAME7_SERVICE_FILE}, ${SEER_HISTORICAL_SYNCHRONIZER_GAME7_TIMER_FILE}" +chmod 644 "${SCRIPT_DIR}/${SEER_HISTORICAL_SYNCHRONIZER_GAME7_SERVICE_FILE}" "${SCRIPT_DIR}/${SEER_HISTORICAL_SYNCHRONIZER_GAME7_TIMER_FILE}" +cp "${SCRIPT_DIR}/${SEER_HISTORICAL_SYNCHRONIZER_GAME7_SERVICE_FILE}" "${USER_SYSTEMD_DIR}/${SEER_HISTORICAL_SYNCHRONIZER_GAME7_SERVICE_FILE}" +cp "${SCRIPT_DIR}/${SEER_HISTORICAL_SYNCHRONIZER_GAME7_TIMER_FILE}" "${USER_SYSTEMD_DIR}/${SEER_HISTORICAL_SYNCHRONIZER_GAME7_TIMER_FILE}" +XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload +XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart "${SEER_HISTORICAL_SYNCHRONIZER_GAME7_TIMER_FILE}" + echo echo echo -e "${PREFIX_INFO} Replacing existing seer historical synchronizer for Game7 Testnet blockchain service and timer with: ${SEER_HISTORICAL_SYNCHRONIZER_GAME7_TESTNET_SERVICE_FILE}, ${SEER_HISTORICAL_SYNCHRONIZER_GAME7_TESTNET_TIMER_FILE}" @@ -523,15 +548,6 @@ cp "${SCRIPT_DIR}/${SEER_HISTORICAL_SYNCHRONIZER_IMX_ZKEVM_SEPOLIA_TIMER_FILE}" XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart "${SEER_HISTORICAL_SYNCHRONIZER_IMX_ZKEVM_SEPOLIA_TIMER_FILE}" -echo -echo -echo -e "${PREFIX_INFO} Replacing existing seer historical synchronizer for Game7 Testnet blockchain service and timer with: ${SEER_HISTORICAL_SYNCHRONIZER_GAME7_TESTNET_SERVICE_FILE}, ${SEER_HISTORICAL_SYNCHRONIZER_GAME7_TESTNET_TIMER_FILE}" -chmod 644 "${SCRIPT_DIR}/${SEER_HISTORICAL_SYNCHRONIZER_GAME7_TESTNET_SERVICE_FILE}" "${SCRIPT_DIR}/${SEER_HISTORICAL_SYNCHRONIZER_GAME7_TESTNET_TIMER_FILE}" -cp "${SCRIPT_DIR}/${SEER_HISTORICAL_SYNCHRONIZER_GAME7_TESTNET_SERVICE_FILE}" "${USER_SYSTEMD_DIR}/${SEER_HISTORICAL_SYNCHRONIZER_GAME7_TESTNET_SERVICE_FILE}" -cp "${SCRIPT_DIR}/${SEER_HISTORICAL_SYNCHRONIZER_GAME7_TESTNET_TIMER_FILE}" "${USER_SYSTEMD_DIR}/${SEER_HISTORICAL_SYNCHRONIZER_GAME7_TESTNET_TIMER_FILE}" -XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload -XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart "${SEER_HISTORICAL_SYNCHRONIZER_GAME7_TESTNET_TIMER_FILE}" - echo echo echo -e "${PREFIX_INFO} Replacing existing seer historical synchronizer for B3 blockchain service and timer with: ${SEER_HISTORICAL_SYNCHRONIZER_B3_SERVICE_FILE}, ${SEER_HISTORICAL_SYNCHRONIZER_B3_TIMER_FILE}" diff --git a/deploy/monitoring-seer-crawlers.service b/deploy/monitoring-seer-crawlers.service index 9623ff7..44e29e8 100644 --- a/deploy/monitoring-seer-crawlers.service +++ b/deploy/monitoring-seer-crawlers.service @@ -9,7 +9,7 @@ Restart=on-failure RestartSec=15s WorkingDirectory=/home/ubuntu/ EnvironmentFile=/home/ubuntu/seer-secrets/monitoring.env -ExecStart=/home/ubuntu/monitoring -plugin systemd -host "127.0.0.1" -port 7171 -healthcheck -server -threshold 3 -config /home/ubuntu/.monitoring/monitoring-seer-crawlers-config.json -service seer-crawler-arbitrum-one.service -service seer-crawler-arbitrum-sepolia.service -service seer-crawler-ethereum.service -service seer-crawler-imx-zkevm-sepolia.service -service seer-crawler-imx-zkevm.service -service seer-crawler-mantle-sepolia.service -service seer-crawler-mantle.service -service seer-crawler-polygon.service -service seer-crawler-sepolia.service -service seer-crawler-xai-sepolia.service -service seer-crawler-xai.service -service seer-synchronizer-arbitrum-one.service -service seer-synchronizer-arbitrum-sepolia.service -service seer-synchronizer-ethereum.service -service seer-synchronizer-imx-zkevm-sepolia.service -service seer-synchronizer-imx-zkevm.service -service seer-synchronizer-mantle-sepolia.service -service seer-synchronizer-mantle.service -service seer-synchronizer-polygon.service -service seer-synchronizer-sepolia.service -service seer-synchronizer-xai-sepolia.service -service seer-synchronizer-xai.service -service seer-crawler-game7-testnet.service -service seer-synchronizer-game7-testnet.service -service seer-crawler-b3.service -service seer-synchronizer-b3.service -service seer-crawler-b3-sepolia.service -service seer-synchronizer-b3-sepolia.service +ExecStart=/home/ubuntu/monitoring -plugin systemd -host "127.0.0.1" -port 7171 -healthcheck -server -threshold 3 -config /home/ubuntu/.monitoring/monitoring-seer-crawlers-config.json -service seer-crawler-arbitrum-one.service -service seer-crawler-arbitrum-sepolia.service -service seer-crawler-ethereum.service -service seer-crawler-imx-zkevm-sepolia.service -service seer-crawler-imx-zkevm.service -service seer-crawler-mantle-sepolia.service -service seer-crawler-mantle.service -service seer-crawler-polygon.service -service seer-crawler-sepolia.service -service seer-crawler-xai-sepolia.service -service seer-crawler-xai.service -service seer-synchronizer-arbitrum-one.service -service seer-synchronizer-arbitrum-sepolia.service -service seer-synchronizer-ethereum.service -service seer-synchronizer-imx-zkevm-sepolia.service -service seer-synchronizer-imx-zkevm.service -service seer-synchronizer-mantle-sepolia.service -service seer-synchronizer-mantle.service -service seer-synchronizer-polygon.service -service seer-synchronizer-sepolia.service -service seer-synchronizer-xai-sepolia.service -service seer-synchronizer-xai.service -service seer-crawler-game7-testnet.service -service seer-synchronizer-game7-testnet.service -service seer-crawler-b3.service -service seer-synchronizer-b3.service -service seer-crawler-b3-sepolia.service -service seer-synchronizer-b3-sepolia.service -service seer-crawler-game7.service -service seer-synchronizer-game7.service CPUWeight=90 SyslogIdentifier=monitoring-seer-crawlers