Skip to content

Commit

Permalink
feat: add upgrade process scripts and upgrade node to v1.1.1 (#33)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
pseudoyu authored Oct 24, 2024
1 parent eb232d7 commit 146587d
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 9 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Download the latest release from [release page](https://github.com/RSS3-Network/

```bash
tar -zxvf downloaded_file.tar.gz
```
```

### Configuration

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

16 changes: 15 additions & 1 deletion automated_deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ DEPLOYER_VERSION="v0.4.5"
DEPLOYER_RELEASE_URL="https://github.com/RSS3-Network/$DEPLOYER_NAME/releases"

# The version of RSS3 Node to deploy
NODE_VERSION="v1.1.0"
NODE_VERSION="v1.1.1"

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

# Check for existing services
if $COMPOSE_CMD ps | grep -q "Up"; then
echo "🔄 Existing node services detected. This is an upgrade process."
echo "⏬ Stopping existing services..."
$COMPOSE_CMD down
if [ $? -ne 0 ]; then
echo "❌ Failed to stop existing services."
exit 1
fi
echo "✅ Existing services stopped successfully."
else
echo "🆕 No existing services detected. This is a new node deployment."
fi

export NODE_VERSION
echo "🚀 Running the deployer..."
"$SCRIPT_DIR/node-automated-deployer" > "$SCRIPT_DIR/docker-compose.yaml"
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/rss3-network/node-automated-deployer
go 1.22.3

require (
github.com/rss3-network/node v1.1.0
github.com/rss3-network/node v1.1.1
github.com/spf13/cobra v1.8.1
gopkg.in/yaml.v3 v3.0.1
)
Expand Down Expand Up @@ -42,7 +42,7 @@ require (
github.com/mmcloughlin/addchain v0.4.0 // indirect
github.com/pelletier/go-toml/v2 v2.2.2 // indirect
github.com/pressly/goose/v3 v3.22.0 // indirect
github.com/rss3-network/protocol-go v0.5.12 // indirect
github.com/rss3-network/protocol-go v0.5.14 // indirect
github.com/sagikazarmark/locafero v0.4.0 // indirect
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
github.com/samber/lo v1.47.0 // indirect
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,10 @@ github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZV
github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik=
github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU=
github.com/rss3-network/node v1.1.0 h1:X/DqWjmtLIfPAZT0xUYi7nfJTpU2uH6n6hx6AOMf1E0=
github.com/rss3-network/node v1.1.0/go.mod h1:Rv9jIsiMecQ4hHMb4strC5oBTD+VlOH7U2MbhdD4VhI=
github.com/rss3-network/protocol-go v0.5.12 h1:hDqTa3Ft0PDM6/IhXGC0kOY4Ogig7TuM3UvQ7U9cM2A=
github.com/rss3-network/protocol-go v0.5.12/go.mod h1:npcyduWt86uVbIi77xQaYk8eqltI9XNjk1FMGpjyIq0=
github.com/rss3-network/node v1.1.1 h1:LdzLFuTxWHUoOTM3yfiIpy0fm312jYwZay10d/v4yJE=
github.com/rss3-network/node v1.1.1/go.mod h1:gfDp8B++jRb4/IfgX3GiCksMhZ46lyTbng/jHHBGT/4=
github.com/rss3-network/protocol-go v0.5.14 h1:gd6ciwXb5e4xx1dmAOAIKWbpami2QbARqE61zbwT6KE=
github.com/rss3-network/protocol-go v0.5.14/go.mod h1:npcyduWt86uVbIi77xQaYk8eqltI9XNjk1FMGpjyIq0=
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ=
Expand Down

0 comments on commit 146587d

Please sign in to comment.