Merge pull request #23 from 0xOzgur/v2.0

v2.0 Updates
This commit is contained in:
0xOzgur 2024-10-14 10:49:41 +03:00 committed by GitHub
commit e5c57e3adf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
13 changed files with 220 additions and 63 deletions

View File

@ -18,8 +18,7 @@ After first run, when you need to reach your node, you need to run only;
**Autoinstaller Script for Quilibrium as a Service**
Use below command to install v1.4.21.1
Use below command to install v2.0
wget -O - https://raw.githubusercontent.com/0xOzgur/QuilibriumTools/main/install/install_quilibrium_service.sh | bash
@ -27,7 +26,8 @@ Use below command to install v1.4.21.1
**Autoupdater**
If you need to update your node from previous version to 1.4.21.1, apply below command
If you need to update your node from previous version to 2.0, apply below command
wget -O - https://raw.githubusercontent.com/0xOzgur/QuilibriumTools/main/update/update.sh | bash

View File

@ -1,7 +1,7 @@
#!/bin/bash
# Step 0: Welcome
echo "This script is prepared by 0xOzgur.eth"
echo "This script is prepared by 0xOzgur"
echo "Enjoy and sit back while you are configuring grpCurl for Quilibrium Ceremony Client!"
echo "Processing..."
sleep 10 # Add a 10-second delay

View File

@ -1,7 +1,7 @@
#!/bin/bash
# Step 0: Welcome
echo "This script is prepared by 0xOzgur.eth"
echo "This script is prepared by 0xOzgur"
echo "Enjoy and sit back while you are configuring grpCurl for Quilibrium Ceremony Client!"
echo "Processing..."
sleep 10 # Add a 10-second delay

View File

