From 626423bedbdde04590c99579326640eafc68bdf4 Mon Sep 17 00:00:00 2001 From: Andrey Date: Fri, 7 Jun 2024 16:18:46 +0300 Subject: [PATCH] Add deploy to main deploy file. --- deploy/deploy.bash | 67 +++++++++++++++++++ deploy/seer-synchronizer-arbitrum-one.service | 16 +++++ ...seer-synchronizer-arbitrum-sepolia.service | 16 +++++ ...nizer-game7-orbit-arbitrum-sepolia.service | 16 +++++ .../seer-synchronizer-mantle-sepolia.service | 16 +++++ deploy/seer-synchronizer-mantle.service | 16 +++++ deploy/seer-synchronizer-xai-sepolia.service | 16 +++++ deploy/seer-synchronizer-xai.service | 16 +++++ 8 files changed, 179 insertions(+) create mode 100644 deploy/seer-synchronizer-arbitrum-one.service create mode 100644 deploy/seer-synchronizer-arbitrum-sepolia.service create mode 100644 deploy/seer-synchronizer-game7-orbit-arbitrum-sepolia.service create mode 100644 deploy/seer-synchronizer-mantle-sepolia.service create mode 100644 deploy/seer-synchronizer-mantle.service create mode 100644 deploy/seer-synchronizer-xai-sepolia.service create mode 100644 deploy/seer-synchronizer-xai.service diff --git a/deploy/deploy.bash b/deploy/deploy.bash index d7d6416..b806314 100755 --- a/deploy/deploy.bash +++ b/deploy/deploy.bash @@ -22,6 +22,7 @@ SCRIPT_DIR="$(realpath $(dirname $0))" USER_SYSTEMD_DIR="${USER_SYSTEMD_DIR:-/home/ubuntu/.config/systemd/user}" # Service files +# Crawler SEER_CRAWLER_ARBITRUM_ONE_SERVICE_FILE="seer-crawler-arbitrum-one.service" SEER_CRAWLER_ARBITRUM_SEPOLIA_SERVICE_FILE="seer-crawler-arbitrum-sepolia.service" SEER_CRAWLER_ETHEREUM_SERVICE_FILE="seer-crawler-ethereum.service" @@ -32,8 +33,16 @@ SEER_CRAWLER_POLYGON_SERVICE_FILE="seer-crawler-polygon.service" SEER_CRAWLER_XAI_SEPOLIA_SERVICE_FILE="seer-crawler-xai-sepolia.service" SEER_CRAWLER_XAI_SERVICE_FILE="seer-crawler-xai.service" +# Synchronizer SEER_SYNCHRONIZER_ETHEREUM_SERVICE_FILE="seer-synchronizer-ethereum.service" SEER_SYNCHRONIZER_POLYGON_SERVICE_FILE="seer-synchronizer-polygon.service" +SEER_SYNCHRONIZER_ARBITRUM_ONE_SERVICE_FILE="seer-synchronizer-arbitrum-one.service" +SEER_SYNCHRONIZER_ARBITRUM_SEPOLIA_SERVICE_FILE="seer-synchronizer-arbitrum-sepolia.service" +SEER_SYNCHRONIZER_GAME7_ORBIT_ARBITRUM_SEPOLIA_SERVICE_FILE="seer-synchronizer-game7-orbit-arbitrum-sepolia.service" +SEER_SYNCHRONIZER_MANTLE_SEPOLIA_SERVICE_FILE="seer-synchronizer-mantle-sepolia.service" +SEER_SYNCHRONIZER_MANTLE_SERVICE_FILE="seer-synchronizer-mantle.service" +SEER_SYNCHRONIZER_XAI_SEPOLIA_SERVICE_FILE="seer-synchronizer-xai-sepolia.service" +SEER_SYNCHRONIZER_XAI_SERVICE_FILE="seer-synchronizer-xai.service" set -eu @@ -198,3 +207,61 @@ chmod 644 "${SCRIPT_DIR}/${SEER_SYNCHRONIZER_POLYGON_SERVICE_FILE}" cp "${SCRIPT_DIR}/${SEER_SYNCHRONIZER_POLYGON_SERVICE_FILE}" "${USER_SYSTEMD_DIR}/${SEER_SYNCHRONIZER_POLYGON_SERVICE_FILE}" XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart "${SEER_SYNCHRONIZER_POLYGON_SERVICE_FILE}" + + + +echo +echo +echo -e "${PREFIX_INFO} Replacing existing seer synchronizer for Arbitrum One blockchain service definition with ${SEER_SYNCHRONIZER_ARBITRUM_ONE_SERVICE_FILE}" +chmod 644 "${SCRIPT_DIR}/${SEER_SYNCHRONIZER_ARBITRUM_ONE_SERVICE_FILE}" +cp "${SCRIPT_DIR}/${SEER_SYNCHRONIZER_ARBITRUM_ONE_SERVICE_FILE}" "${USER_SYSTEMD_DIR}/${SEER_SYNCHRONIZER_ARBITRUM_ONE_SERVICE_FILE}" +XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload +XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart "${SEER_SYNCHRONIZER_ARBITRUM_ONE_SERVICE_FILE}" + +echo +echo +echo -e "${PREFIX_INFO} Replacing existing seer synchronizer for Arbitrum Sepolia blockchain service definition with ${SEER_SYNCHRONIZER_ARBITRUM_SEPOLIA_SERVICE_FILE}" +chmod 644 "${SCRIPT_DIR}/${SEER_SYNCHRONIZER_ARBITRUM_SEPOLIA_SERVICE_FILE}" +cp "${SCRIPT_DIR}/${SEER_SYNCHRONIZER_ARBITRUM_SEPOLIA_SERVICE_FILE}" "${USER_SYSTEMD_DIR}/${SEER_SYNCHRONIZER_ARBITRUM_SEPOLIA_SERVICE_FILE}" +XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload +XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart "${SEER_SYNCHRONIZER_ARBITRUM_SEPOLIA_SERVICE_FILE}" + +echo +echo +echo -e "${PREFIX_INFO} Replacing existing seer synchronizer for Game7 Orbit Arbitrum Sepolia blockchain service definition with ${SEER_SYNCHRONIZER_GAME7_ORBIT_ARBITRUM_SEPOLIA_SERVICE_FILE}" +chmod 644 "${SCRIPT_DIR}/${SEER_SYNCHRONIZER_GAME7_ORBIT_ARBITRUM_SEPOLIA_SERVICE_FILE}" +cp "${SCRIPT_DIR}/${SEER_SYNCHRONIZER_GAME7_ORBIT_ARBITRUM_SEPOLIA_SERVICE_FILE}" "${USER_SYSTEMD_DIR}/${SEER_SYNCHRONIZER_GAME7_ORBIT_ARBITRUM_SEPOLIA_SERVICE_FILE}" +XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload +XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart "${SEER_SYNCHRONIZER_GAME7_ORBIT_ARBITRUM_SEPOLIA_SERVICE_FILE}" + +echo +echo +echo -e "${PREFIX_INFO} Replacing existing seer synchronizer for Mantle Sepolia blockchain service definition with ${SEER_SYNCHRONIZER_MANTLE_SEPOLIA_SERVICE_FILE}" +chmod 644 "${SCRIPT_DIR}/${SEER_SYNCHRONIZER_MANTLE_SEPOLIA_SERVICE_FILE}" +cp "${SCRIPT_DIR}/${SEER_SYNCHRONIZER_MANTLE_SEPOLIA_SERVICE_FILE}" "${USER_SYSTEMD_DIR}/${SEER_SYNCHRONIZER_MANTLE_SEPOLIA_SERVICE_FILE}" +XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload +XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart "${SEER_SYNCHRONIZER_MANTLE_SEPOLIA_SERVICE_FILE}" + +echo +echo +echo -e "${PREFIX_INFO} Replacing existing seer synchronizer for Mantle blockchain service definition with ${SEER_SYNCHRONIZER_MANTLE_SERVICE_FILE}" +chmod 644 "${SCRIPT_DIR}/${SEER_SYNCHRONIZER_MANTLE_SERVICE_FILE}" +cp "${SCRIPT_DIR}/${SEER_SYNCHRONIZER_MANTLE_SERVICE_FILE}" "${USER_SYSTEMD_DIR}/${SEER_SYNCHRONIZER_MANTLE_SERVICE_FILE}" +XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload +XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart "${SEER_SYNCHRONIZER_MANTLE_SERVICE_FILE}" + +echo +echo +echo -e "${PREFIX_INFO} Replacing existing seer synchronizer for Xai Sepolia blockchain service definition with ${SEER_SYNCHRONIZER_XAI_SEPOLIA_SERVICE_FILE}" +chmod 644 "${SCRIPT_DIR}/${SEER_SYNCHRONIZER_XAI_SEPOLIA_SERVICE_FILE}" +cp "${SCRIPT_DIR}/${SEER_SYNCHRONIZER_XAI_SEPOLIA_SERVICE_FILE}" "${USER_SYSTEMD_DIR}/${SEER_SYNCHRONIZER_XAI_SEPOLIA_SERVICE_FILE}" +XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload +XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart "${SEER_SYNCHRONIZER_XAI_SEPOLIA_SERVICE_FILE}" + +echo +echo +echo -e "${PREFIX_INFO} Replacing existing seer synchronizer for Xai blockchain service definition with ${SEER_SYNCHRONIZER_XAI_SERVICE_FILE}" +chmod 644 "${SCRIPT_DIR}/${SEER_SYNCHRONIZER_XAI_SERVICE_FILE}" +cp "${SCRIPT_DIR}/${SEER_SYNCHRONIZER_XAI_SERVICE_FILE}" "${USER_SYSTEMD_DIR}/${SEER_SYNCHRONIZER_XAI_SERVICE_FILE}" +XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload +XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart "${SEER_SYNCHRONIZER_XAI_SERVICE_FILE}" \ No newline at end of file diff --git a/deploy/seer-synchronizer-arbitrum-one.service b/deploy/seer-synchronizer-arbitrum-one.service new file mode 100644 index 0000000..cfea1ce --- /dev/null +++ b/deploy/seer-synchronizer-arbitrum-one.service @@ -0,0 +1,16 @@ +[Unit] +Description=Seer synchronizer service for arbitrum one blockchain +After=network.target +StartLimitIntervalSec=300 +StartLimitBurst=3 + +[Service] +WorkingDirectory=/home/ubuntu/seer +EnvironmentFile=/home/ubuntu/seer-secrets/app.env +Restart=on-failure +RestartSec=15s +ExecStart=/home/ubuntu/seer/seer synchronizer --chain arbitrum_one +SyslogIdentifier=seer-synchronizer-arbitrum-one + +[Install] +WantedBy=multi-user.target diff --git a/deploy/seer-synchronizer-arbitrum-sepolia.service b/deploy/seer-synchronizer-arbitrum-sepolia.service new file mode 100644 index 0000000..d6d2cb9 --- /dev/null +++ b/deploy/seer-synchronizer-arbitrum-sepolia.service @@ -0,0 +1,16 @@ +[Unit] +Description=Seer synchronizer service for arbitrum sepolia blockchain +After=network.target +StartLimitIntervalSec=300 +StartLimitBurst=3 + +[Service] +WorkingDirectory=/home/ubuntu/seer +EnvironmentFile=/home/ubuntu/seer-secrets/app.env +Restart=on-failure +RestartSec=15s +ExecStart=/home/ubuntu/seer/seer synchronizer --chain arbitrum_sepolia +SyslogIdentifier=seer-synchronizer-arbitrum-sepolia + +[Install] +WantedBy=multi-user.target diff --git a/deploy/seer-synchronizer-game7-orbit-arbitrum-sepolia.service b/deploy/seer-synchronizer-game7-orbit-arbitrum-sepolia.service new file mode 100644 index 0000000..95bb9f3 --- /dev/null +++ b/deploy/seer-synchronizer-game7-orbit-arbitrum-sepolia.service @@ -0,0 +1,16 @@ +[Unit] +Description=Seer synchronizer service for game7 orbit arbitrum sepolia blockchain +After=network.target +StartLimitIntervalSec=300 +StartLimitBurst=3 + +[Service] +WorkingDirectory=/home/ubuntu/seer +EnvironmentFile=/home/ubuntu/seer-secrets/app.env +Restart=on-failure +RestartSec=15s +ExecStart=/home/ubuntu/seer/seer indexer --chain game7_orbit_arbitrum_sepolia +SyslogIdentifier=seer-synchronizer-game7-orbit-arbitrum-sepolia + +[Install] +WantedBy=multi-user.target diff --git a/deploy/seer-synchronizer-mantle-sepolia.service b/deploy/seer-synchronizer-mantle-sepolia.service new file mode 100644 index 0000000..41dbce4 --- /dev/null +++ b/deploy/seer-synchronizer-mantle-sepolia.service @@ -0,0 +1,16 @@ +[Unit] +Description=Seer synchronizer service for mantle sepolia blockchain +After=network.target +StartLimitIntervalSec=300 +StartLimitBurst=3 + +[Service] +WorkingDirectory=/home/ubuntu/seer +EnvironmentFile=/home/ubuntu/seer-secrets/app.env +Restart=on-failure +RestartSec=15s +ExecStart=/home/ubuntu/seer/seer synchronizer --chain mantle_sepolia +SyslogIdentifier=seer-synchronizer-mantle-sepolia + +[Install] +WantedBy=multi-user.target diff --git a/deploy/seer-synchronizer-mantle.service b/deploy/seer-synchronizer-mantle.service new file mode 100644 index 0000000..e48d152 --- /dev/null +++ b/deploy/seer-synchronizer-mantle.service @@ -0,0 +1,16 @@ +[Unit] +Description=Seer synchronizer service for mantle blockchain +After=network.target +StartLimitIntervalSec=300 +StartLimitBurst=3 + +[Service] +WorkingDirectory=/home/ubuntu/seer +EnvironmentFile=/home/ubuntu/seer-secrets/app.env +Restart=on-failure +RestartSec=15s +ExecStart=/home/ubuntu/seer/seer synchronizer --chain mantle +SyslogIdentifier=seer-synchronizer-mantle + +[Install] +WantedBy=multi-user.target diff --git a/deploy/seer-synchronizer-xai-sepolia.service b/deploy/seer-synchronizer-xai-sepolia.service new file mode 100644 index 0000000..5808c5c --- /dev/null +++ b/deploy/seer-synchronizer-xai-sepolia.service @@ -0,0 +1,16 @@ +[Unit] +Description=Seer synchronizer service for xai sepolia blockchain +After=network.target +StartLimitIntervalSec=300 +StartLimitBurst=3 + +[Service] +WorkingDirectory=/home/ubuntu/seer +EnvironmentFile=/home/ubuntu/seer-secrets/app.env +Restart=on-failure +RestartSec=15s +ExecStart=/home/ubuntu/seer/seer synchronizer --chain xai_sepolia +SyslogIdentifier=seer-synchronizer-xai-sepolia + +[Install] +WantedBy=multi-user.target diff --git a/deploy/seer-synchronizer-xai.service b/deploy/seer-synchronizer-xai.service new file mode 100644 index 0000000..ad33164 --- /dev/null +++ b/deploy/seer-synchronizer-xai.service @@ -0,0 +1,16 @@ +[Unit] +Description=Seer synchronizer service for xai blockchain +After=network.target +StartLimitIntervalSec=300 +StartLimitBurst=3 + +[Service] +WorkingDirectory=/home/ubuntu/seer +EnvironmentFile=/home/ubuntu/seer-secrets/app.env +Restart=on-failure +RestartSec=15s +ExecStart=/home/ubuntu/seer/seer synchronizer --chain xai +SyslogIdentifier=seer-synchronizer-xai + +[Install] +WantedBy=multi-user.target