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 5aa0f2f commit 83f3954
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 0 deletions.
7 changes: 7 additions & 0 deletions deploy/deploy.bash
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ USER_SYSTEMD_DIR="${USER_SYSTEMD_DIR:-/home/ubuntu/.config/systemd/user}"
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"
SEEER_CRAWLER_GAME7_SERVICE_FILE="seer-crawler-game7.service"
SEER_CRAWLER_GAME7_TESTNET_SERVICE_FILE="seer-crawler-game7-testnet.service"
SEER_CRAWLER_MANTLE_SEPOLIA_SERVICE_FILE="seer-crawler-mantle-sepolia.service"
SEER_CRAWLER_MANTLE_SERVICE_FILE="seer-crawler-mantle.service"
Expand All @@ -43,6 +44,7 @@ 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_SERVICE_FILE="seer-synchronizer-game7.service"
SEER_SYNCHRONIZER_GAME7_TESTNET_SERVICE_FILE="seer-synchronizer-game7-testnet.service"
SEER_SYNCHRONIZER_MANTLE_SEPOLIA_SERVICE_FILE="seer-synchronizer-mantle-sepolia.service"
SEER_SYNCHRONIZER_MANTLE_SERVICE_FILE="seer-synchronizer-mantle.service"
Expand All @@ -63,6 +65,8 @@ SEER_HISTORICAL_SYNCHRONIZER_ARBITRUM_ONE_SERVICE_FILE="seer-historical-synchron
SEER_HISTORICAL_SYNCHRONIZER_ARBITRUM_ONE_TIMER_FILE="seer-historical-synchronizer-arbitrum-one.timer"
SEER_HISTORICAL_SYNCHRONIZER_ARBITRUM_SEPOLIA_SERVICE_FILE="seer-historical-synchronizer-arbitrum-sepolia.service"
SEER_HISTORICAL_SYNCHRONIZER_ARBITRUM_SEPOLIA_TIMER_FILE="seer-historical-synchronizer-arbitrum-sepolia.timer"
SEER_HISTORICAL_SYNCHRONIZER_GAME7_SERVICE_FILE="seer-historical-synchronizer-game7.service"
SEER_HISTORICAL_SYNCHRONIZER_GAME7_TIMER_FILE="seer-historical-synchronizer-game7.timer"
SEER_HISTORICAL_SYNCHRONIZER_GAME7_TESTNET_SERVICE_FILE="seer-historical-synchronizer-game7-testnet.service"
SEER_HISTORICAL_SYNCHRONIZER_GAME7_TESTNET_TIMER_FILE="seer-historical-synchronizer-game7-testnet.timer"
SEER_HISTORICAL_SYNCHRONIZER_MANTLE_SEPOLIA_SERVICE_FILE="seer-historical-synchronizer-mantle-sepolia.service"
Expand Down Expand Up @@ -118,6 +122,9 @@ echo "MOONSTREAM_NODE_ARBITRUM_ONE_A_EXTERNAL_URI=${MOONSTREAM_NODE_ARBITRUM_ONE
MOONSTREAM_NODE_ARBITRUM_SEPOLIA_A_EXTERNAL_URI=$(gcloud secrets versions access latest --secret=MOONSTREAM_NODE_ARBITRUM_SEPOLIA_A_EXTERNAL_URI)
echo "MOONSTREAM_NODE_ARBITRUM_SEPOLIA_A_EXTERNAL_URI=${MOONSTREAM_NODE_ARBITRUM_SEPOLIA_A_EXTERNAL_URI}" >> "${PARAMETERS_ENV_PATH}"

MOONSTREAM_NODE_GAME7_A_EXTERNAL_URI=$(gcloud secrets versions access latest --secret=MOONSTREAM_NODE_GAME7_A_EXTERNAL_URI)
echo "MOONSTREAM_NODE_GAME7_A_EXTERNAL_URI=${MOONSTREAM_NODE_GAME7_A_EXTERNAL_URI}" >> "${PARAMETERS_ENV_PATH}"

MOONSTREAM_NODE_GAME7_TESTNET_A_EXTERNAL_URI=$(gcloud secrets versions access latest --secret=MOONSTREAM_NODE_GAME7_TESTNET_A_EXTERNAL_URI)
echo "MOONSTREAM_NODE_GAME7_TESTNET_A_EXTERNAL_URI=${MOONSTREAM_NODE_GAME7_TESTNET_A_EXTERNAL_URI}" >> "${PARAMETERS_ENV_PATH}"

Expand Down
16 changes: 16 additions & 0 deletions deploy/seer-crawler-game7.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[Unit]
Description=Seer crawler service for Game7 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 crawler --chain game7 --confirmations 0 --threads 2 --proto-time-limit 1 --retry-wait 1000 --retry-multiplier 1 --batch-size 0
SyslogIdentifier=seer-crawler-game7

[Install]
WantedBy=multi-user.target
16 changes: 16 additions & 0 deletions deploy/seer-historical-synchronizer-game7.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[Unit]
Description=Seer historical synchronizer service for game7 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 historical-sync --auto --chain game7
SyslogIdentifier=seer-historical-synchronizer-game7

[Install]
WantedBy=multi-user.target
9 changes: 9 additions & 0 deletions deploy/seer-historical-synchronizer-game7.timer
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[Unit]
Description=Runs seer historical synchronizer on game7

[Timer]
OnBootSec=60s
OnUnitActiveSec=10m

[Install]
WantedBy=timers.target
16 changes: 16 additions & 0 deletions deploy/seer-synchronizer-game7.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[Unit]
Description=Seer synchronizer service for game7 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 game7 --cycle-ticker-wait-time 1
SyslogIdentifier=seer-synchronizer-game7

[Install]
WantedBy=multi-user.target

0 comments on commit 83f3954

Please sign in to comment.