Skip to content

Commit

Permalink
update: release v2.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
POPPIN-FUMI committed Oct 23, 2023
1 parent cbca764 commit d93955c
Show file tree
Hide file tree
Showing 6 changed files with 113 additions and 9 deletions.
5 changes: 2 additions & 3 deletions dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@epics-dao/solv2",
"version": "2.1.2",
"version": "2.1.3",
"description": "Solana Validator CLI SOLV2",
"main": "dist/index.js",
"repository": "https://github.com/EpicsDAO/solv2",
Expand Down
10 changes: 7 additions & 3 deletions resource/solv2/v2.1.2/install
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,13 @@ EOF
}

create_user() {
echo "Creating user 'solv'..."
sudo adduser solv
sudo usermod -aG sudo solv
if id "solv" &>/dev/null; then
echo "User 'solv' already exists, skipping..."
else
echo "Creating user 'solv'..."
sudo adduser solv
sudo usermod -aG sudo solv
fi
}

setup_firewall() {
Expand Down
102 changes: 102 additions & 0 deletions resource/solv2/v2.1.3/install
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
#!/bin/sh

# Constants and configurable variables
SOLANA_VERSION=1.17.2
NODE_VERSION=18.18.1

# This ensures the entire script is downloaded
{
set -e # exit immediately if a command exits with a non-zero status

usage() {
cat 1>&2 <<EOF
Custom Install Script
Creates a new user 'solv', adds the user to the sudo group, logs in as 'solv',
installs nodenv, node $NODE_VERSION, and sets it as the global version.
Additionally, installs the @epics-dao/solv2 package globally.
USAGE:
custom-install-script.sh [FLAGS]
FLAGS:
-h, --help Prints help information
EOF
}

create_user() {
if id "solv" &>/dev/null; then
echo "User 'solv' already exists, skipping..."
else
echo "Creating user 'solv'..."
sudo adduser solv
sudo usermod -aG sudo solv
fi
}

setup_firewall() {
echo "Configuring firewall"
echo "yes" | sudo ufw enable
sudo ufw allow ssh
sudo ufw allow 53
sudo ufw allow 8000:10000/udp
sudo ufw allow 8000:10000/tcp
sudo ufw reload
}


install_nodenv_and_node() {
sudo su - solv <<EOF_SOLV
echo "Installing nodenv..."
git clone https://github.com/nodenv/nodenv.git ~/.nodenv
echo 'export PATH="\$HOME/.nodenv/bin:\$PATH"' >> ~/.profile
echo 'eval "\$(nodenv init -)"' >> ~/.profile
source ~/.profile
echo "Installing node-build..."
git clone https://github.com/nodenv/node-build.git "\$(nodenv root)"/plugins/node-build
echo "Installing node $NODE_VERSION..."
nodenv install $NODE_VERSION
nodenv global $NODE_VERSION
echo "Node installation completed!"
echo "Installing @epics-dao/solv2..."
npm i -g @epics-dao/solv2
echo "Sourcing ~/.profile..."
source ~/.profile
solv solv
EOF_SOLV
}

install_solana() {
echo "Installing solana..."
SOLV_HOME=$(eval echo ~solv)
export SOLANA_INSTALL_DIR="$SOLV_HOME/.local/share/solana/install"
sudo -u solv sh -c "$(curl -sSfL https://release.solana.com/v${SOLANA_VERSION}/install)"
echo "Solana installation completed!"
}

main() {
for arg in "$@"; do
case "$arg" in
-h|--help)
usage
exit 0
;;
*)
;;
esac
done

create_user
setup_firewall
install_solana
install_nodenv_and_node
echo "Enter solv user password 👇"
su solv
}

main "$@"

} # this ensures the entire script is downloaded
1 change: 0 additions & 1 deletion src/lib/logger/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ Solv is born and ready for running Solana Validator 🚀
$ cd ~ && source ~/.profile
$ solv setup
$ solv start
$ solv --help for more information
`
Expand Down
2 changes: 1 addition & 1 deletion src/lib/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const VERSION = '2.1.2'
export const VERSION = '2.1.3'

0 comments on commit d93955c

Please sign in to comment.