Skip to content

Commit

Permalink
Add deploy scripts.
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrey committed Nov 12, 2024
1 parent 83f3954 commit 6beeca1
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 10 deletions.
34 changes: 25 additions & 9 deletions deploy/deploy.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down Expand Up @@ -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}"
Expand Down Expand Up @@ -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}"
Expand Down Expand Up @@ -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}"
Expand Down
2 changes: 1 addition & 1 deletion deploy/monitoring-seer-crawlers.service
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 6beeca1

Please sign in to comment.