@ -1,31 +1,73 @@
#!/bin/bash
# Set the version number
VERSION="1.4.21.1"
VERSION="2.0.0.1"
# Determine the ExecStart line based on the architecture
ARCH=$(uname -m)
OS=$(uname -s)
# Determine the node binary name based on the architecture and OS
# Check if NODE_VERSION is empty
if [ -z "$NODE_VERSION" ]; then
NODE_VERSION=$(curl -s https://releases.quilibrium.com/release | grep -E "^node-[0-9]+(\.[0-9]+)*" | grep -v "dgst" | sed 's/^node-//' | cut -d '-' -f 1 | head -n 1)
if [ -z "$NODE_VERSION" ]; then
echo "❌ Error: Unable to determine NODE_VERSION automatically."
echo "The script cannot proceed without a correct node version number."
echo "Please try the manual step by step installation instead:"
echo "https://docs.quilibrium.one/start/tutorials/node-step-by-step-installation"
echo
exit 1
else
echo "✅ Automatically determined NODE_VERSION: $NODE_VERSION"
fi
else
echo "✅ Using specified NODE_VERSION: $NODE_VERSION"
fi
# Determine qclient latest version
# Check if QCLIENT_VERSION is empty
if [ -z "$QCLIENT_VERSION" ]; then
QCLIENT_VERSION=$(curl -s https://releases.quilibrium.com/qclient-release | grep -E "^qclient-[0-9]+(\.[0-9]+)*" | sed 's/^qclient-//' | cut -d '-' -f 1 | head -n 1)
if [ -z "$QCLIENT_VERSION" ]; then
echo "⚠️ Warning: Unable to determine QCLIENT_VERSION automatically. Continuing without it."
echo "The script won't be able to install the qclient, but it will still install your node."
echo "You can install the qclient later manually if you need to."
echo
sleep 1
else
echo "✅ Automatically determined QCLIENT_VERSION: $QCLIENT_VERSION"
fi
else
echo "✅ Using specified QCLIENT_VERSION: $QCLIENT_VERSION"
fi
echo
# Determine the node binary name based on the architecture and OS
if [ "$ARCH" = "x86_64" ]; then
if [ "$OS" = "Linux" ]; then
NODE_BINARY="node-$VERSION-linux-amd64"
NODE_BINARY="node-$NODE_VERSION-linux-amd64"
GO_BINARY="go1.22.4.linux-amd64.tar.gz"
[ -n "$QCLIENT_VERSION" ] && QCLIENT_BINARY="qclient-$QCLIENT_VERSION-linux-amd64"
elif [ "$OS" = "Darwin" ]; then
NODE_BINARY="node-$VERSION-darwin-amd64"
GO_BINARY="go1.22.44.linux-amd64.tar.gz"
NODE_BINARY="node-$NODE_VERSION-darwin-amd64"
GO_BINARY="go1.22.4.darwin-amd64.tar.gz"
[ -n "$QCLIENT_VERSION" ] && QCLIENT_BINARY="qclient-$QCLIENT_VERSION-darwin-amd64"
fi
elif [ "$ARCH" = "aarch64" ]; then
if [ "$OS" = "Linux" ]; then
NODE_BINARY="node-$VERSION-linux-arm64"
NODE_BINARY="node-$NODE_VERSION-linux-arm64"
GO_BINARY="go1.22.4.linux-arm64.tar.gz"
[ -n "$QCLIENT_VERSION" ] && QCLIENT_BINARY="qclient-$QCLIENT_VERSION-linux-arm64"
elif [ "$OS" = "Darwin" ]; then
NODE_BINARY="node-$VERSION-darwin-arm64"
GO_BINARY="go1.22.4.linux-arm64.tar.gz"
NODE_BINARY="node-$NODE_VERSION-darwin-arm64"
GO_BINARY="go1.22.4.darwin-arm64.tar.gz"
[ -n "$QCLIENT_VERSION" ] && QCLIENT_BINARY="qclient-$QCLIENT_VERSION-darwin-arm64"
fi
else
echo "❌ Error: Unsupported system architecture ($ARCH) or operating system ($OS)."
exit 1
fi
echo "Installing prerequisites..."

View File

@ -3,7 +3,7 @@
cd ~
# Step 0: Welcome
echo "This script is made with ❤️ by 0xOzgur.eth @ https://quilibrium.space "
echo "This script is made with ❤️ by 0xOzgur @ https://quilibrium.space "
echo "The script is prepared for Ubuntu machines. If you are using another operating system, please check the compatibility of the script."
echo "The script doesn't install GO or GrpCurl packages. If you want to install them please visit https://docs.quilibrium.space/installing-prerequisites page."
echo "⏳Enjoy and sit back while you are building your Quilibrium Node!"

View File

@ -3,7 +3,7 @@
cd ~
# Step 0: Welcome
echo "This script is made with ❤️ by 0xOzgur.eth @ https://quilibrium.space"
echo "This script is made with ❤️ by 0xOzgur @ https://quilibrium.space"
echo "⏳Enjoy and sit back while you are building your Quilibrium Ceremony Client!"
echo "⏳Processing..."
sleep 10 # Add a 10-second delay
@ -61,7 +61,8 @@ git checkout release-cdn
echo "⏳Building Ceremonyclient Container"
sleep 2 # Add a 2-second delay
docker build --build-arg GIT_COMMIT=$(git log -1 --format=%h) -t quilibrium:1.4.21.1 .1.4.21.1
docker build --build-arg GIT_COMMIT=$(git log -1 --format=%h) -t quilibrium:2.0 .2.0
# Step 8:Run Ceremonyclient Container

View File

@ -1,11 +1,11 @@
#!/bin/bash
# Set the version number
VERSION="1.4.21.1"
VERSION="2.0.0.1"
cd ~
# Step 0: Welcome
echo "This script is made with ❤️ by 0xOzgur.eth @ https://quilibrium.space "
echo "This script is made with ❤️ by 0xOzgur @ https://quilibrium.space "
echo "The script is prepared for Ubuntu machines. If you are using another operating system, please check the compatibility of the script."
echo "The script doesn't install GO or GrpCurl packages. If you want to install them please visit https://docs.quilibrium.space/installing-prerequisites page."
echo "⏳Enjoy and sit back while you are building your Quilibrium Node!"
@ -36,15 +36,6 @@ else
echo "git is installed"
fi
# if ! command -v cpulimit &> /dev/null
# then
# echo "cpulimit could not be found"
# echo "Installing cpulimit..."
# su -c "apt update && apt install cpulimit -y"
# else
# echo "cpulimit is installed"
# fi
sudo apt upgrade -y
# Step 2: Adjust network buffer sizes
@ -96,6 +87,33 @@ cd ~/ceremonyclient/
# git remote set-url origin https://github.com/QuilibriumNetwork/ceremonyclient.git || git remote set-url origin https://source.quilibrium.com/quilibrium/ceremonyclient.git
git checkout release
# Get the current OS and architecture
OS_ARCH=$(get_os_arch)
# Fetch the list of files from the release page
FILES=$(curl -s $BASE_URL | grep -oE "node-[0-9]+\.[0-9]+\.[0-9]+-${OS_ARCH}(\.dgst)?(\.sig\.[0-9]+)?")
# Change to the download directory
cd ~/ceremonyclient/node
# Download each file
for file in $FILES; do
echo "Downloading $file..."
wget "https://releases.quilibrium.com/$file"
# Check if the download was successful
if [ $? -eq 0 ]; then
echo "Successfully downloaded $file"
else
echo "Failed to download $file"
fi
echo "------------------------"
done
# Determine the ExecStart line based on the architecture
ARCH=$(uname -m)
OS=$(uname -s)
@ -105,11 +123,11 @@ if [ "$ARCH" = "x86_64" ]; then
if [ "$OS" = "Linux" ]; then
NODE_BINARY="node-$VERSION-linux-amd64"
GO_BINARY="go1.22.4.linux-amd64.tar.gz"
QCLIENT_BINARY="qclient-1.4.19.1-linux-amd64"
QCLIENT_BINARY="qclient-2.0.0-linux-amd64"
elif [ "$OS" = "Darwin" ]; then
NODE_BINARY="node-$VERSION-darwin-amd64"
GO_BINARY="go1.22.44.linux-amd64.tar.gz"
QCLIENT_BINARY="qclient-1.4.19.1-darwin-arm64"
QCLIENT_BINARY="qclient-2.0.0-darwin-arm64"
fi
elif [ "$ARCH" = "aarch64" ]; then
if [ "$OS" = "Linux" ]; then
@ -118,17 +136,43 @@ elif [ "$ARCH" = "aarch64" ]; then
elif [ "$OS" = "Darwin" ]; then
NODE_BINARY="node-$VERSION-darwin-arm64"
GO_BINARY="go1.22.4.linux-arm64.tar.gz"
QCLIENT_BINARY="qclient-1.4.19.1-linux-arm64"
QCLIENT_BINARY="qclient-2.0.0-linux-arm64"
fi
fi
# Step 4:Download qClient
echo "⏳Downloading qClient"
sleep 1 # Add a 1-second delay
# Get the current OS and architecture
OS_ARCH=$(get_os_arch)
# Fetch the list of files from the release page
FILES=$(curl -s $BASE_URL | grep -oE "qclient-[0-9]+\.[0-9]+\.[0-9]+-${OS_ARCH}(\.dgst)?(\.sig\.[0-9]+)?")
# Change to the download directory
cd ~/ceremonyclient/client
wget https://releases.quilibrium.com/$QCLIENT_BINARY
mv $QCLIENT_BINARY qclient
chmod +x qclient
# Download each file
for file in $FILES; do
echo "Downloading $file..."
wget "https://releases.quilibrium.com/$file"
# Check if the download was successful
if [ $? -eq 0 ]; then
echo "Successfully downloaded $file"
else
echo "❌ Error: Failed to download $file"
echo "Your node will still work, but you'll need to install the qclient manually later if needed."
fi
echo "------------------------"
done
mv $QCLIENT_BINARY qclient
chmod +x qclient
echo "✅ qClient binary downloaded and configured successfully."
echo
# Step 5:Determine the ExecStart line based on the architecture
# Get the current user's home directory
@ -136,7 +180,7 @@ HOME=$(eval echo ~$HOME_DIR)
# Use the home directory in the path
NODE_PATH="$HOME/ceremonyclient/node"
EXEC_START="$NODE_PATH/release_autorun.sh"
EXEC_START="$NODE_PATH/$NODE_BINARY"
# Step 6:Create Ceremonyclient Service
echo "⏳ Creating Ceremonyclient Service"

View File

@ -28,15 +28,16 @@ OS=$(uname -s)
# Determine the node binary name based on the architecture and OS
if [ "$ARCH" = "x86_64" ]; then
if [ "$OS" = "Linux" ]; then
NODE_BINARY='node-1.4.21.1-linux-amd64'
NODE_BINARY='node-2.0-linux-amd64'
elif [ "$OS" = "Darwin" ]; then
NODE_BINARY='node-1.4.21.1-darwin-amd64'
NODE_BINARY='node-2.0-darwin-amd64'
fi
elif [ "$ARCH" = "aarch64" ]; then
if [ "$OS" = "Linux" ]; then
NODE_BINARY='node-1.4.21.1-linux-arm64'
NODE_BINARY='node-2.0-linux-arm64'
elif [ "$OS" = "Darwin" ]; then
NODE_BINARY='node-1.4.21.1-darwin-arm64'
NODE_BINARY='node-2.0-darwin-arm64'
fi
fi

View File

@ -28,9 +28,9 @@ alias drestart='cd ~/ceremonyclient/ && docker compose down && docker compose up
alias dstop='cd ~/ceremonyclient/ && docker compose down && cd ~'
# Shortcuts for Service
alias peer-count="cd ~/ceremonyclient/node && grpcurl -plaintext -max-msg-sz 150000000 localhost:8337 quilibrium.node.node.pb.NodeService.GetPeerManifests | grep peerId | wc -l && cd ~"
alias node-info="cd ~/ceremonyclient/node && ./node-1.4.21-linux-amd64 -node-info && cd ~"
alias db-console="cd ~/ceremonyclient/node && ./node-1.4.21-linux-amd64 --db-console && cd ~"
alias balance="cd ~/ceremonyclient/node && ./node-1.4.21-linux-amd64 -balance && cd ~"
alias node-info="cd ~/ceremonyclient/node && ./node-2.0-linux-amd64 -node-info && cd ~"
alias db-console="cd ~/ceremonyclient/node && ./node-2.0-linux-amd64 --db-console && cd ~"
alias balance="cd ~/ceremonyclient/node && ./node-2.0-linux-amd64 -balance && cd ~"
alias nlog="sudo journalctl -u ceremonyclient.service -f --no-hostname -o cat"
alias increment="sudo journalctl -u ceremonyclient.service -f --no-hostname -o cat | grep time_taken"
alias nstart="service ceremonyclient start"

View File

@ -7,7 +7,7 @@ clear
# Set the version number
VERSION="1.4.21.1"
VERSION="2.0.0.1"
# Determine the ExecStart line based on the architecture
@ -104,7 +104,7 @@ while true; do
clear
echo "This script is made with ❤️ by 0xOzgur.eth @ https://quilibrium.space"
echo "Welcome to Quilibrium for Dummies!"
0xOzgur
echo "
_____ _ _ _ _ _
/ ___ \ (_) (_) | (_)

View File

@ -1,9 +1,11 @@
#!/bin/bash
VERSION="1.4.21.1"
VERSION="2.0.0.1"
# Step 0: Welcome
echo "This script is made with ❤️ by 0xOzgur.eth @ https://quilibrium.space"
echo "This script is made with ❤️ by 0xOzgur @ https://quilibrium.space"
echo "⏳Enjoy and sit back while you are upgrading your Quilibrium Node to v$VERSION!"
echo "The script is prepared for Ubuntu machines. If you are using another operating system, please check the compatibility of the script."
echo "⏳Processing..."
@ -12,6 +14,20 @@ sleep 5 # Add a 5-second delay
# Stop the ceremonyclient service
echo "Updating node..."
service ceremonyclient stop
echo "⏳ Stopping the ceremonyclient service if it exists..."
if systemctl is-active --quiet ceremonyclient; then
if sudo systemctl stop ceremonyclient; then
echo "🔴 Service stopped successfully."
echo
else
echo "❌ Failed to stop the ceremonyclient service." >&2
echo
fi
else
echo " Ceremonyclient service is not active or does not exist."
echo
fi
sleep 1
# apt install cpulimit -y
# apt install gawk -y #incase it is not installed
@ -24,6 +40,35 @@ git checkout main
git branch -D release
git pull
git checkout release
echo "✅ Downloaded the latest changes successfully."
echo
# Get the current OS and architecture
OS_ARCH=$(get_os_arch)
# Fetch the list of files from the release page
FILES=$(curl -s $BASE_URL | grep -oE "node-[0-9]+\.[0-9]+\.[0-9]+-${OS_ARCH}(\.dgst)?(\.sig\.[0-9]+)?")
# Change to the download directory
cd ~/ceremonyclient/node
# Download each file
for file in $FILES; do
echo "Downloading $file..."
wget "https://releases.quilibrium.com/$file"
# Check if the download was successful
if [ $? -eq 0 ]; then
echo "Successfully downloaded $file"
else
echo "Failed to download $file"
fi
echo "------------------------"
done
# Determine the ExecStart line based on the architecture
ARCH=$(uname -m)
@ -34,11 +79,11 @@ if [ "$ARCH" = "x86_64" ]; then
if [ "$OS" = "Linux" ]; then
NODE_BINARY="node-$VERSION-linux-amd64"
GO_BINARY="go1.22.4.linux-amd64.tar.gz"
QCLIENT_BINARY="qclient-1.4.19.1-linux-amd64"
QCLIENT_BINARY="qclient-2.0.0-linux-amd64"
elif [ "$OS" = "Darwin" ]; then
NODE_BINARY="node-$VERSION-darwin-amd64"
GO_BINARY="go1.22.44.linux-amd64.tar.gz"
QCLIENT_BINARY="qclient-1.4.19.1-darwin-arm64"
QCLIENT_BINARY="qclient-2.0.0-darwin-arm64"
fi
elif [ "$ARCH" = "aarch64" ]; then
if [ "$OS" = "Linux" ]; then
@ -47,25 +92,49 @@ elif [ "$ARCH" = "aarch64" ]; then
elif [ "$OS" = "Darwin" ]; then
NODE_BINARY="node-$VERSION-darwin-arm64"
GO_BINARY="go1.22.4.linux-arm64.tar.gz"
QCLIENT_BINARY="qclient-1.4.19.1-linux-arm64"
QCLIENT_BINARY="qclient-2.0.0-linux-arm64"
fi
fi
# Step 4:Update qClient
echo "Updating qClient"
sleep 1 # Add a 1-second delay
# Get the current OS and architecture
OS_ARCH=$(get_os_arch)
# Fetch the list of files from the release page
FILES=$(curl -s $BASE_URL | grep -oE "qclient-[0-9]+\.[0-9]+\.[0-9]+-${OS_ARCH}(\.dgst)?(\.sig\.[0-9]+)?")
# Change to the download directory
cd ~/ceremonyclient/client
rm -f qclient
wget https://releases.quilibrium.com/$QCLIENT_BINARY
mv $QCLIENT_BINARY qclient
chmod +x qclient
# Download each file
for file in $FILES; do
echo "Downloading $file..."
wget "https://releases.quilibrium.com/$file"
# Check if the download was successful
if [ $? -eq 0 ]; then
echo "Successfully downloaded $file"
else
echo "❌ Error: Failed to download $file"
echo "Your node will still work, but you'll need to install the qclient manually later if needed."
fi
echo "------------------------"
done
mv $QCLIENT_BINARY qclient
chmod +x qclient
echo "✅ qClient binary downloaded and configured successfully."
echo
# Get the current user's home directory
HOME=$(eval echo ~$HOME_DIR)
# Use the home directory in the path
NODE_PATH="$HOME/ceremonyclient/node"
EXEC_START="$NODE_PATH/release_autorun.sh"
EXEC_START="$NODE_PATH/$NODE_BINARY"
# Re-Create Ceremonyclient Service
echo "⏳ Re-Creating Ceremonyclient Service"
@ -111,10 +180,10 @@ echo "✅ Starting Ceremonyclient Service"
sleep 2 # Add a 2-second delay
sudo systemctl daemon-reload
sudo systemctl enable ceremonyclient
sudo service ceremonyclient start
sudo systemctl start ceremonyclient
# See the logs of the ceremonyclient service
echo "🎉 Welcome to Quilibrium Ceremonyclient v$VERSION"
echo "⏳ Please let it flow node logs at least 5 minutes then you can press CTRL + C to exit the logs."
sleep 5 # Add a 5-second delay
sleep 2 # Add a 2-second delay
sudo journalctl -u ceremonyclient.service -f --no-hostname -o cat

View File

@ -1,9 +1,9 @@
#!/bin/bash
# Step 0: Welcome
echo "This script is made with ❤️ by 0xOzgur.eth"
echo "⏳Enjoy and sit back while you are upgrading your Quilibrium Node to v1.4.21.1!"
echo "This script is made with ❤️ by 0xOzgur"
echo "⏳Enjoy and sit back while you are upgrading your Quilibrium Node to v2.0!"
echo "⏳Processing..."
sleep 10 # Add a 10-second delay
@ -13,7 +13,7 @@ service ceremonyclient stop
# Step 1:Download Binary
echo "⏳ Downloading New Release v1.4.21.1"
echo "⏳ Downloading New Release v2.0"
cd ~/ceremonyclient
git pull
@ -23,7 +23,7 @@ git checkout release-cdn
echo "⏳Building Ceremonyclient Container"
sleep 2 # Add a 2-second delay
docker build --build-arg GIT_COMMIT=$(git log -1 --format=%h) -t quilibrium -t quilibrium:1.4.21.1 .
docker build --build-arg GIT_COMMIT=$(git log -1 --format=%h) -t quilibrium -t quilibrium:2.0 .
# Step 8:Run Ceremonyclient Container

View File

@ -1,7 +1,7 @@
#!/bin/bash
# Step 0: Welcome
echo "This script is made with ❤️ by 0xOzgur.eth @ https://quilibrium.space"
echo "This script is made with ❤️ by 0xOzgur @ https://quilibrium.space"
echo "⏳You need GO and grpcurl installed and configured on your machine to run this script. If you don't have them, please install and configure grpcurl first."
echo "You can find the installation instructions at https://docs.quilibrium.space/installing-prerequisites"
echo "⏳Processing..."