Skip to content

Commit 146587d

Browse files
authored
feat: add upgrade process scripts and upgrade node to v1.1.1 (#33)
* chore: upgrade node to v1.1.1 * feat: add upgrade process scripts * docs: add upgrading docs * docs: revise the upgrading guide * chore: adjust the example yaml * fix: use diff type * chore: remove change list * chore: remove upgrading docs
1 parent eb232d7 commit 146587d

File tree

4 files changed

+22
-9
lines changed

4 files changed

+22
-9
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Download the latest release from [release page](https://github.com/RSS3-Network/
2020

2121
```bash
2222
tar -zxvf downloaded_file.tar.gz
23-
```
23+
```
2424

2525
### Configuration
2626

@@ -35,4 +35,3 @@ Your `config.yaml` must be placed in the `config` subdirectory, at the same leve
3535
```bash
3636
docker-compose up -d
3737
```
38-

automated_deploy.sh

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ DEPLOYER_VERSION="v0.4.5"
66
DEPLOYER_RELEASE_URL="https://github.com/RSS3-Network/$DEPLOYER_NAME/releases"
77

88
# The version of RSS3 Node to deploy
9-
NODE_VERSION="v1.1.0"
9+
NODE_VERSION="v1.1.1"
1010

1111
# Detect the operating system
1212
OS=$(uname -s)
@@ -156,6 +156,20 @@ if [ -f "$SCRIPT_DIR/config.yaml" ]; then
156156
mv "$SCRIPT_DIR/config.yaml" "$SCRIPT_DIR/config/config.yaml"
157157
echo "⚠️ DO NOT DELETE/MOVE THE config FOLDER OR ITS CONTENTS!"
158158

159+
# Check for existing services
160+
if $COMPOSE_CMD ps | grep -q "Up"; then
161+
echo "🔄 Existing node services detected. This is an upgrade process."
162+
echo "⏬ Stopping existing services..."
163+
$COMPOSE_CMD down
164+
if [ $? -ne 0 ]; then
165+
echo "❌ Failed to stop existing services."
166+
exit 1
167+
fi
168+
echo "✅ Existing services stopped successfully."
169+
else
170+
echo "🆕 No existing services detected. This is a new node deployment."
171+
fi
172+
159173
export NODE_VERSION
160174
echo "🚀 Running the deployer..."
161175
"$SCRIPT_DIR/node-automated-deployer" > "$SCRIPT_DIR/docker-compose.yaml"

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module github.com/rss3-network/node-automated-deployer
33
go 1.22.3
44

55
require (
6-
github.com/rss3-network/node v1.1.0
6+
github.com/rss3-network/node v1.1.1
77
github.com/spf13/cobra v1.8.1
88
gopkg.in/yaml.v3 v3.0.1
99
)
@@ -42,7 +42,7 @@ require (
4242
github.com/mmcloughlin/addchain v0.4.0 // indirect
4343
github.com/pelletier/go-toml/v2 v2.2.2 // indirect
4444
github.com/pressly/goose/v3 v3.22.0 // indirect
45-
github.com/rss3-network/protocol-go v0.5.12 // indirect
45+
github.com/rss3-network/protocol-go v0.5.14 // indirect
4646
github.com/sagikazarmark/locafero v0.4.0 // indirect
4747
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
4848
github.com/samber/lo v1.47.0 // indirect

go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -185,10 +185,10 @@ github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZV
185185
github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
186186
github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik=
187187
github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU=
188-
github.com/rss3-network/node v1.1.0 h1:X/DqWjmtLIfPAZT0xUYi7nfJTpU2uH6n6hx6AOMf1E0=
189-
github.com/rss3-network/node v1.1.0/go.mod h1:Rv9jIsiMecQ4hHMb4strC5oBTD+VlOH7U2MbhdD4VhI=
190-
github.com/rss3-network/protocol-go v0.5.12 h1:hDqTa3Ft0PDM6/IhXGC0kOY4Ogig7TuM3UvQ7U9cM2A=
191-
github.com/rss3-network/protocol-go v0.5.12/go.mod h1:npcyduWt86uVbIi77xQaYk8eqltI9XNjk1FMGpjyIq0=
188+
github.com/rss3-network/node v1.1.1 h1:LdzLFuTxWHUoOTM3yfiIpy0fm312jYwZay10d/v4yJE=
189+
github.com/rss3-network/node v1.1.1/go.mod h1:gfDp8B++jRb4/IfgX3GiCksMhZ46lyTbng/jHHBGT/4=
190+
github.com/rss3-network/protocol-go v0.5.14 h1:gd6ciwXb5e4xx1dmAOAIKWbpami2QbARqE61zbwT6KE=
191+
github.com/rss3-network/protocol-go v0.5.14/go.mod h1:npcyduWt86uVbIi77xQaYk8eqltI9XNjk1FMGpjyIq0=
192192
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
193193
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
194194
github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ=

0 commit comments

Comments
 (0)